Getting Started
Authentication v3
- Concepts
- System Apps
- User Apps
- Authentication Endpoints
Product Catalog
- Product Catalog API - Overview
- Developer Guide
- Data Ingestion Best Practices
- Attributes & Attribute Mapping
- Categories
- Products
- Collections
- Background Jobs
- Bulk Import & Export
- Published Products
Orders
- Orders (3.0.0)
- Developer Guide
- Orders FAQ
- Shopping Lists
- Shipping Methods
- Imports
- Exports
- Orders
- Frauds
- Notifications
- Backorders Preorders
- Cancellations
- Allocations
- Shipments
- Inventory Transfers
- Tracking
- Invoices
- Payments
- Credits
- Appeasements
- Returns
Inventory
- Inventory (3.0.0)
- Inventory FAQ
- Imports
- Counters
- Inventory
- Locations
- Networks
Integrations
Offers
- Offers (3.0.0)
- Developer Guide
- Real-time Pricing Engine
- Price Lists
- Prices
- Price Types
- Price Controls
- Price Methods
- Priced Products
- Add-ons
- Promotions
- Coupons
- Coupon Codes
- Redemptions
- Product Exclusion Lists
- Segments
- Imports
- Exports
- Attributes
- Webhook Events
Carts
- Overview
- Developer Guides
- Carts
- Order Draft
- Items
- Addresses
- Payments
- Fulfillment
- Customer
- Coupons
- Validations
- Cart Orchestrator
Customers
- Customer Profile
- Customer Address
- Customer Self
Apply coupon to cart
Apply coupon to specified cart.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
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 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.
Unique request ID
Path Parameters
Cart ID
Body
Coupon to be applied or removed from cart
Response
Customer account ID
Cart configurations
true: Cart can be a guest cart, allowing users to configure a cart without logging in <br/> false: User must log in to configure a cart
true: Soft reservation is enabled. When shoppers add items to cart, fabric reserves the items in inventory. <br/> false: fabric doesn't reserve the items when added to cart.
Determines the order number generation enum <br/> AUTO - Fabric will automatically generate an order number and use it during checkout <br/> MANUAL - order number is required to be passed in to the cart journey using addOrderNumber endpoint <br/> NONE - order number isn't required for checkout.
AUTO
, MANUAL
, NONE
Determines the order number <br/> CART_ID - Use cartId
as orderNumber
<br/> FABRIC - Represents the option of allowing the merchant to configure the order number by adding a prefix, sequenceKey, or other identifier to the fabric-generated order number. <br/> EXTERNAL - Represents the option of allowing the tenant or customer to provide a custom order number, which can align with their own internal systems or processes <br/> NONE - order number isn't required for checkout
CART_ID
, FABRIC
, EXTERNAL
, NONE
Time cart was created
Currency type
Customer context
Identifies a customer
Customer type
Cart description
Errors in this cart
Inventory exception details
List of error codes
UNKNOWN_ERROR
, BAD_REQUEST
, INVALID_TOKEN
, INVALID_ACCOUNT_ID
, ACCOUNT_ID_ALREADY_EXISTS
, DEPLOYMENT_IN_PROGRESS
, INVALID_CART_ID
, CART_NOT_FOUND
, ITEM_NOT_FOUND
, UNABLE_TO_GET_CART
, UNABLE_TO_GET_INVENTORY
, ITEM_OUT_OF_STOCK
, UPDATE_CART_ERROR
, DELETE_CART_ATTRIBUTE_ERROR
, EMPTY_CART_ERROR
, UNABLE_TO_GET_PRICE
, UNABLE_TO_GET_PROMO
, UNABLE_TO_GET_ITEM
, PRICE_NOT_FOUND
, PROMO_ALREADY_APPLIED_ERROR
, CART_ALREADY_SHARED_ERROR
, PROMO_NOT_FOUND_ERROR
, PROMO_NOT_APPLICABLE_ERROR
, USER_NOT_FOUND
, ATTRIBUTE_NOT_FOUND
, INCORRECT_ATTRIBUTE_LEVEL
, INCORRECT_ATTRIBUTE_VALUE
, ITEM_ATTRIBUTE_ALREADY_EXIST
, LINE_ITEM_ID_NOT_FOUND
, ITEM_ID_NOT_APPLICABLE
, CART_STATUS_NOT_FOUND
, CART_STATUS_CANNOT_BE_UPDATED
, GUEST_CART_STATUS_CANNOT_BE_UPDATED
, CART_STATUS_ALREADY_ASSIGNED
, TOKEN_INTROSPECT_ERROR
, MAX_CARTS_LIMIT_REACHED
, INVALID_PENDING_COUNT
, ITEM_SERVICE_NOT_CONFIGURED
, ATTRIBUTE_SERVICE_NOT_CONFIGURED
, SHIP_ID_NOT_FOUND
, INVALID_DATE_RANGE
, INVALID_DATE_FORMAT
, INVALID_SEARCH_ATTRIBUTE
, BAD_CONFIGURATION
, SERVICE_NOT_ENABLED
Error detail
Item ID obtained from Product Catalog.
Line item position number (starts at 1)
x > 1
Item SKU to which the exception applies
Offers
Sales channel
Calculated price details of line items
Starting price of a single item
Cost of goods sold, from either producing or purchasing from other vendors
Currency string value
Total price of all items after all discounts. This is the unitPriceWithoutDiscounts multiplied by the quantity, less the promotion discounts.
Total price of all items without calculating discounts. This is the unitPriceWithoutDiscounts
multiplied by the quantity.
Price at which the product is offered for sale
Price type
Price of a single item without discount. This price is either the base
or sale
price. The type used is noted in the type
property.
Discounts
Actual discount amount
An identifier for an instance of the Buy-Get promotion that can be applied repeatedly. For example, consider a promotion - Buy 1 shirt and get 1 pant at a 20% off. If a shopper buys three shirts, 20% discount is individually applied to each shirt-pant pair. Each such discounted pair is assigned a unique application
number for tracking purposes.
The promotion details.
The type of discount.
PERCENTAGE_OFF
, AMOUNT_OFF
, FIXED_PRICE
ID of the group or category this product belongs to
A 24-character system-generated Promotion ID.
A flag indicating whether the promotion is always applied regardless of any exclusive promotions on the same item. Set to true
if the promotion is always applied and set to false
if the promotion isn't applied on the item by default.
A flag indicating whether the promotion is stackable. Set to true
to combine the given promotion with other promotions. The discount of the current promotion is combined with other promotions, if applicable, to the item. Set to false
if the promotion isn't stackable; the given promotion can't be combined with other promotions.
The order in which the current promotion is executed.
The name of the promotion.
The type of the promotion.
The discount in percent or amount.
The discount amount distributed proportionally among all the selected items. The distribution is determined based on each item's price relative to the total price of all participating items. Typically, proratedAmount
matches the amount
. However, there might be variations, particularly in the context of Buy-Get promotions.
This is used in conjunction with proratedAmount
to determine the discount portion allocated to the respective units of BuyGet promotions. This is applicable in partial return scenarios.
The number of items eligible for the promotional discount.
Offer type
Line item position number (starts at 1)
x > 1
Promotion exception details
List of error codes
UNKNOWN_ERROR
, BAD_REQUEST
, INVALID_TOKEN
, INVALID_ACCOUNT_ID
, ACCOUNT_ID_ALREADY_EXISTS
, DEPLOYMENT_IN_PROGRESS
, INVALID_CART_ID
, CART_NOT_FOUND
, ITEM_NOT_FOUND
, UNABLE_TO_GET_CART
, UNABLE_TO_GET_INVENTORY
, ITEM_OUT_OF_STOCK
, UPDATE_CART_ERROR
, DELETE_CART_ATTRIBUTE_ERROR
, EMPTY_CART_ERROR
, UNABLE_TO_GET_PRICE
, UNABLE_TO_GET_PROMO
, UNABLE_TO_GET_ITEM
, PRICE_NOT_FOUND
, PROMO_ALREADY_APPLIED_ERROR
, CART_ALREADY_SHARED_ERROR
, PROMO_NOT_FOUND_ERROR
, PROMO_NOT_APPLICABLE_ERROR
, USER_NOT_FOUND
, ATTRIBUTE_NOT_FOUND
, INCORRECT_ATTRIBUTE_LEVEL
, INCORRECT_ATTRIBUTE_VALUE
, ITEM_ATTRIBUTE_ALREADY_EXIST
, LINE_ITEM_ID_NOT_FOUND
, ITEM_ID_NOT_APPLICABLE
, CART_STATUS_NOT_FOUND
, CART_STATUS_CANNOT_BE_UPDATED
, GUEST_CART_STATUS_CANNOT_BE_UPDATED
, CART_STATUS_ALREADY_ASSIGNED
, TOKEN_INTROSPECT_ERROR
, MAX_CARTS_LIMIT_REACHED
, INVALID_PENDING_COUNT
, ITEM_SERVICE_NOT_CONFIGURED
, ATTRIBUTE_SERVICE_NOT_CONFIGURED
, SHIP_ID_NOT_FOUND
, INVALID_DATE_RANGE
, INVALID_DATE_FORMAT
, INVALID_SEARCH_ATTRIBUTE
, BAD_CONFIGURATION
, SERVICE_NOT_ENABLED
Error detail
Item ID obtained from Product Catalog.
Line item position number (starts at 1)
x > 1
Item SKU to which the exception applies
Fee amount
Placeholder for additional information in key:value
pairs
System-generated fee ID, in UUID format. While creating a cart or line item with fee, fabric generates this ID for the specified fee.
Attribute for which fee is applied
Fee type
Unique cart identifier
Amount by which the line item's total amount or the specified cart's total amount is adjusted
Price adjustment ID; it identifies a single price adjustment object within the price adjustments array.
Price adjustment reason
Placeholder for additional information
Time cart was created
Time cart was last updated
Sales channel
Time line item was created
Individual line item discount
Fee amount
Placeholder for additional information in key:value
pairs
System-generated fee ID, in UUID format. While creating a cart or line item with fee, fabric generates this ID for the specified fee.
Attribute for which fee is applied
Fee type
The fulfillment details.
Sales channel
The inventory response.
Maximum restock inventory quantity
Time when backorder is shipped
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.; identifies business operations location.
Merchant-defined inventory counter (also known as inventory position)
Merchant-defined inventory counter (also known as inventory position)
Time of inventory creation
Placeholder for additional info
Placeholder for additional info
Infinite inventory flag.<br />true: Inventory can be used any number of times and doesn't have any consumption limit.<br />false: Inventory can't be used infinitely, and has a consumption limit.
System-generated inventory ID. This ID is generated during inventory creation.
Merchant-defined item ID whose inventory is created or updated. If omitted, fabric Inventory service generates the itemId
. If you choose to use the itemId
in your environment, you must include it in all inventory Write requests.
Time between when an order is placed to replenish inventory and when the order is received at warehouse
Represents the warehouse or store location where the inventory is stored. It's recommended to link locationNumber
to the corresponding value in the fabric Locations service.
Inventory quantity below which consumer service wants to be alerted as low stock at the location
Code of the network to which the inventory belongs
Indicates inventory positions at network
Indicates inventory positions at network
Maximum first-shipping inventory quantity
Time when preorder is shipped
Region where inventory is managed
Reserved inventory quantity at the location
Product SKU (Stock Keeping Unit) identifier. It serves as the primary reference key for the inventory and provides uniqueness to the item.
Inventory type - a classifier attribute that provides flexibility to define inventory types
Time when inventory was last updated
ID of the vendor who will replenish the inventory for the retailer
Inventory type - a classifier attribute that provides flexibility to define inventory types
Inventory network code
Fulfillment type
Line item ID
true: Item is active<br />false: Item is inactive
true: Item is set for pickup<br />false: Item is set for delivery
Line item name
Line item position number (starts at 1)
x > 1
Individual line item price
Line item price list ID
Additional line item options
Attribute name
Attribute value
Attribute ID
Attribute description
Attribute level
Attribute mapping
Attribute price
Attribute type
Line item quantity
Shipping details
Shipping address
Address line 1
City
Country (can be full name, or ISO 3166-1 alpha-2 or alpha-3 code)
Postal or ZIP code
Region or state
Address line 2
Address line 3
Address line 4
Address recipient
Receiver's email address
Recipient's name
Address type
Alternative pickup person
Receiver's email address
Person's full name
Time shipping detail was created
Shipping details ID
true: Item is set for pickup<br />false: Item is set for delivery
Designated pickup person
Receiver's email address
Person's full name
Shipping cost
Discount amount
Shipping method ID
Shipping method name
Store ID
Shipping tax code
Shipping type
Time shipping detail was last updated
Warehouse ID
Line item SKU
Time line item was last updated
Warehouse ID
Cart name
The order number
Cart status <br/> PENDING
- Cart is in pending state <br/> DELETED
- Cart is in deleted state
PENDING
, DELETED
Total price of line items, including shipping, without discount
Suggested free products
The discount amount.
The type of discount.
The price list IDs eligible for promotion. When they're not specified, promotion applies to all price lists.
A flag indicating whether a free item is included as part of promotion. Set to true
to indicate a free item is offered as promotion and false
to indicate otherwise.
The item ID of the free product
The suggested item IDs from which shoppers can choose one or more items based on the configuration of BuyGet promotion. Even if an item ID is already in the cart, they appear in the list of potential item IDs. This ensures visibility and enables shoppers to make informed decisions during the checkout process.
The promotion ID
The promotion name
The maximum limit of complimentary items available for the BuyGet promotion. For example, consider the promotionQuantity
is 10 and promotion condition is Buy 1 pair of shoes and Get 1 pair of socks free. If a shopper purchases up to 10 pairs of shoes, they will get an equivalent number of socks for free. However, even if they buy more than 10 pairs of shoes, the maximum free pairs of socks will remain 10, as defined by the promotionQuantity
parameter.
The number of complimentary items in the promotion.
The Stock Keeping Unit (SKU) of the free product.
The suggested SKUs from which shoppers can choose one or more items based on the configuration of BuyGet promotion. Even if an SKU is already in the cart, they appear in the list of potential SKUs. This ensures visibility and enables shoppers to make informed decisions during the checkout process.
Total price of line items after discount, including shipping and shipping discount
Total discount applied to cart
Total fees applied to cart
Number of line items in the cart
Number of different (unique) line items in the cart based on line item ID
Time cart was last updated
Was this page helpful?