openapi: 3.0.1
info:
title: Cart Actions Endpoints Orders 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:
- description: These endpoints create orders, update pickup details (for BOPIS scenarios) and get order details.
name: Orders
paths:
/orders:
post:
description: This endpoint creates a new order in the fabric Orders (OMS) system, regardless of whether it originates from fabric CnC service or an external system. The response includes an order ID, which is required for subsequent calls such as updating pickup information, getting order details, verifying eligibility for order cancellations, returns, exchanges, as well as creating appeasements, and processing order returns, cancellations, and exchanges.
operationId: createOrder
parameters:
- $ref: '#/components/parameters/xFabricTenantId'
- $ref: '#/components/parameters/xFabricChannelId'
- $ref: '#/components/parameters/xFabricRequestId'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/createOrderRequest'
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/orderResponse'
description: Created
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'
'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: Create New Order
tags:
- Orders
/orders/{orderIdentifierType}/{orderIdentifierValue}/actions/update-status:
post:
tags:
- Orders
summary: Update an Order’s Status with State Transition
description: Performs a state transition on an order using the order state machine. The provided status code must correspond to a valid action available from the order’s current state. Orders that are already in or beyond the **ORDER_ALLOCATED** state cannot be updated using this endpoint.
operationId: updateOrderStatus
parameters:
- name: orderIdentifierType
in: path
description: The type of identifier used to locate the order. Supported values are `order-id`, `order-number`, and `order-external-id`.
required: true
schema:
type: string
example: ORDER0001
- name: orderIdentifierValue
in: path
description: The value of the order identifier corresponding to the specified `orderIdentifierType`.
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/orderStatusUpdateRequest'
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
'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/{orderIdentifierType}/{orderIdentifierValue}/actions/update-fees-and-taxes:
post:
tags:
- Orders
summary: Update Order Fees and Taxes
description: Recalculates and updates fee and tax totals for an existing order. The request payload allows you to provide updated fee and tax values at the order, item, and ship-to levels. Only fields included in the payload are applied. Use `overrideAllArrayFields` to control whether array fields in the payload replace the existing arrays or are merged.
operationId: updateFeesAndTaxes_1
parameters:
- name: orderIdentifierType
in: path
description: 'The type of identifier used to locate the order. Supported values: `order-id`, `order-number`, `order-external-id`.'
required: true
schema:
type: string
example: order-id
- name: orderIdentifierValue
in: path
description: The value of the order identifier that corresponds to `orderIdentifierType`.
required: true
schema:
type: string
example: 5349b4ddd2781d08c09890f4
- name: overrideAllArrayFields
in: query
description: Controls how array fields in the request body are applied. When true, arrays provided in the payload replace the existing arrays on the order. When false, array updates are merged/partially applied based on the service's update behavior.
required: false
schema:
type: boolean
default: true
example: true
- $ref: '#/components/parameters/xFabricTenantId'
- $ref: '#/components/parameters/xFabricChannelId'
- $ref: '#/components/parameters/xFabricRequestId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/updateOrderFeesAndTaxesRequest'
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
'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/{orderIdentifierType}/{orderIdentifierValue}/ship-info/{shipToId}/ship-to-address:
put:
tags:
- Orders
summary: Update a Ship-to Address for a Specific Shiptoid
description: Updates the ship-to address for a specific `shipToId` on an order. Only the address fields present in the payload are updated. If address enrichment (for example Google Maps) is configured, address validation and automatic latitude/longitude enrichment may run. If you are using Geography and Zones, the fulfillment zone is updated and a soft reservation is triggered to move inventory to the correct network.
operationId: updateShipToAddress
parameters:
- name: orderIdentifierType
in: path
description: 'The type of identifier used to locate the order. Supported values: `order-id`, `order-number`, `order-external-id`.'
required: true
schema:
type: string
example: order-id
- name: orderIdentifierValue
in: path
description: The value of the order identifier that corresponds to the `orderIdentifierType`.
required: true
schema:
type: string
example: ORDER0001
- name: shipToId
in: path
description: Unique identifier (UUID) of the ship-to location within the order (`shipInfo`).
required: true
schema:
type: string
example: b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569
- $ref: '#/components/parameters/xFabricTenantId'
- $ref: '#/components/parameters/xFabricChannelId'
- $ref: '#/components/parameters/xFabricRequestId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/updateShipToAddressRequest'
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:
type: CLIENT_ERROR
message: Order or shipToId not found
'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/{orderIdentifierType}/{orderIdentifierValue}/payments/{paymentCounter}/bill-to-address:
put:
tags:
- Orders
summary: Update Bill-to Address for a Specific Payment
description: Updates the bill-to address for a specific payment on an order, identified by `paymentCounter`. Only address fields included in the payload are updated.
operationId: updatePaymentBillToAddress
parameters:
- name: orderIdentifierType
in: path
description: 'The type of identifier used to locate the order. Supported values: `order-id`, `order-number`, `order-external-id`.'
required: true
schema:
type: string
example: order-id
- name: orderIdentifierValue
in: path
description: The value of the order identifier that corresponds to `orderIdentifierType`.
required: true
schema:
type: string
example: 5349b4ddd2781d08c09890f4
- name: paymentCounter
in: path
description: The sequential counter identifying the specific payment within the order (used to select which payment's bill-to address to update).
required: true
schema:
type: integer
format: int32
example: 1
- $ref: '#/components/parameters/xFabricTenantId'
- $ref: '#/components/parameters/xFabricChannelId'
- $ref: '#/components/parameters/xFabricRequestId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/updatePaymentBillToAddressRequest'
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:
type: CLIENT_ERROR
message: Order or payment not found
'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/{orderIdentifierType}/{orderIdentifierValue}/payments/{paymentCounter}/payment-logs:
put:
tags:
- Orders
summary: Add a Payment Log Entry for a Specific Payment
description: Adds a new payment log entry to the logs for a specific payment on an order, identified by `paymentCounter`. Payment logs capture when a payment is charged or credited, and include provider response details and metadata. Only fields present in the payload are applied.
operationId: addPaymentLog
parameters:
- name: orderIdentifierType
in: path
description: 'The type of identifier used to locate the order. Supported values: `order-id`, `order-number`, `order-external-id`.'
required: true
schema:
type: string
example: order-id
- name: orderIdentifierValue
in: path
description: The value of the order identifier that corresponds to `orderIdentifierType`.
required: true
schema:
type: string
example: 5349b4ddd2781d08c09890f4
- name: paymentCounter
in: path
description: The sequential counter identifying the specific payment within the order (used to select which payment to attach the log to).
required: true
schema:
type: integer
format: int32
example: 1
- $ref: '#/components/parameters/xFabricTenantId'
- $ref: '#/components/parameters/xFabricChannelId'
- $ref: '#/components/parameters/xFabricRequestId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/addPaymentLogRequest'
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:
type: CLIENT_ERROR
message: Order or payment not found
'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/update-attributes:
post:
tags:
- Orders
summary: Update Order Attributes by Order Identifier
description: "Updates order attributes, typically used by the integration layer to modify \nor synchronize external system–related information. \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: updateOrderAttributesByOrderIdentifier
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/orderAttributesUpdateRequest'
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
'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/actions/update-customer:
post:
description: In many scenarios, customer details may change over time. For example, a customer might change their email, phone, or company affiliation. <p> By providing the order IDs and the updated customer details, this endpoint facilitates updating customer info for the given order IDs. This ensures order-related communication reaches the customer and they get timely customer service. </p>
operationId: updateCustomerInfoInOrderList
parameters:
- $ref: '#/components/parameters/xFabricTenantId'
- $ref: '#/components/parameters/xFabricChannelId'
- $ref: '#/components/parameters/xFabricRequestId'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/updateCustomerRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/customerResponse'
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'
'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: Update Customer Details for Given Order Ids
tags:
- Orders
/orders/order-number/{orderNumber}:
get:
description: 'As a merchant, you may need to review or monitor an order to answer customer inquiries, resolve a complaint or for analytics and reporting. With this endpoint, you can get order details by order number. <p> **Note**: If you do not have the order number, use the corresponding order ID-based endpoint - `GET /orders/{orderId}`. </p>'
operationId: getOrderByNumber
parameters:
- description: Merchant-defined order identifier
example: Order-320000001
in: path
name: orderNumber
required: true
schema:
# --- truncated at 32 KB (175 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/fabric-com/refs/heads/main/openapi/fabric-com-orders-api-openapi.yml