Add item to cart (cart decoupled)
curl --request POST \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart-decoupled/item \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '{
"cartId": "5e5818a84d030c206b2ffb02",
"userAuthToken": "JWT",
"registeredUser": false,
"items": [
{
"itemId": 1000000012,
"sample": false,
"priceListId": 1000000012,
"taxCode": "TC1234567890",
"sku": "sk231212",
"weight": 4.2,
"weightUnit": "lb",
"title": "fabric T-shirt",
"quantity": 2,
"price": {
"currency": "USD",
"base": 15.99,
"sale": 10.99,
"discount": {
"price": 10.99,
"discountAmount": 10.99,
"promosApplied": [
{}
]
}
},
"group": [
"5ddd1a156c5a5fed1e0d91fb"
],
"extra": {}
}
]
}'
{
"registeredUser": false,
"account": "<string>",
"approver": "<string>",
"po": "<string>",
"cartId": 111166,
"status": "pending",
"allPromosApplied": [
"<any>"
],
"attributes": [
"<any>"
],
"__v": 0,
"totalAmount": {
"currency": "USD",
"amount": 38
},
"quantity": 2,
"_id": "5fee9d59f2f08a1b3cbdea08",
"createdAt": "2020-12-31T02:09:53.914Z",
"updatedAt": "2020-12-31T02:09:53.914Z",
"deleted": false,
"items": [
{
"price": {
"discount": {
"discountAmount": 0,
"price": 0,
"promosApplied": [
"<any>"
]
},
"sale": 0,
"base": 19,
"currency": "USD"
},
"sample": false,
"isUnique": false,
"discountedQuantity": 0,
"group": [
"123123123123123123123123"
],
"weightUnit": "lb",
"isPickup": false,
"itemId": 15,
"sku": "sk231212",
"taxCode": "TC1234567890",
"title": "fabric t-shirt",
"weight": 4.2,
"quantity": 2,
"lineItemId": 1,
"attributeTotalPrice": 0,
"totalPrice": {
"currency": "USD",
"amount": 38
},
"attributes": [
"<any>"
],
"id": "6141a40c13f13a000876272a",
"_id": "5fee9d59f2f08a1b3cbdea08",
"createdAt": "2020-12-31T02:09:53.914Z",
"updatedAt": "2020-12-31T02:09:53.914Z"
}
]
}
The x-site-context
header is a JSON object that contains information about the source you wish to pull from. The mandatory account
is the 24 character identifier found in Copilot. The channel
(Sales channel ID), stage
(environment name), and date
attributes can be used to further narrow the scope of your data source.
"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"
Item added to cart decoupled
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart-decoupled/item \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '{
"cartId": "5e5818a84d030c206b2ffb02",
"userAuthToken": "JWT",
"registeredUser": false,
"items": [
{
"itemId": 1000000012,
"sample": false,
"priceListId": 1000000012,
"taxCode": "TC1234567890",
"sku": "sk231212",
"weight": 4.2,
"weightUnit": "lb",
"title": "fabric T-shirt",
"quantity": 2,
"price": {
"currency": "USD",
"base": 15.99,
"sale": 10.99,
"discount": {
"price": 10.99,
"discountAmount": 10.99,
"promosApplied": [
{}
]
}
},
"group": [
"5ddd1a156c5a5fed1e0d91fb"
],
"extra": {}
}
]
}'
{
"registeredUser": false,
"account": "<string>",
"approver": "<string>",
"po": "<string>",
"cartId": 111166,
"status": "pending",
"allPromosApplied": [
"<any>"
],
"attributes": [
"<any>"
],
"__v": 0,
"totalAmount": {
"currency": "USD",
"amount": 38
},
"quantity": 2,
"_id": "5fee9d59f2f08a1b3cbdea08",
"createdAt": "2020-12-31T02:09:53.914Z",
"updatedAt": "2020-12-31T02:09:53.914Z",
"deleted": false,
"items": [
{
"price": {
"discount": {
"discountAmount": 0,
"price": 0,
"promosApplied": [
"<any>"
]
},
"sale": 0,
"base": 19,
"currency": "USD"
},
"sample": false,
"isUnique": false,
"discountedQuantity": 0,
"group": [
"123123123123123123123123"
],
"weightUnit": "lb",
"isPickup": false,
"itemId": 15,
"sku": "sk231212",
"taxCode": "TC1234567890",
"title": "fabric t-shirt",
"weight": 4.2,
"quantity": 2,
"lineItemId": 1,
"attributeTotalPrice": 0,
"totalPrice": {
"currency": "USD",
"amount": 38
},
"attributes": [
"<any>"
],
"id": "6141a40c13f13a000876272a",
"_id": "5fee9d59f2f08a1b3cbdea08",
"createdAt": "2020-12-31T02:09:53.914Z",
"updatedAt": "2020-12-31T02:09:53.914Z"
}
]
}
Add item to cart (cart decoupled)
curl --request POST \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart-decoupled/item \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '{
"cartId": "5e5818a84d030c206b2ffb02",
"userAuthToken": "JWT",
"registeredUser": false,
"items": [
{
"itemId": 1000000012,
"sample": false,
"priceListId": 1000000012,
"taxCode": "TC1234567890",
"sku": "sk231212",
"weight": 4.2,
"weightUnit": "lb",
"title": "fabric T-shirt",
"quantity": 2,
"price": {
"currency": "USD",
"base": 15.99,
"sale": 10.99,
"discount": {
"price": 10.99,
"discountAmount": 10.99,
"promosApplied": [
{}
]
}
},
"group": [
"5ddd1a156c5a5fed1e0d91fb"
],
"extra": {}
}
]
}'
{
"registeredUser": false,
"account": "<string>",
"approver": "<string>",
"po": "<string>",
"cartId": 111166,
"status": "pending",
"allPromosApplied": [
"<any>"
],
"attributes": [
"<any>"
],
"__v": 0,
"totalAmount": {
"currency": "USD",
"amount": 38
},
"quantity": 2,
"_id": "5fee9d59f2f08a1b3cbdea08",
"createdAt": "2020-12-31T02:09:53.914Z",
"updatedAt": "2020-12-31T02:09:53.914Z",
"deleted": false,
"items": [
{
"price": {
"discount": {
"discountAmount": 0,
"price": 0,
"promosApplied": [
"<any>"
]
},
"sale": 0,
"base": 19,
"currency": "USD"
},
"sample": false,
"isUnique": false,
"discountedQuantity": 0,
"group": [
"123123123123123123123123"
],
"weightUnit": "lb",
"isPickup": false,
"itemId": 15,
"sku": "sk231212",
"taxCode": "TC1234567890",
"title": "fabric t-shirt",
"weight": 4.2,
"quantity": 2,
"lineItemId": 1,
"attributeTotalPrice": 0,
"totalPrice": {
"currency": "USD",
"amount": 38
},
"attributes": [
"<any>"
],
"id": "6141a40c13f13a000876272a",
"_id": "5fee9d59f2f08a1b3cbdea08",
"createdAt": "2020-12-31T02:09:53.914Z",
"updatedAt": "2020-12-31T02:09:53.914Z"
}
]
}
The x-site-context
header is a JSON object that contains information about the source you wish to pull from. The mandatory account
is the 24 character identifier found in Copilot. The channel
(Sales channel ID), stage
(environment name), and date
attributes can be used to further narrow the scope of your data source.
"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"
Item added to cart decoupled
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart-decoupled/item \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '{
"cartId": "5e5818a84d030c206b2ffb02",
"userAuthToken": "JWT",
"registeredUser": false,
"items": [
{
"itemId": 1000000012,
"sample": false,
"priceListId": 1000000012,
"taxCode": "TC1234567890",
"sku": "sk231212",
"weight": 4.2,
"weightUnit": "lb",
"title": "fabric T-shirt",
"quantity": 2,
"price": {
"currency": "USD",
"base": 15.99,
"sale": 10.99,
"discount": {
"price": 10.99,
"discountAmount": 10.99,
"promosApplied": [
{}
]
}
},
"group": [
"5ddd1a156c5a5fed1e0d91fb"
],
"extra": {}
}
]
}'
{
"registeredUser": false,
"account": "<string>",
"approver": "<string>",
"po": "<string>",
"cartId": 111166,
"status": "pending",
"allPromosApplied": [
"<any>"
],
"attributes": [
"<any>"
],
"__v": 0,
"totalAmount": {
"currency": "USD",
"amount": 38
},
"quantity": 2,
"_id": "5fee9d59f2f08a1b3cbdea08",
"createdAt": "2020-12-31T02:09:53.914Z",
"updatedAt": "2020-12-31T02:09:53.914Z",
"deleted": false,
"items": [
{
"price": {
"discount": {
"discountAmount": 0,
"price": 0,
"promosApplied": [
"<any>"
]
},
"sale": 0,
"base": 19,
"currency": "USD"
},
"sample": false,
"isUnique": false,
"discountedQuantity": 0,
"group": [
"123123123123123123123123"
],
"weightUnit": "lb",
"isPickup": false,
"itemId": 15,
"sku": "sk231212",
"taxCode": "TC1234567890",
"title": "fabric t-shirt",
"weight": 4.2,
"quantity": 2,
"lineItemId": 1,
"attributeTotalPrice": 0,
"totalPrice": {
"currency": "USD",
"amount": 38
},
"attributes": [
"<any>"
],
"id": "6141a40c13f13a000876272a",
"_id": "5fee9d59f2f08a1b3cbdea08",
"createdAt": "2020-12-31T02:09:53.914Z",
"updatedAt": "2020-12-31T02:09:53.914Z"
}
]
}