Adding a product to cart Copy
POST {{api-url}}/cart/{{tenant}}/carts/{{cartId}}/items?siteCode=main
Adds a product to the specified cart and creates a cart item.
Required scopes
cart.cart_manage
Note: Only required if the
access_token
used to authorize the request and thecustomerId
passed in the query parameter belong to different customers.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
siteCode | string | (Required) Site’s unique identifier. A site is a specific shop. |
If the tenant owns only one shop, the value should be set to main
.
|
Request Body
{"itemYrn"=>"{{productYrn}}", "price"=>{"priceId"=>"{{priceId}}", "effectiveAmount"=>1, "originalAmount"=>1, "currency"=>"EUR"}, "quantity"=>6}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: Created
{"itemId":"{cartItemId}","yrn":"{cartItemYrn}"}