curl --request DELETE \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart-decoupled/{cartId} \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '{
"orderNumber": "1234-1234-12345"
}'
{
"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": true,
"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"
}
]
}
Cart soft delete, add the deleted boolean flag as true and add the order number to the cart (cart decoupled)
curl --request DELETE \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart-decoupled/{cartId} \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '{
"orderNumber": "1234-1234-12345"
}'
{
"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": true,
"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\"}"
24
"5e5818a84d030c206b2ffb02"
Soft delete cart
The response is of type object
.
Was this page helpful?