POST
/
order
/
returns
curl --request POST \
  --url https://prod01.oms.fabric.inc/api/v2/order/returns \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'tenant-key: <tenant-key>' \
  --header 'x-site-context: <x-site-context>' \
  --data '{
  "orderId": "62b37697c67b204dd18a7465",
  "returnTimeStamp": "2022-07-11T15:03:14.642Z",
  "employeeId": "8a7465",
  "source": "CSR",
  "items": [
    {
      "returnType": "RECEIVED",
      "orderLineItemId": "<string>",
      "shipmentId": "<string>",
      "shipmentLineId": "<string>",
      "quantity": 1,
      "scanTimeStamp": "2022-07-11T15:03:14.642Z",
      "reasonCode": "reasonCode",
      "subReasonCode": "subReasonCode",
      "policyOveride": true,
      "returnAmount": 100,
      "fees": [
        {
          "type": "tax",
          "value": 34.56,
          "quantity": 12,
          "refundAmount": 10.4
        }
      ],
      "exchange": {
        "disableRefunding": true,
        "refund": {
          "amount": 40,
          "currency": "USD",
          "conversion": 1
        },
        "items": [
          {
            "itemId": "1234",
            "sku": "P1234",
            "quantity": 10,
            "itemUnitPrice": 10,
            "initiateReshipment": true
          }
        ]
      }
    }
  ],
  "attributes": "\"attributes\": {\n     *     \"additionalProp1\": {},\n     *     \"additionalProp2\": {},\n     *     \"additionalProp3\": {}\n     *   }",
  "exchange": true
}'
{
  "refundStatus": "REFUND_INITIATED",
  "totalRefund": 123,
  "items": [
    {
      "returnStatus": "VALID",
      "policyCode": "policyCode",
      "lineItemId": "32221112",
      "returnQuantity": 2,
      "refundAmount": 100
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

tenant-key
string
required
x-site-context
string
required

The x-site-context header is a JSON object that contains information about the source you wish to pull from. The mandatory account is the 24 character identifier found in Copilot. The channel (Sales channel ID), stage (environment name), and date attributes can be used to further narrow the scope of your data source.

Example:

"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"

Body

application/json

ReturnOrder Model

orderId
string
required
Example:

"62b37697c67b204dd18a7465"

returnTimeStamp
string
required
Example:

"2022-07-11T15:03:14.642Z"

employeeId
string
required
Example:

"8a7465"

source
string
required
Example:

"CSR"

items
object[]
required

ReturnItem Model

attributes
object
Example:

"\"attributes\": {\n * \"additionalProp1\": {},\n * \"additionalProp2\": {},\n * \"additionalProp3\": {}\n * }"

exchange
boolean

Response

201
application/json
Return request accepted

ReturnOrderResponse Model

refundStatus
enum<string>
Available options:
REFUND_INITIATED,
REFUND_SUCCESS,
REFUND_FAILURE,
REFUND_PENDING
totalRefund
number
items
object[]

ReturnItemResponse Model