Check discount code validity

Public storefront endpoint. Validate discount eligibility against the checkout context before order creation. If X-Scalev-Guest-Token resolves a non-empty guest cart, the cart is used as the item source. Otherwise the request may provide direct items[] with variant IDs. Unknown or ineligible codes return a validation result with is_eligible: false; the route itself only returns 404 when the store cannot be resolved.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Store unique_id.

Body Params
string
required

Discount code to validate.

items
array of objects
length between 1 and 50

Optional direct item source. If supplied, these items are used for discount eligibility. Otherwise the guest cart referenced by X-Scalev-Guest-Token is used.

items
destination
object
string
string | null
string

Storefront payment method code selected by the buyer.

Headers
string
required

Publishable storefront public API key for the target store. Page public API keys are not accepted on Storefront public routes.

uuid

Browser-safe guest cart token returned by the first guest-cart response when no token is sent. Send it on later guest-cart and public checkout calls to keep the same cart after reloads.

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json