POST
/
orders
/
order-number
/
{orderNumber}
/
actions
/
check-cancel-eligibility
curl --request POST \
  --url https://api.fabric.inc/v3/orders/order-number/{orderNumber}/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

orderNumber
string
required

The merchant-defined order identifier.

Query Parameters

policyName
string

The merchant-defined cancellation policy. When omitted, the default policy is used.

lineItemIds
string[]

The line item IDs. If specified, you'll get cancellation eligibility of the given line items. If omitted, you'll get cancellation eligibility of each item in the order.

Response

200
application/json
OK

Eligibility details