palbaseDocs

Palbase Commerce & Promotions · API

POST/commerce/carts/{cart_id}/items

Add listing item to cart

Add listing item to cart. The quantity goes onto the cart's line of the listing, or makes one, at the listing's price. A line whose unit price the project's server set (its secret key) is a line of its own: a buyer's add never goes onto it, and a buyer who sends a price is refused (403 custom_price_forbidden). The listing's most per order and its stock count every line of it in the cart.

Called by your app, with the publishable key; or a signed-in user of your app, with their token and the publishable key; or your server, with the project's secret key.

Path

cart_idstring · requiredPath parameter cart_id.
curl
curl -X POST "https://<your-ref>.palbase.studio/commerce/carts/<cart_id>/items" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{}'

Responses

200Add listing item to cart

defaultStandard Palbase JSON error envelope (`error` and `error_description`).

Operation AddCartItem of commerce's contract.