PATCH
/
api-cart
/
cart
/
{cartId}
/
empty
curl --request PATCH \
  --url https://prod01-apigw.{customer_name}.fabric.zone/api-cart/cart/{cartId}/empty \
  --header 'x-site-context: <x-site-context>'
{
  "deleted": false,
  "allPromosApplied": [
    {
      "unit": "<string>",
      "value": 123,
      "ON": {
        "kind": "SKU",
        "value": ""
      },
      "id": "<string>",
      "promoId": "<string>",
      "promoCode": "<string>"
    }
  ],
  "registeredUser": false,
  "cartId": 4,
  "totalAmmount\"": {
    "currency": "USD",
    "amount": 200
  },
  "quantity": 2,
  "__v": 0,
  "attributes": [
    {
      "price": 10,
      "_id": "6146e98408e3700008b64611",
      "attributeId": "60a77de306f682000975c24c",
      "value": "true/false",
      "name": "Gift Message",
      "type": "<string>",
      "id": "6146e98408e3700008b64611"
    }
  ],
  "account": "<string>",
  "approver": "<string>",
  "po": "<string>",
  "company": "<string>",
  "status": "pending",
  "_id": "5fee9d59f2f08a1b3cbdea08",
  "createdAt": "2020-12-31T02:09:53.914Z",
  "updatedAt": "2020-12-31T02:09:53.914Z"
}

Headers

x-site-context
string
required

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.

Example:

"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"

Path Parameters

cartId
string
required
Required string length: 24
Example:

"5e5818a84d030c206b2ffb02"

Response

200
application/json
Empty Cart

The response is of type object.