Skip to main content
POST
Add item to cart

Request

Headers

Body parameters

A storefront’s catalog type is determined by the shop type: product for ecommerce, food for restaurant, and service for business stores. Add the matching identifier (productId, foodId, or serviceId). Services behave like foods — they have no variants but can carry add-ons.

Food request example

Service request example

A service cart item is returned with itemType: "service" and a populated service object (plus a serviceId convenience field), mirroring the food shape:

Successful response

Error response

Authorizations

Authorization
string
header
required

JWT issued by the Salesive Store API for authenticated shoppers.

x-shop-id
string
header
required

Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.

Headers

x-shop-id
string

Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.

Body

application/json

Add a product/variant line item, a food line item, or a service line item, with optional add-ons. Use the identifier that matches the storefront catalog type: productId (ecommerce), foodId (restaurant), or serviceId (business).

productId
string
required

Identifier of the product to add to the cart (ecommerce stores).

foodId
string

Identifier of the food item to add to the cart (restaurant stores).

serviceId
string

Identifier of the service to add to the cart (business stores).

variantId
string

Optional identifier of the product variant to add.

quantity
integer
default:1

Quantity of the product, food, or service to add. Defaults to 1.

Required range: x >= 1
selectedAddons
object[]

Optional add-on selections for food or service items.

Response

Cart updated with the new item.

status
integer
required

HTTP status code returned by the API.

success
boolean
required

Indicates whether the request succeeded.

message
string
required

Human-readable response message.

data
object
required