Logo
Salesforce Developers API Documentation

Add item to the cart

POST {{orgUrl}}/services/data/v{{apiVersion}}/commerce/webstores/{{webstoreId}}/carts/:cartId/cart-items

Adds a quantity of 5 items (identified by the variable productId) to the cart (identified by the variable _cartId).

 

Body PARAM

Key Datatype Required Description 
productFields
null



HEADERS

Key Datatype Required Description 
Content-Type
string




RESPONSES

status





Curl
curl -X POST '/services/data/v57.0/commerce/webstores//carts/:cartId/cart-items?productFields=' -H 'Content-Type: application/json' -d '{"productId":"productId","quantity":"5","type":"Product"}'

ENDPOINTS