Create a coupon
Create a new discount coupon for the store. Requires the WRITE_DISCOUNTS scope.
Authorizations
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
Fields accepted when creating a coupon.
Coupon code (alphanumeric only). Stored uppercase; must be unique within the store.
Discount type: fixed or percentage.
fixed, percentage Discount amount. For percentage this is a percent value; for fixed it is an amount. Must be greater than 0.
Date the coupon becomes valid (ISO 8601).
Date the coupon expires (ISO 8601). Must be on or after startDate.
Maximum total redemptions across all customers. Minimum 1. Defaults to 1.
x >= 1Maximum redemptions per customer. Minimum 1. Defaults to 1.
x >= 1Minimum order subtotal required to apply the coupon. Cannot be negative. Defaults to 0.
x >= 0Whether the coupon is active. Defaults to true.
Response
The created coupon.

