Add Coupon to Checkout
Adds a coupon code to a checkout.
You can use multiple coupons by using this endpoint to apply one coupon at a time on your storefront. Ensure you enable the Promotion Settings in your control panel to allow for multiple coupons per order.
You cannot add a coupon when an item-level manual discount is already applied. The API returns a 422 response with the message “Coupon {coupon_code} cannot be applied in combination with item level manual discount.”
Required Fields
- coupon_code
Limits
- Coupon codes have a 50-character limit.
To prevent lost updates due to concurrent requests overriding changes made by others, it is recommended to enable optimistic concurrency control by including the version field in the request payload. If the provided version does not match the version on the server, a conflict error will be returned, which the client can handle accordingly.
Authentication
OAuth scopes
Authentication header
Further reading
For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.
For more about BigCommerce OAuth scopes, see our Guide to API Accounts.
For a list of API status codes, see API Status Codes.
Path parameters
ID of the checkout; the same as the cart ID.
Headers
The MIME type of the response body.
Request
Coupon codes have a 50-character limit.
The cart version that you expect to apply the updates. If the provided version doesn’t match the current cart version, you will receive a conflict error. This field is optional; if not provided, optimistic concurrency control will not apply.