Light Mode
Update Coupon
PUT
/coupons/{coupon_id}Last modified: 25 days ago
This endpoint allows you to update details regarding a coupon by passing the coupon_id
as a path parameter.
Request
Path Params
coupon_id
string
required
Coupon ID. List Coupon IDs can be found here.
Body Params application/json
No schema defined
Example
{
"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
Success(200)
Not Found(404)
Error Validation(422)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
No schema defined
Example
{
"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"
}
}
Last modified: 25 days ago