Skip to content

Add an item to the cart

POST
/api/v1/business/website/cart/items/

Adds a product (optionally a specific variant). If the same product/variant is already in the cart, the quantity is incremented instead.

Authorizations

apiKey

Your business API key (sb_live_*) — identifies which store the request is for. Required on every /api/v1/business/website/ request.

Type
API Key (header: X-Periscale-Key)
+
shopperToken

The shopper's access token from the shopper authentication endpoints. Required for cart, checkout, orders, and account actions.

Type
HTTP (bearer)

Request Body

application/json
JSON
{
  
"product_id": 0,
  
"variant_id": 0,
  
"quantity": 1,
  
"added_via": "string"
}

Responses

Item added.

application/json
JSON
{
  
"status": true,
  
"status_code": 0,
  
"message": "string",
  
"data": {
  
  
"item": "string"
  
}
}

Playground

Server
Authorization
Body

Samples

Powered by VitePress OpenAPI

© Periscale