curl --request POST \
--url https://api.fabric.inc/v3/carts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '
{
"name": "cart_it",
"description": "IT department cart",
"lineItems": [
{
"itemId": "<unknown>",
"quantity": 1,
"sku": "16B2GS8LD5FDS",
"priceListId": 100000,
"attributes": {
"productFamily": "Laptop computers"
},
"fulfillment": {
"type": "WEB_SDD",
"networkCode": "ShipToHome",
"channelId": "12",
"inventoryType": "availableToPurchase"
},
"fees": [
{
"feeId": "73bc09d0-874a-4c3d-84d0-df1670d03578",
"name": "gift",
"type": "gift_wrap",
"amount": 10.5,
"attributes": {
"from": "sam"
}
}
]
}
],
"configuration": {
"allowAnonymousUser": true,
"orderNumberSource": "CART_ID",
"isSoftReservationEnabled": false,
"orderSequence": {
"sequenceName": "ORDER_NUMBER",
"sequenceKey": "LOCATE"
},
"orderNumberGeneration": "NONE"
},
"customerContext": {
"id": "d7e78a21-bee3-4448-bf1c-d5b5461dbda2",
"type": "EMPLOYEE",
"attributes": {
"isAdmin": false
},
"segments": [
[
{
"name": "category",
"value": [
"GOLD",
"YELLOW"
]
}
]
]
}
}
'{
"id": "c695af14-5e33-402c-9d8d-71edcf4856a8",
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z",
"name": "cart_it",
"description": "IT department cart",
"lineItems": [
{
"id": "12gved0f-7645-40cb-y7b0-167f8bggdb3z",
"itemId": "<unknown>",
"position": 1,
"name": "Varnet Garden Light Kit",
"sku": "16B2GS8LD5FDS",
"productAttributes": [
{
"name": "gift wrapping (small)",
"value": "true",
"attributeId": "60c2a358eb2ec30008ae70a1",
"description": "Gift wrapping for a small package",
"mapping": "ITEM",
"type": "GIFT",
"price": 10,
"level": "order"
}
],
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z",
"quantity": 15,
"priceListId": 108674,
"isActive": true,
"price": "<unknown>",
"discounts": [
"<unknown>"
],
"groups": [
"61d38e117162b7dba69c3d6d"
],
"attributes": {
"productFamily": "Laptop computers"
},
"channel": "12",
"isPickup": true,
"warehouseId": "XYZ-1234",
"shippingDetails": {
"id": "fef78121-bee3-4448-bf1c-d5b5461dbda2",
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z",
"address": {
"addressLine1": "123 Main St.",
"city": "Seattle",
"region": "WA",
"country": "USA",
"postalCode": "98121",
"addressLine2": "Suite 100",
"addressLine3": "Seventh floor",
"addressLine4": "Attention: Pat E. Kake",
"attention": "Billing manager",
"email": "[email protected]",
"type": "shipping",
"name": "Pat E Kake",
"phone": {
"number": "123-456-7899",
"type": "MOBILE"
}
},
"type": "SHIP_TO_ADDRESS",
"taxCode": "FR1000",
"isPickup": true,
"altPickupPerson": {
"name": "Pat E Kake",
"phone": {
"number": "123-456-7899",
"type": "MOBILE"
},
"email": "[email protected]"
},
"pickupPerson": {
"name": "Pat E Kake",
"phone": {
"number": "123-456-7899",
"type": "MOBILE"
},
"email": "[email protected]"
},
"warehouseId": "XYZ-1234",
"storeId": "ABC-123",
"shippingCost": 150.25,
"shippingMethodId": "dfsae-2d32113-32lpdd",
"shippingDiscount": 150.25,
"shippingMethodName": "Express Delivery"
},
"fulfillment": {
"type": "WEB_SDD",
"networkCode": "ShipToHome",
"channelId": "12",
"inventoryType": "availableToPurchase",
"inventory": {
"inventoryId": "723910d81723",
"sku": "SKU1",
"itemId": 12345,
"locationNumber": 12345,
"region": "North America",
"channelId": "channel_xyz",
"vendorId": "vendor1",
"createdAt": "2022-08-01T18:03:28.483971941Z",
"updatedAt": "2022-08-01T20:03:28.483971941Z",
"leadTime": "5 days",
"type": "primary",
"hasInfiniteInventory": false,
"backorderShipmentAt": "2022-08-01T20:03:28.483971941Z",
"preorderShipmentAt": "2022-08-01T20:03:28.483971941Z",
"backorderLimit": 50,
"preorderLimit": 40,
"safetyStock": 10,
"lowStock": 10,
"networkCode": "ShipToHome",
"counters": {
"onHand": 100,
"allocated": 10,
"shipped": 20
},
"customAttributes": {
"isBopis": true
},
"networkCounters": {
"softReserve": 10
},
"virtualCounters": {
"availableToPurchase": 60
}
}
},
"fees": [
{
"feeId": "73bc09d0-874a-4c3d-84d0-df1670d03578",
"name": "gift",
"type": "gift_wrap",
"amount": 10.5,
"attributes": {
"from": "sam"
}
}
],
"adjustments": [
{
"id": "c695af14-5e33-402c-9d8d-71edcf4856a8",
"amount": 60.5,
"reason": "CSR Adjustment",
"attributes": {
"productFamily": "Laptop computers"
},
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z"
}
]
}
],
"totalItems": 3,
"totalUniqueItems": 2,
"status": "PENDING",
"accountId": "5f689caa4216e7000750d1ef",
"configuration": {
"allowAnonymousUser": true,
"orderNumberSource": "CART_ID",
"isSoftReservationEnabled": false,
"orderSequence": {
"sequenceName": "ORDER_NUMBER",
"sequenceKey": "LOCATE"
},
"orderNumberGeneration": "NONE"
},
"customerContext": {
"id": "d7e78a21-bee3-4448-bf1c-d5b5461dbda2",
"type": "EMPLOYEE",
"attributes": {
"isAdmin": false
},
"segments": [
[
{
"name": "category",
"value": [
"GOLD",
"YELLOW"
]
}
]
]
},
"totalAmount": 10,
"totalDiscount": 10,
"totalFees": 10,
"subTotal": 10,
"currency": "USD",
"attributes": {
"approver": "620d8896058edb0009385311"
},
"appliedDiscounts": [
{
"promotionId": "6197ec46e836ff000952c665",
"promotionName": "Buy shoes get socks for free",
"couponCode": "SUPERCOUPON20",
"type": "COUPON",
"amount": 105.15
}
],
"fees": [
{
"feeId": "73bc09d0-874a-4c3d-84d0-df1670d03578",
"name": "gift",
"type": "gift_wrap",
"amount": 10.5,
"attributes": {
"from": "sam"
}
}
],
"suggestedProducts": [
{
"promotionId": "6197ec46e836ff000952c665",
"promotionName": "Buy shoes get socks for free",
"itemId": 234343,
"itemIds": [
500001
],
"sku": "SHOE1234",
"skus": [
"SHOE-4"
],
"eligiblePriceLists": [
1000
],
"quantity": 2,
"promotionQuantity": 10,
"isFree": true,
"discountType": "PERCENTAGE_OFF",
"amount": 100.15
}
],
"orderNumber": "121213",
"error": {
"prices": [
{
"price": {
"sale": 1000.15,
"cost": 900.15,
"base": 2000.15,
"unitPriceWithoutDiscounts": 2000.15,
"lineTotalWithoutDiscounts": 2000.15,
"lineTotalWithDiscounts": 2000.15,
"type": "BASE"
},
"channel": "12",
"kind": "PROMOTION",
"position": 1,
"discounts": [
{
"amount": 100.15,
"quantity": 1,
"proratedAmount": 100.15,
"proratedQuantity": 1,
"application": 1,
"promotion": {
"id": "6197ec46e836ff000952d668",
"value": 2000.15,
"groupId": "61a6354d0d70e30009415f16",
"level": 1,
"isStackable": true,
"isAlwaysApplied": true,
"name": "20% OFF",
"type": "Coupon",
"discountType": "AMOUNT_OFF"
}
}
]
}
],
"promotionErrors": [
{
"code": "UNKNOWN_ERROR",
"detail": "Item is out of stock",
"itemId": 1730902008,
"sku": "16B2GS8LD5FDS",
"position": 1
}
],
"inventoryErrors": [
{
"code": "UNKNOWN_ERROR",
"detail": "Item is out of stock",
"itemId": 1730902008,
"sku": "16B2GS8LD5FDS",
"position": 1
}
]
}
}Create a cart with items.
curl --request POST \
--url https://api.fabric.inc/v3/carts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '
{
"name": "cart_it",
"description": "IT department cart",
"lineItems": [
{
"itemId": "<unknown>",
"quantity": 1,
"sku": "16B2GS8LD5FDS",
"priceListId": 100000,
"attributes": {
"productFamily": "Laptop computers"
},
"fulfillment": {
"type": "WEB_SDD",
"networkCode": "ShipToHome",
"channelId": "12",
"inventoryType": "availableToPurchase"
},
"fees": [
{
"feeId": "73bc09d0-874a-4c3d-84d0-df1670d03578",
"name": "gift",
"type": "gift_wrap",
"amount": 10.5,
"attributes": {
"from": "sam"
}
}
]
}
],
"configuration": {
"allowAnonymousUser": true,
"orderNumberSource": "CART_ID",
"isSoftReservationEnabled": false,
"orderSequence": {
"sequenceName": "ORDER_NUMBER",
"sequenceKey": "LOCATE"
},
"orderNumberGeneration": "NONE"
},
"customerContext": {
"id": "d7e78a21-bee3-4448-bf1c-d5b5461dbda2",
"type": "EMPLOYEE",
"attributes": {
"isAdmin": false
},
"segments": [
[
{
"name": "category",
"value": [
"GOLD",
"YELLOW"
]
}
]
]
}
}
'{
"id": "c695af14-5e33-402c-9d8d-71edcf4856a8",
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z",
"name": "cart_it",
"description": "IT department cart",
"lineItems": [
{
"id": "12gved0f-7645-40cb-y7b0-167f8bggdb3z",
"itemId": "<unknown>",
"position": 1,
"name": "Varnet Garden Light Kit",
"sku": "16B2GS8LD5FDS",
"productAttributes": [
{
"name": "gift wrapping (small)",
"value": "true",
"attributeId": "60c2a358eb2ec30008ae70a1",
"description": "Gift wrapping for a small package",
"mapping": "ITEM",
"type": "GIFT",
"price": 10,
"level": "order"
}
],
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z",
"quantity": 15,
"priceListId": 108674,
"isActive": true,
"price": "<unknown>",
"discounts": [
"<unknown>"
],
"groups": [
"61d38e117162b7dba69c3d6d"
],
"attributes": {
"productFamily": "Laptop computers"
},
"channel": "12",
"isPickup": true,
"warehouseId": "XYZ-1234",
"shippingDetails": {
"id": "fef78121-bee3-4448-bf1c-d5b5461dbda2",
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z",
"address": {
"addressLine1": "123 Main St.",
"city": "Seattle",
"region": "WA",
"country": "USA",
"postalCode": "98121",
"addressLine2": "Suite 100",
"addressLine3": "Seventh floor",
"addressLine4": "Attention: Pat E. Kake",
"attention": "Billing manager",
"email": "[email protected]",
"type": "shipping",
"name": "Pat E Kake",
"phone": {
"number": "123-456-7899",
"type": "MOBILE"
}
},
"type": "SHIP_TO_ADDRESS",
"taxCode": "FR1000",
"isPickup": true,
"altPickupPerson": {
"name": "Pat E Kake",
"phone": {
"number": "123-456-7899",
"type": "MOBILE"
},
"email": "[email protected]"
},
"pickupPerson": {
"name": "Pat E Kake",
"phone": {
"number": "123-456-7899",
"type": "MOBILE"
},
"email": "[email protected]"
},
"warehouseId": "XYZ-1234",
"storeId": "ABC-123",
"shippingCost": 150.25,
"shippingMethodId": "dfsae-2d32113-32lpdd",
"shippingDiscount": 150.25,
"shippingMethodName": "Express Delivery"
},
"fulfillment": {
"type": "WEB_SDD",
"networkCode": "ShipToHome",
"channelId": "12",
"inventoryType": "availableToPurchase",
"inventory": {
"inventoryId": "723910d81723",
"sku": "SKU1",
"itemId": 12345,
"locationNumber": 12345,
"region": "North America",
"channelId": "channel_xyz",
"vendorId": "vendor1",
"createdAt": "2022-08-01T18:03:28.483971941Z",
"updatedAt": "2022-08-01T20:03:28.483971941Z",
"leadTime": "5 days",
"type": "primary",
"hasInfiniteInventory": false,
"backorderShipmentAt": "2022-08-01T20:03:28.483971941Z",
"preorderShipmentAt": "2022-08-01T20:03:28.483971941Z",
"backorderLimit": 50,
"preorderLimit": 40,
"safetyStock": 10,
"lowStock": 10,
"networkCode": "ShipToHome",
"counters": {
"onHand": 100,
"allocated": 10,
"shipped": 20
},
"customAttributes": {
"isBopis": true
},
"networkCounters": {
"softReserve": 10
},
"virtualCounters": {
"availableToPurchase": 60
}
}
},
"fees": [
{
"feeId": "73bc09d0-874a-4c3d-84d0-df1670d03578",
"name": "gift",
"type": "gift_wrap",
"amount": 10.5,
"attributes": {
"from": "sam"
}
}
],
"adjustments": [
{
"id": "c695af14-5e33-402c-9d8d-71edcf4856a8",
"amount": 60.5,
"reason": "CSR Adjustment",
"attributes": {
"productFamily": "Laptop computers"
},
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z"
}
]
}
],
"totalItems": 3,
"totalUniqueItems": 2,
"status": "PENDING",
"accountId": "5f689caa4216e7000750d1ef",
"configuration": {
"allowAnonymousUser": true,
"orderNumberSource": "CART_ID",
"isSoftReservationEnabled": false,
"orderSequence": {
"sequenceName": "ORDER_NUMBER",
"sequenceKey": "LOCATE"
},
"orderNumberGeneration": "NONE"
},
"customerContext": {
"id": "d7e78a21-bee3-4448-bf1c-d5b5461dbda2",
"type": "EMPLOYEE",
"attributes": {
"isAdmin": false
},
"segments": [
[
{
"name": "category",
"value": [
"GOLD",
"YELLOW"
]
}
]
]
},
"totalAmount": 10,
"totalDiscount": 10,
"totalFees": 10,
"subTotal": 10,
"currency": "USD",
"attributes": {
"approver": "620d8896058edb0009385311"
},
"appliedDiscounts": [
{
"promotionId": "6197ec46e836ff000952c665",
"promotionName": "Buy shoes get socks for free",
"couponCode": "SUPERCOUPON20",
"type": "COUPON",
"amount": 105.15
}
],
"fees": [
{
"feeId": "73bc09d0-874a-4c3d-84d0-df1670d03578",
"name": "gift",
"type": "gift_wrap",
"amount": 10.5,
"attributes": {
"from": "sam"
}
}
],
"suggestedProducts": [
{
"promotionId": "6197ec46e836ff000952c665",
"promotionName": "Buy shoes get socks for free",
"itemId": 234343,
"itemIds": [
500001
],
"sku": "SHOE1234",
"skus": [
"SHOE-4"
],
"eligiblePriceLists": [
1000
],
"quantity": 2,
"promotionQuantity": 10,
"isFree": true,
"discountType": "PERCENTAGE_OFF",
"amount": 100.15
}
],
"orderNumber": "121213",
"error": {
"prices": [
{
"price": {
"sale": 1000.15,
"cost": 900.15,
"base": 2000.15,
"unitPriceWithoutDiscounts": 2000.15,
"lineTotalWithoutDiscounts": 2000.15,
"lineTotalWithDiscounts": 2000.15,
"type": "BASE"
},
"channel": "12",
"kind": "PROMOTION",
"position": 1,
"discounts": [
{
"amount": 100.15,
"quantity": 1,
"proratedAmount": 100.15,
"proratedQuantity": 1,
"application": 1,
"promotion": {
"id": "6197ec46e836ff000952d668",
"value": 2000.15,
"groupId": "61a6354d0d70e30009415f16",
"level": 1,
"isStackable": true,
"isAlwaysApplied": true,
"name": "20% OFF",
"type": "Coupon",
"discountType": "AMOUNT_OFF"
}
}
]
}
],
"promotionErrors": [
{
"code": "UNKNOWN_ERROR",
"detail": "Item is out of stock",
"itemId": 1730902008,
"sku": "16B2GS8LD5FDS",
"position": 1
}
],
"inventoryErrors": [
{
"code": "UNKNOWN_ERROR",
"detail": "Item is out of stock",
"itemId": 1730902008,
"sku": "16B2GS8LD5FDS",
"position": 1
}
]
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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
Request body for creating and adding items to the cart
Line items (with details) to add to cart
Cart name
"cart_it"
Cart description
"IT department cart"
Line items to add to cart
Show child attributes
Number of line items in cart
1
Item SKU
"16B2GS8LD5FDS"
Item price list ID
100000
Fulfillment request details
Show child attributes
Fulfillment type
"WEB_SDD"
Inventory network code
"ShipToHome"
Sales channel
"12"
Inventory type - a classifier attribute that provides flexibility to define inventory types
"availableToPurchase"
Show child attributes
System-generated fee ID, in UUID format. While creating a cart or line item with fee, fabric generates this ID for the specified fee.
"73bc09d0-874a-4c3d-84d0-df1670d03578"
Attribute for which fee is applied
"gift"
Fee type
"gift_wrap"
Fee amount
10.5
Cart configurations Cart configurations
Show child attributes
true: Cart can be a guest cart, allowing users to configure a cart without logging in
false: User must log in to configure a cart
Determines the order number
CART_ID - Use cartId as orderNumber
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.
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
NONE - order number isn't required for checkout
CART_ID, FABRIC, EXTERNAL, NONE true: Soft reservation is enabled. When shoppers add items to cart, fabric reserves the items in inventory.
false: fabric doesn't reserve the items when added to cart.
Determines the order number generation enum
AUTO - Fabric will automatically generate an order number and use it during checkout
MANUAL - order number is required to be passed in to the cart journey using addOrderNumber endpoint
NONE - order number isn't required for checkout.
AUTO, MANUAL, NONE Customer context Customer context of a cart
Show child attributes
Identifies a customer
"d7e78a21-bee3-4448-bf1c-d5b5461dbda2"
Customer type
"EMPLOYEE"
Created
Unique cart identifier
"c695af14-5e33-402c-9d8d-71edcf4856a8"
Time cart was created
"2022-09-06T14:07:17.000Z"
Time cart was last updated
"2022-09-06T14:07:17.000Z"
Cart name
"cart_it"
Cart description
"IT department cart"
Show child attributes
Line item ID
"12gved0f-7645-40cb-y7b0-167f8bggdb3z"
Line item position number (starts at 1)
x >= 11
Line item name
"Varnet Garden Light Kit"
Line item SKU
"16B2GS8LD5FDS"
Additional line item options
Show child attributes
Attribute name
"gift wrapping (small)"
Attribute value
"true"
Attribute ID
"60c2a358eb2ec30008ae70a1"
Attribute description
"Gift wrapping for a small package"
Attribute mapping
"ITEM"
Attribute type
"GIFT"
Attribute price
10
Attribute level
"order"
Time line item was created
"2022-09-06T14:07:17.000Z"
Time line item was last updated
"2022-09-06T14:07:17.000Z"
Line item quantity
15
Line item price list ID
108674
true: Item is active
false: Item is inactive
true
Individual line item price
Individual line item discount
Group or category ID to which line item belongs
Sales channel
"12"
true: Item is set for pickup
false: Item is set for delivery
true
Warehouse ID
"XYZ-1234"
Shipping details
Show child attributes
Shipping details ID
"fef78121-bee3-4448-bf1c-d5b5461dbda2"
Time shipping detail was created
"2022-09-06T14:07:17.000Z"
Time shipping detail was last updated
"2022-09-06T14:07:17.000Z"
Shipping address
Show child attributes
Address line 1
"123 Main St."
City
"Seattle"
Region or state
"WA"
Country (can be full name, or ISO 3166-1 alpha-2 or alpha-3 code)
"USA"
Postal or ZIP code
"98121"
Address line 2
"Suite 100"
Address line 3
"Seventh floor"
Address line 4
"Attention: Pat E. Kake"
Address recipient
"Billing manager"
Receiver's email address
Address type
"shipping"
Recipient's name
"Pat E Kake"
Shipping type
"SHIP_TO_ADDRESS"
Shipping tax code
"FR1000"
true: Item is set for pickup
false: Item is set for delivery
true
Alternative pickup person
Show child attributes
Person's full name
"Pat E Kake"
Receiver's email address
Designated pickup person
Show child attributes
Person's full name
"Pat E Kake"
Receiver's email address
Warehouse ID
"XYZ-1234"
Store ID
"ABC-123"
Shipping cost
150.25
Shipping method ID
"dfsae-2d32113-32lpdd"
Discount amount
150.25
Shipping method name
"Express Delivery"
The fulfillment details. Fulfillment details
Show child attributes
Fulfillment type
"WEB_SDD"
Inventory network code
"ShipToHome"
Sales channel
"12"
Inventory type - a classifier attribute that provides flexibility to define inventory types
"availableToPurchase"
The inventory response.
Show child attributes
System-generated inventory ID. This ID is generated during inventory creation.
"723910d81723"
Product SKU (Stock Keeping Unit) identifier. It serves as the primary reference key for the inventory and provides uniqueness to the item.
"SKU1"
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.
12345
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.
12345
Region where inventory is managed
"North America"
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.
"channel_xyz"
ID of the vendor who will replenish the inventory for the retailer
"vendor1"
Time of inventory creation
"2022-08-01T18:03:28.483971941Z"
Time when inventory was last updated
"2022-08-01T20:03:28.483971941Z"
Time between when an order is placed to replenish inventory and when the order is received at warehouse
"5 days"
Inventory type - a classifier attribute that provides flexibility to define inventory types
"primary"
Infinite inventory flag.
true: Inventory can be used any number of times and doesn't have any consumption limit.
false: Inventory can't be used infinitely, and has a consumption limit.
false
Time when backorder is shipped
"2022-08-01T20:03:28.483971941Z"
Time when preorder is shipped
"2022-08-01T20:03:28.483971941Z"
Maximum restock inventory quantity
50
Maximum first-shipping inventory quantity
40
Reserved inventory quantity at the location
10
Inventory quantity below which consumer service wants to be alerted as low stock at the location
10
Code of the network to which the inventory belongs
"ShipToHome"
Merchant-defined inventory counter (also known as inventory position)
Show child attributes
Merchant-defined inventory counter (also known as inventory position)
{
"onHand": 100,
"allocated": 10,
"shipped": 20
}Show child attributes
System-generated fee ID, in UUID format. While creating a cart or line item with fee, fabric generates this ID for the specified fee.
"73bc09d0-874a-4c3d-84d0-df1670d03578"
Attribute for which fee is applied
"gift"
Fee type
"gift_wrap"
Fee amount
10.5
Show child attributes
Price adjustment ID; it identifies a single price adjustment object within the price adjustments array.
"c695af14-5e33-402c-9d8d-71edcf4856a8"
Amount by which the line item's total amount or the specified cart's total amount is adjusted
60.5
Price adjustment reason
"CSR Adjustment"
Time cart was created
"2022-09-06T14:07:17.000Z"
Time cart was last updated
"2022-09-06T14:07:17.000Z"
Number of line items in the cart
3
Number of different (unique) line items in the cart based on line item ID
2
Cart status
PENDING - Cart is in pending state
DELETED - Cart is in deleted state
PENDING, DELETED "PENDING"
Customer account ID
"5f689caa4216e7000750d1ef"
Cart configurations Cart configurations
Show child attributes
true: Cart can be a guest cart, allowing users to configure a cart without logging in
false: User must log in to configure a cart
Determines the order number
CART_ID - Use cartId as orderNumber
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.
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
NONE - order number isn't required for checkout
CART_ID, FABRIC, EXTERNAL, NONE true: Soft reservation is enabled. When shoppers add items to cart, fabric reserves the items in inventory.
false: fabric doesn't reserve the items when added to cart.
Determines the order number generation enum
AUTO - Fabric will automatically generate an order number and use it during checkout
MANUAL - order number is required to be passed in to the cart journey using addOrderNumber endpoint
NONE - order number isn't required for checkout.
AUTO, MANUAL, NONE Customer context Customer context of a cart
Show child attributes
Identifies a customer
"d7e78a21-bee3-4448-bf1c-d5b5461dbda2"
Customer type
"EMPLOYEE"
Total price of line items after discount, including shipping and shipping discount
10
Total discount applied to cart
10
Total fees applied to cart
10
Total price of line items, including shipping, without discount
10
Currency type
"USD"
Applied discounts
Show child attributes
Promotion ID
"6197ec46e836ff000952c664"
Coupon code
"SUPERCOUPON20"
Promotion name
"20% off"
Promotion type
"COUPON"
Discount amount
10.15
Show child attributes
System-generated fee ID, in UUID format. While creating a cart or line item with fee, fabric generates this ID for the specified fee.
"73bc09d0-874a-4c3d-84d0-df1670d03578"
Attribute for which fee is applied
"gift"
Fee type
"gift_wrap"
Fee amount
10.5
Suggested free products
Show child attributes
The promotion ID
"6197ec46e836ff000952c665"
The promotion name
"Buy shoes get socks for free"
The item ID of the free product
234343
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 item ID of the free product.
The Stock Keeping Unit (SKU) of the free product.
"SHOE1234"
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.
The Stock Keeping Unit (SKU) of the free product.
The price list IDs eligible for promotion. When they're not specified, promotion applies to all price lists.
The price list ID.
The number of complimentary items in the promotion.
2
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.
10
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 type of discount.
"PERCENTAGE_OFF"
The discount amount.
100.15
The order number
"121213"
Errors in this cart
Show child attributes
Offers
Show child attributes
Calculated price details of line items
Show child attributes
Price at which the product is offered for sale
1000.15
Cost of goods sold, from either producing or purchasing from other vendors
900.15
Starting price of a single item
2000.15
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.
2000.15
Total price of all items without calculating discounts. This is the unitPriceWithoutDiscounts multiplied by the quantity.
5000.15
Total price of all items after all discounts. This is the unitPriceWithoutDiscounts multiplied by the quantity, less the promotion discounts.
5000.15
Price type
"BASE"
Currency string value
"USD"
{
"sale": 1000.15,
"cost": 900.15,
"base": 2000.15,
"unitPriceWithoutDiscounts": 2000.15,
"lineTotalWithoutDiscounts": 2000.15,
"lineTotalWithDiscounts": 2000.15,
"type": "BASE"
}Sales channel
"12"
Offer type
"PROMOTION"
Line item position number (starts at 1)
x >= 11
Discounts
Show child attributes
Actual discount amount
1000.15
The number of items eligible for the promotional discount.
5
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.
1000.15
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.
5
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.
1
The promotion details.
Show child attributes
A 24-character system-generated Promotion ID.
"6197ec46e836ff000952c667"
The discount in percent or amount.
2000.15
ID of the group or category this product belongs to
"61a6354d0d70e30009415f16"
The order in which the current promotion is executed.
1
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.
true
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.
true
The name of the promotion.
"20% off"
The type of the promotion.
"COUPON"
The type of discount.
PERCENTAGE_OFF, AMOUNT_OFF, FIXED_PRICE "PERCENTAGE_OFF"
{
"id": "6197ec46e836ff000952c668",
"value": 2000.15,
"groupId": "61a6354d0d70e30009415f16",
"level": 1,
"isStackable": true,
"isAlwaysApplied": true,
"name": "20% OFF",
"type": "Coupon",
"discountType": "AMOUNT_OFF"
}Promotion exception details
Show child attributes
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 "UNKNOWN_ERROR"
Error detail
"Item is out of stock"
Item ID obtained from Product Catalog.
1730902008
Item SKU to which the exception applies
"16B2GS8LD5FDS"
Line item position number (starts at 1)
x >= 11
Inventory exception details
Show child attributes
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 "UNKNOWN_ERROR"
Error detail
"Item is out of stock"
Item ID obtained from Product Catalog.
1730902008
Item SKU to which the exception applies
"16B2GS8LD5FDS"
Line item position number (starts at 1)
x >= 11
Was this page helpful?