Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.
get_api_artifactsOne API's artifacts, grouped by type.
get_openapiThe primary OpenAPI for this API.
find_similar_apisAPIs that look like this one.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/fabric-com-cancellations-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
contact:
email: support@fabric.inc
name: fabric Support Team
description: fabric **Orders** API is a scalable multi-tenant service designed to streamline your order management process. Orders API is a REST and JSON driven interface enabling retailers to create orders directly from online Storefronts and Point-of-Sale systems, and serve as records of purchase transactions to permit retailers to operate against a standard schema with varied purchase channels. <p> fabric Orders API creates orders real time in the orders database, unifying the order data for users to streamline order lifecycle orchestration and customer service operations. It offers a range of features including the ability to create orders, get orders, update pickup details, and track orders, as well as search for existing orders. Also, the Orders API makes it easy to check eligibility of return, cancel, and exchange requests as well process them, if eligible. In addition, you can flag fraudulent orders based on due diligence, and either release them from hold or cancel them altogether. The appeasement feature helps you resolve any issues that may arise with an order and keep your customers happy. </p>
license:
name: fabric API License
url: https://fabric.inc/api-license
termsOfService: https://fabric.inc/terms-of-use
title: fabric Orders Cancellations API
version: 3.0.0
x-audience: external-public
servers:
- description: Production
url: https://api.fabric.inc/v3
security:
- authorization: []
tags:
- description: These endpoints check eligibility of order cancellation requests and if eligible, processes order cancellation.
name: Cancellations
paths:
/orders/order-number/{orderNumber}/actions/cancel:
post:
description: "Cancels an order when a customer's cancellation request is determined to be eligible. \nThis endpoint processes the cancellation based on the provided **order number**. \n\n**Note:** \n- Use this endpoint only if you have the order number. \n- If you have the order ID or external order ID instead, use the corresponding \n identifier-based endpoint: `POST /orders/{orderIdType}/{orderIdValue}/actions/cancel`.\n"
operationId: cancelOrderByOrderNumber
parameters:
- description: Merchant-defined order identifier
example: 123k4h123k
in: path
name: orderNumber
required: true
schema:
type: string
- $ref: '#/components/parameters/xFabricTenantId'
- $ref: '#/components/parameters/xFabricChannelId'
- $ref: '#/components/parameters/xFabricRequestId'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/orderCancellationRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/orderResponse'
description: OK
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
'400':
content:
application/json:
example:
errors:
- message: Invalid request
type: CLIENT_ERROR
message: Bad request
type: CLIENT_ERROR
schema:
$ref: '#/components/schemas/errorResponse'
description: Bad request
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
'401':
content:
application/json:
example:
message: Unauthorized request
type: CLIENT_ERROR
schema:
$ref: '#/components/schemas/errorResponse'
description: Unauthorized
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
'404':
content:
application/json:
example:
message: Order not found
type: CLIENT_ERROR
schema:
$ref: '#/components/schemas/errorResponse'
description: Not found
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
'412':
content:
application/json:
example:
message: Order can't be cancelled as there is no line item available for cancellation
type: CLIENT_ERROR
schema:
$ref: '#/components/schemas/errorResponse'
description: Precondition failed
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
'500':
content:
application/json:
example:
message: Internal server error
type: SERVER_ERROR
schema:
$ref: '#/components/schemas/errorResponse'
description: Internal server error
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
summary: Cancel Order by Order Number
tags:
- Cancellations
/orders/order-number/{orderNumber}/actions/check-cancel-eligibility:
post:
description: 'Either customer may initiate cancellation due to an incorrect order placement or as a merchant, you may initiate cancellation due to product unavailability, pricing errors, payment failure, or shipping restrictions. Before processing cancellation, its crucial to determine the eligibility of the cancellation request. <p> This endpoint gets the eligibility of the cancellation request by order number. You can additionally specify `lineItemIds` to get the eligibility of specific line items.</p> <p> **Note**: If you do not have order number, use the corresponding order ID-based endpoint - `/orders/{orderId}/actions/check-cancel-eligibility`.</p>'
operationId: getCancelOrderEligibilityByOrderNumber
parameters:
- description: The merchant-defined order identifier.
example: 123k4h123k
in: path
name: orderNumber
required: true
schema:
type: string
- description: The merchant-defined cancellation policy. When omitted, the default policy is used.
in: query
name: policyName
required: false
schema:
type: string
- description: 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.
in: query
name: lineItemIds
required: false
schema:
items:
type: string
type: array
- $ref: '#/components/parameters/xFabricTenantId'
- $ref: '#/components/parameters/xFabricChannelId'
- $ref: '#/components/parameters/xFabricRequestId'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/eligibilityResponse'
description: OK
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
'400':
content:
application/json:
example:
errors:
- message: Invalid request
type: CLIENT_ERROR
message: Bad request
type: CLIENT_ERROR
schema:
$ref: '#/components/schemas/errorResponse'
description: Bad request
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
'401':
content:
application/json:
example:
message: Unauthorized request
type: CLIENT_ERROR
schema:
$ref: '#/components/schemas/errorResponse'
description: Unauthorized
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
'404':
content:
application/json:
example:
message: Not found
type: CLIENT_ERROR
schema:
$ref: '#/components/schemas/errorResponse'
description: Not found
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
'500':
content:
application/json:
example:
message: Internal server error
type: SERVER_ERROR
schema:
$ref: '#/components/schemas/errorResponse'
description: Internal server error
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
summary: Get Order Cancellation Eligibility by Order Number
tags:
- Cancellations
/orders/{orderIdType}/{orderIdValue}/actions/cancel:
post:
tags:
- Cancellations
summary: Cancel Order by Order Identifier
description: "Cancels an order when a customer's cancellation request is determined to be eligible. \nThis endpoint processes the cancellation based on the provided order identifier. \n\n**Note:** \n- Use this endpoint if you have the order ID, order number, or external order ID. \n- If you only have an order number, set `orderIdType` to `order-number`.\n"
operationId: cancelOrderByOrderIdentifier
parameters:
- name: orderIdType
in: path
description: "The type of order identifier used to locate the order. \nSupported values: \n- `order-id` \n- `order-number` \n- `order-external-id`\n"
required: true
schema:
type: string
enum:
- order-id
- order-number
- order-external-id
example: order-id
- name: orderIdValue
in: path
description: The value of the specified order identifier.
required: true
schema:
type: string
example: ORDER0001
- $ref: '#/components/parameters/xFabricTenantId'
- $ref: '#/components/parameters/xFabricChannelId'
- $ref: '#/components/parameters/xFabricRequestId'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/orderCancellationRequest'
required: true
responses:
'200':
description: OK
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/orderResponse'
'400':
description: Bad request
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
example:
type: CLIENT_ERROR
errorCode: SERVICE-4003
message: 'Mandatory param(s): `requiredField1` is/are missing'
errors:
- type: CLIENT_ERROR
errorCode: SERVICE-4002
message: Invalid value(s) specified for 'requiredField.field3'
errors: []
context:
service: orders
endpoint: POST /v3/orders
'401':
description: Unauthorized
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
example:
type: CLIENT_ERROR
errorCode: SERVICE-4001
message: Unauthorized request
errors: []
context:
service: orders
endpoint: POST /v3/orders/OrderId_12345
'404':
description: Not found
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
example:
message: Order not found
type: CLIENT_ERROR
'412':
description: Precondition failed
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
example:
message: Order cannot be cancelled as there is no line item available for cancellation
type: CLIENT_ERROR
'500':
description: Internal server error
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
example:
type: SERVER_ERROR
errorCode: SERVICE-5000
message: Internal server error
errors: []
context:
service: inventories
endpoint: POST /v3/inventories/actions/find-by-geography
/orders/{orderIdType}/{orderIdValue}/actions/check-cancel-eligibility:
post:
tags:
- Cancellations
summary: Check Order Cancellation Eligibility by Order Identifier
description: "Determines whether an order is eligible for cancellation. \n- Customers may initiate cancellations due to incorrect order placement. \n- Merchants may initiate cancellations due to product unavailability, pricing errors, payment failures, or shipping restrictions. \n\nYou can also specify `lineItemIds` to check cancellation eligibility for specific line items. \nIf not provided, eligibility is checked for each item in the order. \n\n**Note:** \n- Use this endpoint if you have the order ID, order number, or external order ID. \n- If you only have an order number, set `orderIdType` to `order-number`.\n"
operationId: checkCancelEligibilityByOrderIdentifier
parameters:
- name: orderIdType
in: path
description: "The type of order identifier used to locate the order. \nSupported values: \n- `order-id` \n- `order-number` \n- `order-external-id`\n"
required: true
schema:
type: string
enum:
- order-id
- order-number
- order-external-id
example: order-id
- name: orderIdValue
in: path
description: The value of the specified order identifier.
required: true
schema:
type: string
example: ORDER0001
- name: policyName
in: query
description: "The merchant-defined cancellation policy to use when evaluating eligibility. \nIf omitted, the default policy is applied.\n"
required: false
schema:
type: string
- name: lineItemIds
in: query
description: "One or more line item IDs. \n- If specified, eligibility is checked only for the given line items. \n- If omitted, eligibility is checked for each item in the order.\n"
required: false
schema:
type: array
items:
type: string
- $ref: '#/components/parameters/xFabricTenantId'
- $ref: '#/components/parameters/xFabricChannelId'
- $ref: '#/components/parameters/xFabricRequestId'
responses:
'200':
description: OK
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/eligibilityResponse'
'400':
description: Bad request
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
example:
type: CLIENT_ERROR
errorCode: SERVICE-4003
message: 'Mandatory param(s): `requiredField1` is/are missing'
errors:
- type: CLIENT_ERROR
errorCode: SERVICE-4002
message: Invalid value(s) specified for 'requiredField.field3'
errors: []
context:
service: orders
endpoint: POST /v3/orders
'401':
description: Unauthorized
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
example:
type: CLIENT_ERROR
errorCode: SERVICE-4001
message: Unauthorized request
errors: []
context:
service: orders
endpoint: POST /v3/orders/OrderId_12345
'404':
description: Not found
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
example:
message: Not found
type: CLIENT_ERROR
'500':
description: Internal server error
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
example:
type: SERVER_ERROR
errorCode: SERVICE-5000
message: Internal server error
errors: []
context:
service: inventories
endpoint: POST /v3/inventories/actions/find-by-geography
/orders/{orderId}/actions/cancel:
post:
description: 'When customers order cancellation request is determined to be eligible, this endpoint processes the cancellation by order ID. <p> **Note**: If you do not have the order number, use the corresponding order number-based endpoint - `POST /orders/order-number/{orderNumber}/actions/cancel`.</p>'
operationId: cancelOrder
parameters:
- description: 24-character system-generated order ID returned in the response of Create Order - `POST /orders` endpoint.
example: 5349b4ddd2781d08c09890f4
in: path
name: orderId
required: true
schema:
type: string
- $ref: '#/components/parameters/xFabricTenantId'
- $ref: '#/components/parameters/xFabricChannelId'
- $ref: '#/components/parameters/xFabricRequestId'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/orderCancellationRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/orderResponse'
description: OK
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
'400':
content:
application/json:
example:
errors:
- message: Invalid request
type: CLIENT_ERROR
message: Bad request
type: CLIENT_ERROR
schema:
$ref: '#/components/schemas/errorResponse'
description: Bad request
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
'401':
content:
application/json:
example:
message: Unauthorized request
type: CLIENT_ERROR
schema:
$ref: '#/components/schemas/errorResponse'
description: Unauthorized
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
'404':
content:
application/json:
example:
message: Order not found
type: CLIENT_ERROR
schema:
$ref: '#/components/schemas/errorResponse'
description: Not found
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
'412':
content:
application/json:
example:
message: Order can't be cancelled as there is no line item available for cancellation
type: CLIENT_ERROR
schema:
$ref: '#/components/schemas/errorResponse'
description: Precondition failed
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
'500':
content:
application/json:
example:
message: Internal server error
type: SERVER_ERROR
schema:
$ref: '#/components/schemas/errorResponse'
description: Internal server error
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
summary: Cancel Order by Order ID
tags:
- Cancellations
/orders/{orderId}/actions/check-cancel-eligibility:
post:
description: "Determines whether an order is eligible for cancellation. \n- Customers may initiate cancellation due to incorrect order placement. \n- Merchants may initiate cancellation due to product unavailability, pricing errors, \n payment failures, or shipping restrictions. \n\nThis endpoint checks cancellation eligibility using the **order ID**. \nYou can also specify `lineItemIds` to check eligibility for specific line items. \nIf omitted, eligibility is checked for each item in the order. \n\n**Note:** \n- Use this endpoint only if you have the order ID. \n- If you have an order number instead, use the order number–based endpoint: \n `POST /orders/order-number/{orderNumber}/actions/check-cancel-eligibility`.\n"
operationId: getCancelOrderEligibility
parameters:
- description: 24-character system-generated order ID returned in the response of Create Order - `POST /orders` endpoint.
example: 5349b4ddd2781d08c09890f4
in: path
name: orderId
required: true
schema:
type: string
- description: Merchant-defined cancellation policy. When omitted, the default policy is considered.
in: query
name: policyName
required: false
schema:
type: string
- description: 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.
in: query
name: lineItemIds
required: false
schema:
items:
type: string
type: array
- $ref: '#/components/parameters/xFabricTenantId'
- $ref: '#/components/parameters/xFabricChannelId'
- $ref: '#/components/parameters/xFabricRequestId'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/eligibilityResponse'
description: OK
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
'400':
content:
application/json:
example:
errors:
- message: Invalid request
type: CLIENT_ERROR
message: Bad request
type: CLIENT_ERROR
schema:
$ref: '#/components/schemas/errorResponse'
description: Bad request
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
'401':
content:
application/json:
example:
message: Unauthorized request
type: CLIENT_ERROR
schema:
$ref: '#/components/schemas/errorResponse'
description: Unauthorized
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
'404':
content:
application/json:
example:
message: Not found
type: CLIENT_ERROR
schema:
$ref: '#/components/schemas/errorResponse'
description: Not found
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
'500':
content:
application/json:
example:
message: Internal server error
type: SERVER_ERROR
schema:
$ref: '#/components/schemas/errorResponse'
description: Internal server error
headers:
x-fabric-request-id:
$ref: '#/components/headers/xFabricRequestIdResponseHeader'
summary: Get Order Cancellation Eligibility by Order ID
tags:
- Cancellations
components:
schemas:
cancellationResource:
description: Cancellation resource
properties:
amount:
description: Amount
example: '-20.'
format: double
type: number
amountInCurrencies:
items:
description: The total amount, itemized by each currency used within a specific order.
$ref: '#/components/schemas/amountInCurrencyResource'
type: array
attributes:
description: Custom attributes
example:
number: XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ
type: object
cancellationCounter:
description: An identifier used for cancellations.
example: 1
type: string
invoicedAmount:
description: Invoiced amount
example: '-20.'
format: double
type: number
invoicedAmountInCurrencies:
items:
description: The invoiced amount will be displayed in all currencies used for the order. If only a single currency was used, then only that currency will be shown.
$ref: '#/components/schemas/amountInCurrencyResource'
type: array
payments:
items:
$ref: '#/components/schemas/paymentReference'
type: array
reasonCode:
description: Reason code
example: Order Line Cancel
type: string
refunds:
items:
$ref: '#/components/schemas/refundDetailResource'
type: array
source:
description: An optional field used to determine the source that initiated the API request.
example: CSR
type: string
status:
description: Cancellation Status
enum:
- PROCESSING
- COMPLETED
- REJECTED
example: PROCESSING
type: string
subReasonCode:
description: Sub reason code
example: Late shipping
type: string
type: object
shippingDiscount:
description: An object containing shipping discount details.
properties:
amount:
description: Discounted amount for the given `quantity`
example: 2.99
format: double
type: number
amountInCurrencies:
items:
description: The discounted amount for the specified quantity, itemized by each currency used within the order.
$ref: '#/components/schemas/amountInCurrencyResource'
type: array
promotionCode:
description: Promotion code used by shoppers to take advantage of an ongoing promotion.
example: SHIPFREE
type: string
promotionId:
description: Unique promotion ID either from fabric Offers service or an external Offers service. When fabric Offers service is used, this is the 24-character system-generated promotion ID returned in the response of the create promotion endpoint.
example: SHIPFREE
type: string
promotionName:
description: Promotion name
example: Free Shipping
type: string
quantity:
description: Number of discounted items in an order such as `buy 2 get 1 free`. In this case `1` is the discounted quantity.
example: 1
format: int32
type: integer
unit:
description: Indicates whether the discount is in amount or percentage
example: AMOUNT_OFF
type: string
value:
description: Value corresponding to `unit`
example: 10
format: int32
type: integer
type: object
orderContactPhone:
description: Contact person's phone details.
properties:
number:
description: Contact person's phone number
example: 123-456-7890
type: string
type:
description: Contact number type
enum:
- MOBILE
- HOME
- BUSINESS
example: MOBILE
type: string
type: object
orderPaymentIdentifier:
description: An object containing the details of payment modes and payment identifiers.
properties:
cardIdentifier:
description: Last 4 digits of the card
example: '3456'
type: string
expirationMonth:
description: Card expiration month
example: '12'
type: string
expirationYear:
description: Card expiration year
example: '2029'
type: string
fabricPaymentReference:
description: System-generated UUID referenced internally for Invoice and Orders services.
example: f886c96c-5f65-11ed-9b6a-0242ac120002
type: string
paymentId:
description: Merchant provided unique identifier for a payment based on payment connector. When omitted, it is a fabric-generated UUID.
example: 62272e917b12209e68751d94
type: string
type: object
returnFeeDetail:
description: An object containing return fee details.
properties:
amount:
description: Merchant-defined return amount
example: 34.56
format: double
type: number
amountInCurrencies:
items:
$ref: '#/components/schemas/amountInCurrency'
type: array
name:
description: Fee name
example: RETURN_FEE
type: string
reason:
description: Merchant-defined return reason
example: Return fee
type: string
type:
description: Return fee type
enum:
- TAX
- DISCOUNT
- FEE
- ITEM
- ADJUSTMENT
example: FEE
type: string
type: object
orderResponse:
description: An object containing order details.
properties:
adjustmentTotal:
description: The total amount of price adjustments for all items of the order.
example: 123.45
# --- truncated at 32 KB (122 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/fabric-com/refs/heads/main/openapi/fabric-com-cancellations-api-openapi.yml