Add Discount to Checkout
Authentication
Path parameters
ID of the checkout; the same as the cart ID.
Headers
Request
The complete manual-discount state to apply to the checkout.
ID of the checkout; the same as the cart ID.
The complete manual-discount state to apply to the checkout.
Adds or replaces manual discounts on an existing checkout.
Each request sets the checkout’s complete manual-discount state. The request is not additive: manual discounts from an earlier request that you omit from the new payload are removed. This endpoint does not remove coupons or automatic promotions.
Use the request body to apply:
cart.discounts[].discounted_amount. BigCommerce distributes the discount across line items based on each item’s value.cart.line_items[].id and cart.line_items[].discounted_amount.Manual discounts interact with coupons and automatic promotions as follows:
If an item-level manual discount is already applied, adding a coupon returns a 422 response with the message “Coupon {coupon_code} cannot be applied in combination with item level manual discount.” An eligible automatic promotion does not apply while an item-level manual discount exists.
The required field is discounted_amount at the order level, item level, or both.
To prevent lost updates from concurrent requests, include the optional version field in the request payload. If the provided version does not match the server’s cart version, the API returns a conflict error.
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.
The MIME type of the response body.