Validate a coupon code and calculate the discount amount before applying it to an order.
| Header | Type | Description |
|---|---|---|
Content-Type | string | Always set to application/json. |
x-shop-id | string | Shop identifier to associate the user with your store. |
Authorization | string | Optional Bearer token for authenticated requests. |
| Field | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Coupon code to verify (case-insensitive). |
orderId | string | No | Order ID to validate coupon against order total. |
| Field | Type | Description |
|---|---|---|
_id | string | Unique coupon identifier. |
code | string | Coupon code. |
type | string | Coupon type: fixed or percentage. |
discount | number | Discount value (fixed amount or percentage). |
discountAmount | number | Calculated discount amount based on order subtotal. |
minimumOrderAmount | number | Minimum order amount required to use the coupon. |
startDate | string | Date when the coupon becomes active. |
endDate | string | Date when the coupon expires. |
title | string | Human-readable description of the coupon discount offer. |
JWT issued by the Salesive Store API for authenticated shoppers.
Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.
Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.