POST
/
orders
/
{orderId}
/
actions
/
check-cancel-eligibility
curl --request POST \
  --url https://api.fabric.inc/v3/orders/{orderId}/actions/check-cancel-eligibility \
  --header 'Authorization: Bearer <token>' \
  --header 'x-fabric-channel-id: <x-fabric-channel-id>' \
  --header 'x-fabric-tenant-id: <x-fabric-tenant-id>'
{
  "eligibleReasonCodes": [
    {
      "code": "1DMG",
      "description": "Damaged"
    }
  ],
  "fees": [
    {
      "amount": 33.9,
      "currency": "USD",
      "platinumFee": 33.9
    }
  ],
  "items": [
    {
      "eligibleQuantity": 10,
      "isEligible": true,
      "lineItemId": "62f3dfc438bcab1951be0a19",
      "sku": "P1234"
    }
  ],
  "orderId": "62f3982438bcab1951be0a19",
  "period": "30D00H00M",
  "policyType": "Company Policy 2023"
}

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.

Query Parameters

policyName
string

Merchant-defined cancellation policy. When omitted, the default policy is considered.

lineItemIds
string[]

Line item IDs. If specified, gets eligibility of exchange for the given line items. If omitted, gets eligibility of exchange for each item in the order.

Response

200
application/json
OK

Eligibility details