POST
/
orders
/
{orderId}
/
actions
/
submit-return-request
curl --request POST \
  --url https://api.fabric.inc/v3/orders/{orderId}/actions/submit-return-request \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-fabric-channel-id: <x-fabric-channel-id>' \
  --header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
  --data '{
  "attributes": {
    "fraudCheckSessionId": "59f1d2b88de74aef96d3ec900ad548e0",
    "fraudStatus": "FRAUD_PASS"
  },
  "credits": [
    {
      "amount": 21.5,
      "attributes": {
        "giftCardNumber": "XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ"
      },
      "currency": "USD",
      "employeeId": "12312232",
      "note": "Credit request initiated",
      "paymentCounter": 1,
      "policyCode": "RC1",
      "reasonCode": "EC",
      "source": "CSR",
      "subReasonCode": "ACC",
      "type": "GIFT_CARD"
    }
  ],
  "employeeId": "62272e917b12209e68751d94",
  "fees": [
    {
      "amount": 34.56,
      "name": "RETURN_FEE",
      "reason": "Return fee",
      "type": "FEE"
    }
  ],
  "isExchange": false,
  "items": [
    {
      "exchange": {
        "isRefundingDisabled": true,
        "items": [
          {
            "initiateReshipment": true,
            "itemId": 1234,
            "itemUnitPrice": 10,
            "quantity": 10,
            "sku": "P1234"
          }
        ],
        "refund": {
          "amount": 34.56,
          "conversion": 1,
          "currency": "USD"
        }
      },
      "fees": [
        {
          "amount": 34.56,
          "name": "RETURN_FEE",
          "reason": "Return fee",
          "type": "FEE"
        }
      ],
      "isPolicyOverride": true,
      "orderLineItemId": "1",
      "quantity": 1,
      "reasonCode": "Incorrect order",
      "refundAmount": 21.5,
      "refunds": [
        {
          "amount": 34.56,
          "name": "RETURN_FEE",
          "reason": "Return fee",
          "type": "FEE"
        }
      ],
      "returnType": "RECEIVED",
      "scannedAt": "2022-07-11T15:03:14.642Z",
      "shipmentId": "62b37697c67b204dd18a7465",
      "shipmentLineId": "12",
      "subReasonCode": "Incorrect specification"
    }
  ],
  "reasonCode": "Incorrect item",
  "refunds": [
    {
      "amount": 34.56,
      "name": "RETURN_FEE",
      "reason": "Return fee",
      "type": "FEE"
    }
  ],
  "returnedAt": "2022-07-11T15:03:14.642Z",
  "source": "CSR",
  "totalRefundAmount": 21.5
}'
{
  "items": [
    {
      "lineItemId": "62f3dfc438bcab1951be0a19",
      "policyCode": "policyCode",
      "refundAmount": 21.5,
      "returnQuantity": 2,
      "returnStatus": "VALID"
    }
  ],
  "refundStatus": "REFUND_INITIATED",
  "totalRefundAmount": 21.5
}

Authorizations

Authorization
string
header
required

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

Headers

x-fabric-tenant-id
string
required

A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.

x-fabric-channel-id
string
required

x-fabric-channel-id identifies the sales channel where the API request is being made; primarily for multichannel use cases. The channel ids are 12 corresponding to US and 13 corresponding to Canada. The default channel id is 12. This field is required.

x-fabric-request-id
string

Unique request ID

Path Parameters

orderId
string
required

24-character system-generated order ID returned in the response of Create Order - POST /orders endpoint.

Body

application/json

Return request

items
object[]
required

Item details

Return details of item

source
string
required

Merchant-defined source from where the return request was initiated. There are no pre-defined values; possible values are Customer Service Representative (CSR), point-of-sale (POS), etc.

Example:

"CSR"

attributes
object

Merchant-defined custom attributes. This is a placeholder for additional info in key: value pairs

Example:
{
  "fraudCheckSessionId": "59f1d2b88de74aef96d3ec900ad548e0",
  "fraudStatus": "FRAUD_PASS"
}
credits
object[]

Request for credits

employeeId
string

Employee (ID or name) who initiated the request

Example:

"62272e917b12209e68751d94"

fees
object[]

Return fee details

isExchange
boolean
default:false

true: Return includes one or more exchanges. false: Only returns, no exchange.

Example:

false

reasonCode
string

Merchant-defined reason code for return

Example:

"Incorrect item"

refunds
object[]

Return fee details

returnedAt
string

Merchant-defined time for return (UTC)

Example:

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

totalRefundAmount
number

Merchant-defined total refund amount

Example:

21.5

Response

201
application/json
Return request accepted

Details of returned order

items
object[]

Item details

Return details

refundStatus
enum<string>

Refund status

Available options:
REFUND_INITIATED,
REFUND_SUCCESS,
REFUND_FAILURE,
REFUND_PENDING
Example:

"REFUND_INITIATED"

totalRefundAmount
number

Merchant-defined total refund amount

Example:

21.5

Was this page helpful?