BigCommerce
Management API
Checkout Discounts

Checkouts

Add Discount to Checkout

POST /checkouts/{checkoutId}/discounts

Request

Adds a discount to an existing checkout.

This discount only applies to line_items. When you call this API, you clear out all existing discounts applied to line items, including product and order-based discounts.

This endpoint splits the discount between line items based on the item value.

Required Fields

  • discounted_amount

Authentication

  • X-Auth-Token in header - required

Parameters

  • store_hash in path - string
  • checkoutId in path - string - required

    ID of the checkout; the same as the cart ID.

  • Accept in header with default of application/json - string - required

    The MIME type of the response body.

  • Content-Type in header with default of application/json - string - required

    The MIME type of the request body.

Body

object | application/json
  • cart
    object

example

Response

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example

Did you find what you were looking for?