Coupons
All endpoints related to Coupons
Supported Endpoints
getAllCoupons(): Returns a list of all the coupons created.getCoupon(id): Retrieves a coupon by the entered ID.createCoupon(fields): Creates a coupon and returns the created coupon.updateCoupon(id, fields): Updates a coupon by the entered ID.deleteCoupon(id): Deletes a coupon by the entered ID.
getAllCoupons()
getAllCoupons()getCoupon()
getCoupon()id
string
✔️
ID of a Coupon
createCoupon()
createCoupon()fields
object
✔️
Coupon's field
code
string
✔️
The coupon code the customer enters during checkout.
type
string
✔️
This can be either "PERCENTAGE" or "AMOUNT".
discount
string
✔️
The discount value in percentage or cents.
limit
int/null
❌
The maximum amount of times a coupon code can be used, across all customers.
store_wide
boolean
✔️
Whether the coupon applies to all products within your store or not.
expires_at
string/null
❌
The coupon's expiry date. (format: YY-MM-DD HH-MM-SS)
updateCoupon()
updateCoupon()id
string
✔️
ID of the coupon you want to update
fields
object
✔️
Coupon's field
code
string
✔️
The coupon code the customer enters during checkout.
type
string
✔️
This can be either "PERCENTAGE" or "AMOUNT".
discount
string
✔️
The discount value in percentage or cents.
limit
int/null
❌
The maximum amount of times a coupon code can be used, across all customers.
store_wide
boolean
✔️
Whether the coupon applies to all products within your store or not.
expires_at
string/null
❌
The coupon's expiry date. (format: YY-MM-DD HH-MM-SS)
deleteCoupon()
deleteCoupon()id
string
✔️
ID of a Coupon
Last updated