Retrieving returns for a specified order

Learn how to retrieve all returns for a specified order.

Retrieve all returns for a specified order

Use the GET /v1/shoppers/me/orders/(orderId)/returns request to retrieve all returns for a specified order where 999999999 is the orderId.

Requirement: Create an OAuth token before invoking the Returns API.

curl --location --request GET 'https://api.digitalriver.com/v1/shoppers/me/orders/{orderId}/returns' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <<full access token>>'
...

See Returns query parameters for more information.

Request the return of one or more line items in an order

Request the return of one or more line items in a specified order. You must provide the order identifier (orderId).

curl --location --request POST 'https://api.digitalriver.com/v1/shoppers/me/orders/{orderid}/returns' \
--header 'authorization: Basic ***\
...
--data-raw '{
  "return": {
    "reason": "DUPLICATE_ORDER",
    "comments": "Duplicate Order",
    "acceptELOD": "true",
    "returnLineItems": {
      "returnLineItem": [
        {
          "lineItemQuantityIDs": [
            1
          ],
          "lineItem": {
            "id": "123",
            "quantity": 1
          }
        }
      ]
    }
  }
}'  

See Returns resource and Returns query parameters for more information.

formattedReturnLITotal

The value for formattedReturnLITotal in the response body is based on the locale and currency. For example, if the locale is en_US the currency is USD.

    formattedReturnLITotal": "105.00USD",

Last updated