Add to cart
POST/api/v1/loyalty/shop/:email/cart/add
Add a product to the loyalty shopping cart.
This will reserve the coin price, and subtract the coin price from the available coins.
The coin price will be immutable when a product is added to the cart. This means that coin price changes will not affect products already in the loyalty shopping cart.
To prevent people from exploiting this mechanism to circumvent inflation, use the loyalty shopping cart timeout setting, so items in the shopping cart will have a time-to-live.
Another option is to set the loyalty shopping cart timeout setting to 'never', and empty the loyalty shopping cart manually when a contact's shopping session expires. This can be done by using the DELETE Empty cart endpoint.
An error response will be returned if the request would exceed limits set by the 'Maximum products in cart' and/or 'Maximum total coin price in cart' loyalty settings.
Request
Responses
- 200
- 400
- 401
- 404
- 429
Ok
Invalid request
Invalid credentials
Contact not found
Rate limit exceeded