LogoLogo
System Status
2021-03-23
2021-03-23
  • 2021-03-23
  • Charges
  • Checkouts
  • Country specifications
  • Customers
  • Events
  • Fees
  • File links
  • Files
  • Fulfillment cancellations
  • Fulfillment orders
  • Fulfillment returns
  • Fulfillments
  • Inventory items
  • Inventory levels
  • Invoices
  • Orders
  • Payouts
  • Plans
  • Refunds
  • Reservations
  • Returns
  • Sales summaries
  • Sales transactions
  • Shipments
  • Shipping quotes
  • SKUs
  • SKU groups
  • Sources
  • Subscriptions
  • Tax identifiers
  • Webhooks
Powered by GitBook
On this page

Returns

PreviousReservationsNextSales summaries

Last updated 5 months ago

A return represents the full or partial return of items in an order. Returns are always associated with an order and may optionally contain a refund.

Gets a return by ID

get

Retrieves the details of a return. Supply the unique identifier of the return.

Authorizations
Path parameters
idstringRequired

Return ID

Responses
200
OK.
application/json
400
400 Bad Request
application/json
401
401 Unauthorized
application/json
403
403 Forbidden
application/json
404
404 Not Found
application/json
405
405 Method Not Allowed
application/json
406
406 Not Acceptable
application/json
408
408 Request Timeout
application/json
429
429 Too Many Requests
application/json
500
500 Internal Server Error
application/json
502
502 Bad Gateway Error
application/json
503
503 Service Unavailable Error
application/json
504
504 Gateway Timeout Error
application/json
get
GET /returns/{id} HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "ret_5823594809",
  "createdTime": "2025-05-09T05:15:59.438Z",
  "updatedTime": "2025-05-09T05:15:59.438Z",
  "orderId": "ord_6645940010",
  "currency": "USD",
  "items": [
    {
      "itemId": "99341140336",
      "skuId": "sku_5823594809",
      "amount": 899,
      "quantity": 1,
      "quantityAccepted": 1,
      "state": "created"
    }
  ],
  "reason": "requested_by_customer",
  "failureReason": "text",
  "state": "created",
  "location": {
    "address": {
      "line1": "10380 Bren Rd W",
      "line2": "text",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "name": "John Smith",
    "phone": "952-111-1111",
    "email": "jsmith@digitalriver.com"
  },
  "liveMode": false,
  "metadata": {
    "coupon": "iOS"
  },
  "refundIds": [
    "0848750667"
  ]
}
  • GETReturns a list of returns
  • POSTCreates a return
  • GETGets a return by ID
  • POSTUpdates an existing return

Returns a list of returns

get

Get all returns.

Authorizations
Query parameters
endingBeforestringOptional

A cursor for use in pagination. The endingBefore parameter is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with xyz your subsequent calls can include endingBefore=xyz in order to fetch the previous page of the list.

startingAfterstringOptional

A cursor for use in pagination. The startingAfter parameter is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with xyz, your subsequent calls can include startingAfter=xyz in order to fetch the next page of the list.

limitinteger · min: 1 · max: 100Optional

A limit on the number of objects returned. Limit can range between 1 and 100, and the default is 10.

idsstring[]Optional

Only return objects with these IDs.

statestringOptional

Only return objects in the given state

orderIdstringOptional

The order to retrieve returns for.

skuIdstringOptional

The sku to retrieve returns for.

Responses
200
200 OK
application/json
400
400 Bad Request
application/json
401
401 Unauthorized
application/json
403
403 Forbidden
application/json
405
405 Method Not Allowed
application/json
406
406 Not Acceptable
application/json
408
408 Request Timeout
application/json
429
429 Too Many Requests
application/json
500
500 Internal Server Error
application/json
502
502 Bad Gateway Error
application/json
503
503 Service Unavailable Error
application/json
504
504 Gateway Timeout Error
application/json
get
GET /returns HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "hasMore": true,
  "data": [
    {
      "id": "ret_5823594809",
      "createdTime": "2025-05-09T05:15:59.438Z",
      "updatedTime": "2025-05-09T05:15:59.438Z",
      "orderId": "ord_6645940010",
      "currency": "USD",
      "items": [
        {
          "itemId": "99341140336",
          "skuId": "sku_5823594809",
          "amount": 899,
          "quantity": 1,
          "quantityAccepted": 1,
          "state": "created"
        }
      ],
      "reason": "requested_by_customer",
      "failureReason": "text",
      "state": "created",
      "location": {
        "address": {
          "line1": "10380 Bren Rd W",
          "line2": "text",
          "city": "Minnetonka",
          "postalCode": "55129",
          "state": "MN",
          "country": "US"
        },
        "name": "John Smith",
        "phone": "952-111-1111",
        "email": "jsmith@digitalriver.com"
      },
      "liveMode": false,
      "metadata": {
        "coupon": "iOS"
      },
      "refundIds": [
        "0848750667"
      ]
    }
  ]
}

