LogoLogo
Shopper APIs reference
Shopper APIs reference
  • Shopper APIs reference
  • OAuth
    • Tokens
    • Access tokens
  • Shoppers
    • Shoppers
    • Addresses
    • Payment options
  • Browse (product discovery)
    • Categories
    • Products
    • Product variations
    • Pricing
    • Inventory status
    • Financing
    • Offers
    • Purchase plan
    • Find a purchase plan
    • Authorize a purchase plan
  • Cart
    • Apply a shopper to a cart
    • Line items
    • Billing address
    • Shipping address
    • Payment methods
    • Shipping options
    • Web checkout
    • Submit a cart
    • Apply or detach payment methods
    • Apply a shipping option
    • Carts
    • Cart offers
    • API trigger offer
    • Resume cart
    • Third-party subscription engine
    • Tax registration
    • Price override
  • Orders
    • Orders
    • Order lookup
    • Order address
    • Returns
  • Subscriptions
    • Manage a subscription
    • Manage the subscription's renewal plan
    • Immediate midterm change
    • Payment
    • Address
    • Orders
    • Pending actions
    • Retrieve subscriptions
    • Subscription billing and shipping addresses
Powered by GitBook
On this page
  1. Orders

Returns

PreviousOrder addressNextManage a subscription

Last updated 11 months ago

  • GETRetrieve all returns for a specified order
  • POSTRequest the return of one or more line items in an order

Retrieve all returns for a specified order

get
Path parameters
orderIdstringRequired

Provide the order's identifier.

Query parameters
tokenstringOptional

Provide the authorized token for a shopper.

expandstringOptional

Use the expand query parameter when you want additional fields to appear in the response. The expand query parameter provides more fields in the response. Expanding resources reduces the number of API calls required to accomplish a task.

fieldsstringOptional

Specify the fields that you want to appear in the response. Filtering the fields returned in the response can conserve bandwidth and accelerate response time.

formatstringOptional

Override the default format of XML for the Authorize Shopper API. Valid values are XML and JSON.

Header parameters
acceptstringOptional

Specifies the acceptable media type for the response.

