Order Exchange - Fabric

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

Using the exchange functionality of fabric’s Orders service, the Customer Service Representatives (CSR) can exchange an order item. Exchange is essentially a return + a new item shipment, and this phase integrates the returns service with the exchange service.General Rules:

Workflow: The exchange functionality has two flows:

Exchange items are shipped when the return is received

sample curl:

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

Exchange items are shipped irrespective of the item being received

sample curl: