Skip to main content
POST
Create a coupon
Creates a coupon; the code is uppercased automatically and must be unique within the store. The owning store and user are set server-side — never send a shop id.

Authorizations

Authorization
string
header
required

Installed-app access token (prefix app_), issued by the OAuth install flow. The store is bound to the token server-side — never send a shop id.

Body

application/json

Fields accepted when creating a coupon.

code
string
required

Coupon code (alphanumeric only). Stored uppercase; must be unique within the store.

type
enum<string>
required

Discount type: fixed or percentage.

Available options:
fixed,
percentage
discount
number
required

Discount amount. For percentage this is a percent value; for fixed it is an amount. Must be greater than 0.

startDate
string<date-time>
required

Date the coupon becomes valid (ISO 8601).

endDate
string<date-time>
required

Date the coupon expires (ISO 8601). Must be on or after startDate.

usageLimit
integer
default:1

Maximum total redemptions across all customers. Minimum 1. Defaults to 1.

Required range: x >= 1
usagePerUser
integer
default:1

Maximum redemptions per customer. Minimum 1. Defaults to 1.

Required range: x >= 1
minimumOrderAmount
number
default:0

Minimum order subtotal required to apply the coupon. Cannot be negative. Defaults to 0.

Required range: x >= 0
active
boolean
default:true

Whether the coupon is active. Defaults to true.

Response

The created coupon.

Standard Salesive response envelope. The operation-specific payload is carried in data.

status
integer
required

HTTP status code, echoed in the body.

success
boolean
required

Whether the request succeeded.

message
string
required

Human-readable result message.

data
object

A store-scoped discount coupon.