Update Coupon
PUT
/coupons/{coupon_id}This endpoint allows you to update details regarding a coupon by passing the coupon_id
as a path parameter.
Request
Coupon ID. List Coupon IDs can be found here.
Coupon Code.
Coupon Type.
Coupon Amount. Required if the variable type
is updated.
Coupon Status.
Coupon Start Date. Supports two formats, either YYYY-MM-DD
or YYYY-MM-DD HH:MM:SS
Coupon Expiry Date. The value of this variable cannot be any date before the start_date
variable . Supports two formats, either YYYY-MM-DD
or YYYY-MM-DD HH:MM:SS
Coupon to be applied at. Value can either all
or web
or app
Coupon Usage Limit.
Coupon Usage Limit Per User.
Coupon Minimum Amount.
Coupon Maximum Amount
Whether or not the coupon include free shipping
Whether or not the coupon exclude on-sale products
Whether or not to show the maximum amount of the coupon
Whether or not to show the marketing maximum amount of the coupon to the marketer
Whether or not the coupon include a marketer
Marketer Name. required-if marketing_active = true
Marketer Type. required-if marketing_active = true
Marketing Amount. required-if marketing_active = true
Whether or not hide total sales
Marketing Maximum Amount Value. required-if marketing_active = true
Marketing Additional Info
Beneficiary Email Domain
List of Included Products in the Coupon. List of products can be found here.
List of Excluded Products in the Coupon. List of products can be found here.
List of Included Categories in the Coupon. List of categories can be found here.
List of Excluded Categories. List of categories can be found here.
List of Excluded Brands. List of brands can be found here.
List of Included Customer Groups. List of customers can be found here.
List of Excluded Customer Groups. List of customers can be found here.
List of Excluded Shipping Companies. List of Shipping companies can be found here.
List of Included Payment Methods. Available payment methods can be found here.
{
"code": "TestCoupon001",
"type": "percentage",
"amount": 400,
"status": "inactive",
"start_date": "2022-12-28",
"expiry_date": "2022-12-29",
"applied_in": "all",
"usage_limit": 10,
"usage_limit_per_user": 10,
"minimum_amount": 10,
"maximum_amount": 400,
"free_shipping": true,
"exclude_sale_products": true,
"show_maximum_amount": true,
"marketing_show_maximum_amount": true,
"marketing_active": true,
"marketing_name": "User Test Marketing",
"marketing_type": "Percentage",
"marketing_amount": 10,
"marketing_hide_total_sales": true,
"marketing_maximum_amount": 20,
"marketing_info": "Additional Info",
"beneficiary_domain": "test.test",
"products_include": [
"1626467363"
],
"products_exclude": [
"213592621"
],
"list_include_categories": [
"676928739"
],
"list_exclude_categories": [
"1585249762"
],
"list_exclude_brands": [
"1939592358"
],
"list_include_groups": [
"322729604"
],
"list_exclude_groups": [
"1830458757"
],
"list_exclude_shipping": [
"1345871747"
],
"payment_methods": [
"bank",
"cod",
"credit_card",
"knet",
"mada",
"paypal",
"spotii_pay",
"stc_pay",
"tabby_installment",
"tamara_installment",
"apple_pay"
]
}
Request samples
Responses
{
"status": 200,
"success": true,
"data": {
"id": 1279613668,
"code": "TestCoupon001",
"type": "percentage",
"status": "inactive",
"amount": {
"amount": 400,
"currency": "SAR"
},
"minimum_amount": {
"amount": 10,
"currency": "SAR"
},
"maximum_amount": {
"amount": 20,
"currency": "SAR"
},
"show_maximum_amount": true,
"expiry_date": "2022-12-29 00:00:00",
"free_shipping": true,
"usage_limit": 10,
"usage_limit_per_user": 10,
"include_product_ids": [
"1626467363"
],
"exclude_product_ids": [
"213592621"
],
"is_sale_products_exclude": true,
"include_category_ids": [
"676928739"
],
"exclude_category_ids": [
"1585249762"
],
"include_customer_group_ids": [
"322729604"
],
"exclude_customer_group_ids": [
"1830458757"
],
"exclude_brands_ids": [
"1939592358"
],
"exclude_shipping_ids": [
"1345871747"
],
"include_customer_ids": [],
"include_payment_methods": [
"bank",
"cod",
"credit_card",
"knet",
"mada",
"paypal",
"spotii_pay",
"stc_pay",
"tabby_installment",
"tamara_installment",
"apple_pay"
],
"applied_in": "all",
"is_group": true,
"group_name": "Grouping",
"group_coupons_count": 90,
"group_coupon_suffix": null,
"beneficiary_domain": "test.test",
"created_at": {
"date": "2022-01-23 09:36:30.000000",
"timezone_type": 3,
"timezone": "Asia/Riyadh"
},
"updated_at": {
"date": "2022-01-23 10:17:34.000000",
"timezone_type": 3,
"timezone": "Asia/Riyadh"
},
"marketing_active": true,
"marketing_name": "Mohammed Test",
"marketing_type": "percentage",
"marketing_amount": {
"amount": 10,
"currency": "SAR"
},
"marketing_hide_total_sales": true,
"marketing_show_maximum_amount": true,
"marketing_maximum_amount": 4000,
"marketing_info": "Additional Info",
"marketing_visits_count": 0,
"marketing_url": "https://mtjr.coupons/jXvoE"
}
}