Coupons
Get all coupons
GET
https://plugin.tebex.io/coupons
Return a paginated list of coupons on your account.
Headers
X-Tebex-Secret
string
The secret key of a server.
Get a coupon
GET
https://plugin.tebex.io/coupons/{id}
Get a coupon by ID.
Path Parameters
id
string
The coupon ID.
Headers
X-Tebex-Secret
string
The secret key of a server.
Create a coupon
POST
https://plugin.tebex.io/coupons
Create a coupon code.
Headers
X-Tebex-Secret
string
The secret key of a server.
Request Body
code
string
The code of the coupon.
effective_on
string
What this coupon should be effective on, either "package", "category" or "cart".
packages
array
An array of package IDs this coupon should apply to. Only used if effective_on is "package".
categories
array
An array of category IDs this coupon should apply to. Only used if effective_on is "category".
discount_type
string
"percentage" or "value".
discount_amount
integer
The currency amount to discount.
discount_percentage
integer
The percentage amount to be discounted.
redeem_unlimited
boolean
Can the coupon be redeemed an unlimited amount of times.
expire_never
boolean
Should the coupon ignore the expire_date.
expire_limit
number
Only used if redeem_unlimited is false.
expire_date
string
Only used if expire_never
is false
- formatted in yyyy-mm-dd.
start_date
string
The start date of the coupon in the format of yyyy-mm-dd.
basket_type
string
"single", "subscription", or "both".
minimum
number
Minimum value of basket before the coupon can be redeemed.
discount_application_method
number
0 = Apply to each package (default), 1 = Apply to basket (before sales), 2 = Apply to basket (after sales)
username
string
The username to restrict the coupon to.
note
string
The note to store against the coupon.
Delete a coupon
DELETE
https://plugin.tebex.io/coupons/{id}
Delete a coupon.
Path Parameters
id
string
The ID of the coupon.
Headers
X-Tebex-Secret
string
The secret key of a server.
Last updated