Responses
200
Successful response.
application/json
401
* Invalid Token
application/json
404
* resource-not-found
application/json
get
GET /v1/shoppers/me/orders/{orderId}/returns HTTP/1.1
Host: api.digitalriver.com
Accept: */*
{
  "returns": [
    {
      "return": [
        {
          "id": "6654727889",
          "reason": "DUPLICATE_ORDER",
          "comments": "Shopper initiated self service return-",
          "type": "LineItemLevelReturnProduct",
          "status": "RefundedWithoutReturn",
          "generationDate": "2020-01-30T17:37:09.000Z",
          "generatedBy": "56066c6b-139b-47ff-9b07-1c799c10ea75",
          "origin": "SHOPPER",
          "policy": "LOD",
          "dateRefunded": "In Process",
          "refundTotal": {
            "currency": "USD",
            "value": 0
          },
          "formattedRefundTotal": "$0.00",
          "outstandingTotal": {
            "currency": "USD",
            "value": 107.53
          },
          "formattedOutstandingTotal": "$107.53",
          "requestedTotal": {
            "currency": "USD",
            "value": 107.53
          },
          "formattedRequestedTotal": "$107.53",
          "returnLineItems": {
            "returnLineItem": [
              {
                "dueDate": "2020-02-07T05:59:59.000Z",
                "expectedQty": 1,
                "returnedQty": 1,
                "type": 100409,
                "notes": "LOD_REFUNDED-2020-02-07T05:59:59.000Z",
                "date": "2020-01-30T17:37:09.000Z",
                "status": "RefundedWithoutReturn",
                "returnLITotal": {
                  "currency": "USD",
                  "value": 107.53
                },
                "formattedReturnLITotal": "$107.53",
                "lineItem": {
                  "uri": "https://api.digitalriver.com/v1/shoppers/me/orders/793374880082/line-items/793451150082"
                }
              }
            ]
          }
        }
      ]
    }
  ]
}

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

post
Path parameters
orderIdstringRequired

Provide the order's identifier.

Query parameters
tokenstringOptional

Provide the authorized token for a shopper.

expandstringOptional

Use the expand query parameter when you want additional fields to appear in the response. The expand query parameter provides more fields in the response. Expanding resources reduces the number of API calls required to accomplish a task.

fieldsstringOptional

Specify the fields that you want to appear in the response. Filtering the fields returned in the response can conserve bandwidth and accelerate response time.

formatstringOptional

Override the default format of XML for the Authorize Shopper API. Valid values are XML and JSON.

Header parameters
acceptstringOptional

Specifies the acceptable media type for the response.

Body
Responses
200
Successful response.
application/json
400
* Line item ID is missing * Return reason is missing * Return object is missing * Return reason is missing * Line items to return are missing * Line item quantity IDs are missing * Specified quantity to return is invalid * Return reason is invalid * Cannot resolve line item for specified line item ID * Line item exceeds return window for specified line item ID * Line item had a problem while fetching the expiration date for specified line item ID * Line item has a line item level satisfaction refund for specified line item ID * Line item is linked to a subscription * Specified line item ID is not physical * Specified line item quantity IDs are not associated with the specified line item * Line item quantity IDs for this partial return are missing * Specified line item quantity IDs are not eligible for return for the specified line item ID * Quantity of line items to return is greater than the expected return quantity for the specified line item ID * Request contains no line items * Return reasons for the specified order ID are missing * Return request cannot be null * Cannot resolve the specified order ID for the order * Product the shopper wants to return is part of a product combination * Site does not accept returns * Order has order level satisfaction refund for specified order ID * Specified order ID is not eligible for return * Line item return quantity must be greater than 0 for the specified line item * Cannot resolve the site for the specified order ID
application/json
401
* Invalid Token
application/json
post
POST /v1/shoppers/me/orders/{orderId}/returns HTTP/1.1
Host: api.digitalriver.com
Content-Type: application/json
Accept: */*
Content-Length: 192

{
  "return": {
    "reason": "DUPLICATE_ORDER",
    "comments": "Duplicate Order",
    "acceptELOD": "true",
    "returnLineItems": {
      "returnLineItem": [
        {
          "lineItemQuantityIDs": [
            1
          ],
          "lineItem": {
            "id": "123",
            "quantity": 1
          }
        }
      ]
    }
  }
}
{
  "returns": [
    {
      "return": [
        {
          "id": "6654727889",
          "reason": "DUPLICATE_ORDER",
          "comments": "Shopper initiated self service return-",
          "type": "LineItemLevelReturnProduct",
          "status": "RefundedWithoutReturn",
          "generationDate": "2020-01-30T17:37:09.000Z",
          "generatedBy": "56066c6b-139b-47ff-9b07-1c799c10ea75",
          "origin": "SHOPPER",
          "policy": "LOD",
          "dateRefunded": "In Process",
          "refundTotal": {
            "currency": "USD",
            "value": 0
          },
          "formattedRefundTotal": "$0.00",
          "outstandingTotal": {
            "currency": "USD",
            "value": 107.53
          },
          "formattedOutstandingTotal": "$107.53",
          "requestedTotal": {
            "currency": "USD",
            "value": 107.53
          },
          "formattedRequestedTotal": "$107.53",
          "returnLineItems": {
            "returnLineItem": [
              {
                "dueDate": "2020-02-07T05:59:59.000Z",
                "expectedQty": 1,
                "returnedQty": 1,
                "type": 100409,
                "notes": "LOD_REFUNDED-2020-02-07T05:59:59.000Z",
                "date": "2020-01-30T17:37:09.000Z",
                "status": "RefundedWithoutReturn",
                "returnLITotal": {
                  "currency": "USD",
                  "value": 107.53
                },
                "formattedReturnLITotal": "$107.53",
                "lineItem": {
                  "uri": "https://api.digitalriver.com/v1/shoppers/me/orders/793374880082/line-items/793451150082"
                }
              }
            ]
          }
        }
      ]
    }
  ]
}