Adding a product to cart

POST {{api_url}}/cart/{{tenant}}/carts/{{cart_id}}/items

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 Body

{"itemYrn"=>"urn:yaas:saasag:caasproduct:product:{{tenant}};{{product_id_1}}", "price"=>{"priceId"=>"{{price_id_1}}", "originalAmount"=>2.75, "effectiveAmount"=>0.75, "currency"=>"EUR"}, "quantity"=>8}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Authorizationstring
saas-tokenstring

RESPONSES

status: Created

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