latestOpenAPI 3.0.12026-08-101292701.1 MB

f21981db32be

Returns

Creates a return

Returns all or part of a previously created order.

post/returns

Request body

orderIdstring required

The unique identifier of the Order associated with the Return.

reasonstring

The reason for the return.

metadataMetadata

Key-value pairs used to store additional data. Value can be string, boolean or integer types.

Example request

{
  "orderId": "ord_6645940010",
  "reason": "requested_by_customer",
  "items": [
    {
      "itemId": "99341140336",
      "skuId": "99341140336",
      "quantity": 1
    }
  ],
  "location": {
    "address": {
      "line1": "10380 Bren Rd W",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "name": "John Smith",
    "phone": "952-111-1111",
    "email": "jsmith@digitalriver.com"
  },
  "metadata": {
    "coupon": "iOS"
  }
}

Response

201 Created

idstring

The unique identifier of the return.

createdTimestring date-time

Time at which the return was created.

orderIdstring

The unique identifier of the order.

currencystring

Three-letter ISO currency code.

reasonstring

The reason for the return.

state'created' | 'accepted'

Enumeration indicating the state of the return.

livemodeboolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

metadataMetadata

Key-value pairs used to store additional data. Value can be string, boolean or integer types.

refundIdsstring[]

Example response

{
  "id": "ret_5823594809",
  "createdTime": "2018-04-25T20:36:00Z",
  "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",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "name": "John Smith",
    "phone": "952-111-1111",
    "email": "jsmith@digitalriver.com"
  },
  "metadata": {
    "coupon": "iOS"
  },
  "refundIds": [
    "ref_0848750667"
  ]
}