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-cart-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:
title: Cart API
description: fabric's **Cart API** lets you add, update, and remove items from your Storefront cart, either as a guest user or as a logged-in user. It also provides functionality to merge carts when you switch from guest user to logged-in user, and apply coupons and other attributes (for example, gift wrapping) to the line items. Additionally, the API supports more advanced tasks such as using multiple carts within a B2B organization, sharing carts, and supporting a unified cart experience for multi-region and multi-brand businesses.<p>The Cart API provides high performance, scalability, multi-tenancy, and configurability to the end-to-end order processing actions that start from the item being added to the cart; through the pre-checkout stage that includes billing, shipping, and payment details; to the checkout stage where the order is processed and confirmed by fabric's Order Management System (OMS)
contact:
name: Cart Support
email: support.cnc@fabric.inc
license:
name: fabric API License
url: https://fabric.inc/api-license
version: 3.0.0
servers:
- url: https://api.fabric.inc/v3
security:
- bearerAuth: []
tags:
- name: Cart
description: Cart endpoints are used to do basic cart operations, such as create a cart, add item to the corresponding cart, update items, remove items, delete cart, update status of the cart, and more.
paths:
/order-drafts:
post:
tags:
- Cart
summary: Create an Order Draft
description: Create an order using the cart ID of the cart that contains the order.
operationId: createOrderDraft
parameters:
- name: x-fabric-tenant-id
in: header
description: "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](/v3/platform/settings/account-details/getting-the-account-id). This header is required. \n"
required: true
schema:
type: string
example: 617329dfd5288b0011332311
- name: x-fabric-request-id
in: header
description: ' Unique request ID for tracking.'
required: false
schema:
type: string
example: 263e731c-45c8-11ed-b878-0242ac120002
- name: x-fabric-channel-id
in: header
description: x-fabric-channel-id identifies the sales channel through which the API request is being made; primarily for multichannel use cases. It is a required field. The default US channel is 12 while the default Canada channel is 11.
required: false
schema:
type: string
example: '12'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrderDraftRequest'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/OrderDraft'
'201':
description: Created
content:
'*/*':
schema:
$ref: '#/components/schemas/OrderDraft'
'404':
description: Cart not found
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
/carts:
post:
tags:
- Cart
summary: Create an Empty Cart
description: 'Use this endpoint to create a new cart.
**Default Configurations**: To create a cart with default configurations, send a request with an empty body.
**Provided Configurations**: To create a cart with provided configurations, include the configurations in the request body. To learn more about configuration behaviors, visit the [Configuration Behaviors](/v3/cart-and-checkout/api-reference/carts-v3/configuration-behaviors) page.
'
operationId: createCart
parameters:
- name: x-fabric-tenant-id
in: header
description: "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](/v3/platform/settings/account-details/getting-the-account-id). This header is required. \n"
required: true
schema:
type: string
example: 617329dfd5288b0011332311
- name: x-fabric-request-id
in: header
description: ' Unique request ID for tracking.'
required: false
schema:
type: string
example: 263e731c-45c8-11ed-b878-0242ac120002
- name: x-fabric-channel-id
in: header
description: x-fabric-channel-id identifies the sales channel through which the API request is being made; primarily for multichannel use cases. It is a required field. The default US channel is 12 while the default Canada channel is 11.
required: false
schema:
type: string
example: '12'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCartRequest'
required: true
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/NewCartResponse'
'400':
description: Client error
content:
application/json:
schema:
$ref: '#/components/schemas/ClientError'
/carts/{cartId}/sequence:
post:
tags:
- Cart
summary: Sequence Calling
description: "Use this endpoint to execute multiple cart-related operations with a single request. This allows you to perform various actions such as creating a cart, adding items, and checking out in a single API call.\n\n **Note:** The order of operations matters since IDs are carried over from call to call.\n\n The Cart ID from the [Create cart](/v3/cart-and-checkout/api-reference/carts-v3/carts/carts) endpoint is used in the path parameter.\n"
operationId: sequenceCall
parameters:
- name: cartId
in: path
required: true
schema:
type: string
description: The 24-character system-generated Cart ID. This ID is generated using the [Create cart](/v3/cart-and-checkout/api-reference/carts-v3/carts/carts) endpoint.
- name: x-fabric-tenant-id
in: header
description: "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](/v3/platform/settings/account-details/getting-the-account-id). This header is required. \n"
required: true
schema:
type: string
example: 617329dfd5288b0011332311
- name: x-fabric-request-id
in: header
description: ' Unique request ID for tracking.'
required: false
schema:
type: string
example: 263e731c-45c8-11ed-b878-0242ac120002
- name: x-fabric-channel-id
in: header
description: x-fabric-channel-id identifies the sales channel through which the API request is being made; primarily for multichannel use cases. It is a required field. The default US channel is 12 while the default Canada channel is 11.
required: false
schema:
type: string
example: '12'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SequenceRequest'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CartResponse'
'400':
description: Client error
content:
application/json:
schema:
$ref: '#/components/schemas/ClientError'
'404':
description: Cart not found
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
/carts/search:
post:
tags:
- Cart
summary: Search for Multiple Carts
description: Returns a list of carts based on the search criteria.
operationId: searchCart
parameters:
- name: x-fabric-tenant-id
in: header
description: "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](/v3/platform/settings/account-details/getting-the-account-id). This header is required. \n"
required: true
schema:
type: string
example: 617329dfd5288b0011332311
- name: x-fabric-request-id
in: header
description: ' Unique request ID for tracking.'
required: false
schema:
type: string
example: 263e731c-45c8-11ed-b878-0242ac120002
- name: x-fabric-channel-id
in: header
description: x-fabric-channel-id identifies the sales channel through which the API request is being made; primarily for multichannel use cases. It is a required field. The default US channel is 12 while the default Canada channel is 11.
required: false
schema:
type: string
example: '12'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SearchCartRequest'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SearchCartResponse'
'400':
description: Client error
content:
application/json:
schema:
$ref: '#/components/schemas/ClientError'
/carts/{cartId}:
get:
tags:
- Cart
summary: Get the Provided Cart
description: 'Retrieves the cart information corresponding to the provided cart ID.
The Cart ID from the [Create cart](/v3/cart-and-checkout/api-reference/carts-v3/carts/carts) endpoint is used in the path parameter.
'
operationId: getCart
parameters:
- name: cartId
in: path
required: true
schema:
type: string
description: The 24-character system-generated Cart ID. This ID is generated using the [Create cart](/v3/cart-and-checkout/api-reference/carts-v3/carts/carts) endpoint.
- name: x-fabric-tenant-id
in: header
description: "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](/v3/platform/settings/account-details/getting-the-account-id). This header is required. \n"
required: true
schema:
type: string
example: 617329dfd5288b0011332311
- name: x-fabric-request-id
in: header
description: ' Unique request ID for tracking.'
required: false
schema:
type: string
example: 263e731c-45c8-11ed-b878-0242ac120002
- name: x-fabric-channel-id
in: header
description: x-fabric-channel-id identifies the sales channel through which the API request is being made; primarily for multichannel use cases. It is a required field. The default US channel is 12 while the default Canada channel is 11.
required: false
schema:
type: string
example: '12'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CartResponse'
'400':
description: Client error
content:
application/json:
schema:
$ref: '#/components/schemas/ClientError'
'404':
description: Cart not found
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
delete:
tags:
- Cart
summary: Delete Cart
description: 'Removes the cart corresponding to the provided cart ID.
The Cart ID from the [Create cart](/v3/cart-and-checkout/api-reference/carts-v3/carts/carts) endpoint is used in the path parameter.
'
operationId: softDeleteCart
parameters:
- name: cartId
in: path
required: true
schema:
type: string
description: The 24-character system-generated Cart ID. This ID is generated using the [Create cart](/v3/cart-and-checkout/api-reference/carts-v3/carts/carts) endpoint.
- name: x-fabric-tenant-id
in: header
description: "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](/v3/platform/settings/account-details/getting-the-account-id). This header is required. \n"
required: true
schema:
type: string
example: 617329dfd5288b0011332311
- name: x-fabric-request-id
in: header
description: ' Unique request ID for tracking.'
required: false
schema:
type: string
example: 263e731c-45c8-11ed-b878-0242ac120002
- name: x-fabric-channel-id
in: header
description: x-fabric-channel-id identifies the sales channel through which the API request is being made; primarily for multichannel use cases. It is a required field. The default US channel is 12 while the default Canada channel is 11.
required: false
schema:
type: string
example: '12'
responses:
'204':
description: No Content
'400':
description: Client error
content:
application/json:
schema:
$ref: '#/components/schemas/ClientError'
'404':
description: Cart not found
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
patch:
tags:
- Cart
summary: Update Cart
description: 'Updates the cart information corresponding to the provided cart ID.
The Cart ID from the [Create cart](/v3/cart-and-checkout/api-reference/carts-v3/carts/carts) endpoint is used in the path parameter.
'
operationId: updateCart
parameters:
- name: cartId
in: path
required: true
schema:
type: string
description: The 24-character system-generated Cart ID. This ID is generated using the [Create cart](/v3/cart-and-checkout/api-reference/carts-v3/carts/carts) endpoint.
- name: x-fabric-tenant-id
in: header
description: "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](/v3/platform/settings/account-details/getting-the-account-id). This header is required. \n"
required: true
schema:
type: string
example: 617329dfd5288b0011332311
- name: x-fabric-request-id
in: header
description: ' Unique request ID for tracking.'
required: false
schema:
type: string
example: 263e731c-45c8-11ed-b878-0242ac120002
- name: x-fabric-channel-id
in: header
description: x-fabric-channel-id identifies the sales channel through which the API request is being made; primarily for multichannel use cases. It is a required field. The default US channel is 12 while the default Canada channel is 11.
required: false
schema:
type: string
example: '12'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateCartRequest'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CartResponse'
'400':
description: Client error
content:
application/json:
schema:
$ref: '#/components/schemas/ClientError'
'404':
description: Cart not found
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
/order-drafts/{orderDraftId}:
get:
tags:
- Cart
summary: Get the Order Draft by the Order Draft ID
description: Retrieves the order draft using the order ID associated with it from [Create an order draft](/v3/cart-and-checkout/api-reference/carts-v3/order-drafts/create-order-drafts) endpoint.
operationId: getOrderDraftById
parameters:
- name: orderDraftId
in: path
required: true
description: The order draft ID created with [Create an order draft](/v3/cart-and-checkout/api-reference/carts-v3/order-drafts/create-order-drafts) endpoint is used to retrieve the order draft.
schema:
type: string
- name: x-fabric-tenant-id
in: header
description: "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](/v3/platform/settings/account-details/getting-the-account-id). This header is required. \n"
required: true
schema:
type: string
example: 617329dfd5288b0011332311
- name: x-fabric-request-id
in: header
description: ' Unique request ID for tracking.'
required: false
schema:
type: string
example: 263e731c-45c8-11ed-b878-0242ac120002
- name: x-fabric-channel-id
in: header
description: x-fabric-channel-id identifies the sales channel through which the API request is being made; primarily for multichannel use cases. It is a required field. The default US channel is 12 while the default Canada channel is 11.
required: false
schema:
type: string
example: '12'
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/OrderDraft'
/order-drafts/order-number/{orderNumber}:
get:
tags:
- Cart
summary: Get the Order Draft by the Order Draft Number
description: Retrieves the order draft using the order number associated with it from [Create an order draft](/v3/cart-and-checkout/api-reference/carts-v3/order-drafts/create-order-drafts) endpoint.
operationId: getOrderDraftByOrderNumber
parameters:
- name: orderNumber
in: path
required: true
description: The order draft number created with [Create an order draft](/v3/cart-and-checkout/api-reference/carts-v3/order-drafts/create-order-drafts) endpoint is used to retrieve the order draft.
schema:
type: string
- name: x-fabric-tenant-id
in: header
description: "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](/v3/platform/settings/account-details/getting-the-account-id). This header is required. \n"
required: true
schema:
type: string
example: 617329dfd5288b0011332311
- name: x-fabric-request-id
in: header
description: ' Unique request ID for tracking.'
required: false
schema:
type: string
example: 263e731c-45c8-11ed-b878-0242ac120002
- name: x-fabric-channel-id
in: header
description: x-fabric-channel-id identifies the sales channel through which the API request is being made; primarily for multichannel use cases. It is a required field. The default US channel is 12 while the default Canada channel is 11.
required: false
schema:
type: string
example: '12'
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/OrderDraft'
/order-drafts/customer/{customerId}:
get:
tags:
- Cart
summary: Get the Order Draft by the Customer ID
description: Retrieves the order draft using the customer ID associated with it from [Create an order draft](/v3/cart-and-checkout/api-reference/carts-v3/order-drafts/create-order-drafts) endpoint.
operationId: getOrderDraftByCustomerId
parameters:
- name: customerId
in: path
description: The customer ID associated with [Create an order draft](/v3/cart-and-checkout/api-reference/carts-v3/order-drafts/create-order-drafts) endpoint is used to retrieve the order draft.
required: true
schema:
type: string
- name: x-fabric-tenant-id
in: header
description: "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](/v3/platform/settings/account-details/getting-the-account-id). This header is required. \n"
required: true
schema:
type: string
example: 617329dfd5288b0011332311
- name: x-fabric-request-id
in: header
description: ' Unique request ID for tracking.'
required: false
schema:
type: string
example: 263e731c-45c8-11ed-b878-0242ac120002
- name: x-fabric-channel-id
in: header
description: x-fabric-channel-id identifies the sales channel through which the API request is being made; primarily for multichannel use cases. It is a required field. The default US channel is 12 while the default Canada channel is 11.
required: false
schema:
type: string
example: '12'
responses:
'200':
description: OK
content:
'*/*':
schema:
type: array
items:
$ref: '#/components/schemas/OrderDraft'
components:
schemas:
InventoryConfiguration:
type: object
properties:
cacheExpiry:
type: integer
description: Duration in seconds until inventory validation data expires.
format: int64
example: 7776000
behaviors:
$ref: '#/components/schemas/InventoryBehavior'
check:
type: string
description: This setting is used to determine how you check inventory. The options are SKU or LINE_ITEM.
example: SKU
enum:
- SKU
- LINE_ITEM
description: Configuration settings related to inventory management and checks.
TaxBehaviorRequest:
type: object
properties:
cacheExpiry:
type: string
description: 'The behavior that is executed based on the selected configuration.
The default behavior is WARN.
'
example: WARN
enum:
- WARN
- NONE
description: tax behaviors
PromotionBehaviorRequest:
type: object
properties:
cacheExpiry:
type: string
description: 'The behavior that is executed based on the selected configuration.
The default behavior is WARN.
'
example: WARN
enum:
- WARN
- NONE
description: Promotion behaviors
Person:
required:
- name
type: object
properties:
name:
$ref: '#/components/schemas/Name'
email:
type: string
description: Email of the pickup person.
example: john@test.com
phone:
$ref: '#/components/schemas/Phone'
description: Name of the pickup person.
OrderDraft:
type: object
properties:
cartId:
type: string
description: The unique identifier of the cart, which is generated when the cart is created using the [Create an empty cart](/v3/cart-and-checkout/api-reference/carts-v3/carts/carts) endpoint.
example: c86f777b-1885-4ddf-961d-542ba80a69b8
order:
$ref: '#/components/schemas/OrderInfo'
attributes:
type: object
additionalProperties:
type: object
description: Custom attributes provided to the context, such as a wishlist, to provide additional information about the entity.
example:
name: wishlist
description: Custom attributes provided to the context, such as a wishlist, to provide additional information about the entity.
example:
name: wishlist
configuration:
$ref: '#/components/schemas/Configuration'
customerContext:
$ref: '#/components/schemas/CustomerContext'
status:
type: string
description: Indicates the status of the cart, which can be either ACTIVE or SOFT_DELETE.
example: ACTIVE
enum:
- ACTIVE
- SOFT_DELETE
state:
type: array
description: An array containing details about the current state of the cart.
items:
$ref: '#/components/schemas/State'
price:
$ref: '#/components/schemas/Price'
promotions:
$ref: '#/components/schemas/CartPromotionCollection'
fees:
$ref: '#/components/schemas/FeesCollection'
adjustments:
$ref: '#/components/schemas/AdjustmentCollection'
addresses:
type: object
properties:
a8577d7f0d4d4b228e857b4a2e90dc93:
$ref: '#/components/schemas/Address'
description: A map of addresses added to the corresponding cart.
lineItems:
$ref: '#/components/schemas/ItemCollection'
summary:
$ref: '#/components/schemas/SummaryResponse'
fulfillments:
type: object
properties:
d6229cdb0c5b4885b1b213b94d02488e:
$ref: '#/components/schemas/Fulfillment'
description: A map of fulfillments added to the corresponding cart.
coupons:
type: array
description: An array containing all coupons added to the corresponding cart.
items:
$ref: '#/components/schemas/Coupon'
appliedCoupons:
type: array
description: An array containing all coupons applied to the cart.
items:
$ref: '#/components/schemas/Coupon'
notAppliedCoupons:
type: array
description: An array containing any coupons that were ineligible and not applied to the cart.
items:
$ref: '#/components/schemas/Coupon'
validations:
$ref: '#/components/schemas/ValidationData'
payments:
$ref: '#/components/schemas/PaymentCollection'
channelId:
type: string
description: Channel ID
example: '12'
currency:
type: string
description: The currency that the cart will use when an order is created.
example: USD
updatedAt:
type: string
description: The date and time in UTC when the cart was last updated.
example: 2024-06-13 16:50:00.682000+00:00
createdAt:
type: string
description: The date and time when the cart was created.
example: 2024-06-13 16:50:00.682000+00:00
description: Order Draft
LineItemValidationData:
type: object
properties:
sku:
type: string
description: The SKU of the item.
example: SKU3
inventory:
$ref: '#/components/schemas/InventoryValidationData'
description: An object that contains item validation data.
Fulfillment:
type: object
properties:
id:
type: string
description: The Fulfillment ID generated when a fulfillment was created using the [Create fulfillment](/v3/cart-and-checkout/api-reference/carts-v3/fulfillment/create-fulfillments) endpoint.
example: d6229cdb-0c5b-4885-b1b2-13b94d02488e
type:
type: string
description: Determines the type of fulfillment.
example: SHIP_TO
enum:
- SHIP_TO
- BOPIS
- ROPIS
refId:
type: string
description: An alternative identifier for fulfillments, used for additional tracking or referencing.
example: '398427903843'
attributes:
type: object
description: Custom attributes to provide more context to the fulfillment, such as where it was made.
additionalProperties:
type: object
description: Custom attributes to provide more context to the fulfillment, such as where it was made.
example:
source: store
example:
source: store
originAddress:
type: string
description: The identifier of the address where the item is being fulfilled.
example: a8577d7f-0d4d-4b22-8e85-7b4a2e90dc93
destinationAddress:
type: string
description: The identifier of the address where the item is being shipped.
example: a8577d7f-0d4d-4b22-8e85-7b4a2e90dc93
locationId:
type: string
description: Unique identifier of the store.
example: CA
pickupPerson:
$ref: '#/components/schemas/PickupPerson'
price:
$ref: '#/components/schemas/ResourcePrice'
promotions:
$ref: '#/components/schemas/FulfillmentPromotionCollection'
fees:
$ref: '#/components/schemas/FeesCollection'
adjustments:
$ref: '#/components/schemas/AdjustmentCollection'
tax:
$ref: '#/components/schemas/TaxCollection'
description: A fulfillment object containing important fulfillment information.
Verifier:
type: object
properties:
type:
type: string
description: The type of verification used, such as a token.
example: TOKEN
key:
type: string
description: The key used for payment verification.
example: CH39082K439R0
description: Payment verifier
CartFilter:
type: object
properties:
status:
type: array
description: An array containing filters to customize carts by cart statuses.
example:
- ACTIVE
items:
type: string
description: An array containing filters to customize carts by cart statuses.
example: '["ACTIVE"]'
orderNumber:
type: string
description: Filter carts by order number, which was generated when [Create an order draft](/v3/cart-and-checkout/api-reference/carts-v3/carts/order-drafts) endpoint was executed.
example: '10001'
customer:
$ref: '#/components/schemas/Customer'
promotionTitles:
type: array
description: An array containing filters to
# --- truncated at 32 KB (97 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/fabric-com/refs/heads/main/openapi/fabric-com-cart-api-openapi.yml