Skip to main content
POST
/
api-cart
/
cart-decoupled
/
item
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"
    }
  ]
}

Headers

x-site-context
string
required
Example:

Body

application/json
cartId
string
required
Required string length: 24
Example:
userAuthToken
string
required
Example:
registeredUser
boolean
required
Example:
items
object[]
required
Minimum length: 1

Response

deleted
boolean
Example:
items
object[]
registeredUser
boolean
Example:
account
string
approver
string
po
string
cartId
number
Example:
status
string
Example:
allPromosApplied
any[]
attributes
any[]
__v
number
Example:
totalAmount
object
quantity
number
Example:
_id
string
Example:
createdAt
string
Example:
updatedAt
string
Example: