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 the customerId passed in the query parameter belong to different customers.

Request Params

KeyDatatypeRequiredDescription
siteCodestring(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

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: Created

{"itemId":"{cartItemId}","yrn":"{cartItemYrn}"}