Creates a return

post

Returns all or part of a previously created order.

Authorizations
Body
orderIdstringRequired

The unique identifier of the Order associated with the Return.

Example: ord_6645940010
reasonstring · max: 64Optional

The reason for the return.

Example: requested_by_customer
Responses
201
201 Created
application/json
400
400 Bad Request
application/json
401
401 Unauthorized
application/json
403
403 Forbidden
application/json
405
405 Method Not Allowed
application/json
406
406 Not Acceptable
application/json
408
408 Request Timeout
application/json
409
409 Conflict
application/json
429
429 Too Many Requests
application/json
500
500 Internal Server Error
application/json
502
502 Bad Gateway Error
application/json
503
503 Service Unavailable Error
application/json
504
504 Gateway Timeout Error
application/json
post
POST /returns HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 371

{
  "orderId": "ord_6645940010",
  "reason": "requested_by_customer",
  "items": [
    {
      "itemId": "99341140336",
      "skuId": "99341140336",
      "quantity": 1
    }
  ],
  "location": {
    "address": {
      "line1": "10380 Bren Rd W",
      "line2": "text",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "name": "John Smith",
    "phone": "952-111-1111",
    "email": "jsmith@digitalriver.com"
  },
  "metadata": {
    "coupon": "iOS"
  }
}
{
  "id": "ret_5823594809",
  "createdTime": "2025-05-09T05:15:59.438Z",
  "orderId": "ord_6645940010",
  "currency": "USD",
  "items": [
    {
      "itemId": "99341140336",
      "skuId": "sku_5823594809",
      "amount": 899,
      "quantity": 1,
      "quantityAccepted": 1,
      "state": "created"
    }
  ],
  "reason": "requested_by_customer",
  "state": "created",
  "location": {
    "address": {
      "line1": "10380 Bren Rd W",
      "line2": "text",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "name": "John Smith",
    "phone": "952-111-1111",
    "email": "jsmith@digitalriver.com"
  },
  "livemode": false,
  "metadata": {
    "coupon": "iOS"
  },
  "refundIds": [
    "ref_0848750667"
  ]
}

Updates an existing return

post

Updates an existing return.

Authorizations
Path parameters
idstringRequired

Return ID

Body
statestring · enumOptional

Enumeration indicating the state of the return.

Example: acceptedPossible values:
Responses
200
200 OK
application/json
400
400 Bad Request
application/json
401
401 Unauthorized
application/json
403
403 Forbidden
application/json
404
401 Not Found
application/json
405
405 Method Not Allowed
application/json
406
406 Not Acceptable
application/json
408
408 Request Timeout
application/json
409
409 Conflict
application/json
429
429 Too Many Requests
application/json
500
500 Internal Server Error
application/json
502
502 Bad Gateway Error
application/json
503
503 Service Unavailable Error
application/json
504
504 Gateway Timeout Error
application/json
post
POST /returns/{id} HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 342

{
  "location": {
    "address": {
      "line1": "10380 Bren Rd W",
      "line2": "text",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "name": "John Smith",
    "phone": "952-111-1111",
    "email": "jsmith@digitalriver.com"
  },
  "state": "accepted",
  "items": [
    {
      "itemId": "99596460336",
      "skuId": "text",
      "quantity": 1,
      "state": "accepted"
    }
  ],
  "metadata": {
    "coupon": "iOS"
  }
}
{
  "id": "ret_5823594809",
  "createdTime": "2025-05-09T05:15:59.438Z",
  "updatedTime": "2025-05-09T05:15:59.438Z",
  "orderId": "ord_6645940010",
  "currency": "USD",
  "items": [
    {
      "itemId": "99341140336",
      "skuId": "sku_5823594809",
      "amount": 899,
      "quantity": 1,
      "quantityAccepted": 1,
      "state": "created"
    }
  ],
  "reason": "requested_by_customer",
  "failureReason": "text",
  "state": "created",
  "location": {
    "address": {
      "line1": "10380 Bren Rd W",
      "line2": "text",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "name": "John Smith",
    "phone": "952-111-1111",
    "email": "jsmith@digitalriver.com"
  },
  "liveMode": false,
  "metadata": {
    "coupon": "iOS"
  },
  "refundIds": [
    "0848750667"
  ]
}