Skip to navigation

Update Cart

View as Markdown

Applies a promotion code, or removes it when promotion_code is an empty string. A code that cannot be applied is rejected with 422 and the cart is left unchanged.

Keys: public key or secret key.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

identitystring
The identity for the active workspace.

Headers

channelstringRequired
cart-tokenstringRequired

The token returned when the cart was created. Treat it as a secret: never put it in a URL or a log.

Request

This endpoint expects an object.
promotion_codestringRequired<=50 characters
Code to apply. Send an empty string to remove the current code.

Response

Successfully updated cart
statusboolean

Always true on success.

messagestring

Human-readable outcome.

dataobject

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
404
Not Found Error
422
Unprocessable Entity Error