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
[api.label.responses]
Response status code, a numeric or alphanumeric identifier used to convey the outcome or status of a request, operation, or transaction in various systems and applications, typically indicating whether the action was successful, encountered an error, or resulted in a specific condition.
Response flag, boolean indicator used to signal a particular condition or state in the response of a system or application, often representing the presence or absence of certain conditions or outcomes.
Coupon Code
Coupon Type.
Coupon Status.
Coupon amount.
The minimum coupon amount.
The maximum coupon amount.
Whether or not to show the Coupon's Maximum Amount
Coupon Expiry Date. Value MUST be at least one day later than today. Supports two formats, either YYYY-MM-DD
or YYYY-MM-DD HH:MM:SS
Coupon Start Date. Supports two formats, either YYYY-MM-DD
or YYYY-MM-DD HH:MM:SS
Whether or not to the Coupon includes Free Shipping
Coupon's Usage Limit
Coupon's Usage Limit Per User
List of included Product IDs. List of products ca be found [here]https://docs.salla.dev/api-5394168).
List of excluded Product IDs. List of products ca be found [here]https://docs.salla.dev/api-5394168).
Whether or not to exclude On-Sale Products
List of included product Category IDs. List of categories can be found [here] (https://docs.salla.dev/api-5394207)
List of included Category IDs. List of categories can be found [here] (https://docs.salla.dev/api-5394207)
List of included Customer Group IDs. List of customer groups can be found [here] (https://docs.salla.dev/api-5394129)
List of excluded Customer Group IDs. List of customer groups can be found [here] (https://docs.salla.dev/api-5394129)
List of excluded Brand IDs. List of brands can be found [here] (https://docs.salla.dev/api-5394213)
List of excluded Shipment Company IDs. Shipping companies list can be found here
List of excluded Customer IDs. List of customers can be found [here] (https://docs.salla.dev/api-5394121)
List of included Payment Methods. List of Available Payment Methods can be found here.
Coupon to be applied at. Value can either all
or web
or app
Whether or not the Coupon is part of a group of Coupons
Coupon Group Name. requiredif
is_group
= true
; otherwise returns null
value
Coupon Group Count.requiredif
is_group
= true
; otherwise returns null
value
Coupon Group Suffix. requiredif
is_group
= true
; otherwise returns null
value
Group Coupons. requiredif
is_group
= true
; otherwise returns null
value
Beneficiary’s Email Domain Name
Coupon statistics.
Date and time of creating the coupon.
Date and time of updating the coupon.
Whether or not the Marketing is active for a certain Coupon
Marketer name assoicated to the Coupon. requiredif
marketing_active
= true
; otherwise returns null
value
Marketer email assoicated to the Coupon. Value may appear if marketing_acive: true
; otherwise returns null
value.
Marketing Type. requiredif
marketing_active
= true
; otherwise returns null
value
The amount due to the marketer. requiredif
marketing_active
= true
; otherwise returns null
value
Whether or not to hide the total sales from the marketer's stastics page. Value may appear if marketing_acive: true
; otherwise returns null
value.
Whether or not to show the maximum amount of marketing amount to the marketers. Value may appear if marketing_acive: true
; otherwise returns null
value.
Marketing maximum amount. Value may appear if marketing_acive: true
; otherwise returns null
value.
Additional Notes to the Marketer. Value may appear if marketing_acive: true
; otherwise returns null
value.
Marketing Visit Counts. Value may appear if marketing_acive: true
; otherwise returns null
value.
Marketing URL. Value may appear if marketing_acive: true
; otherwise returns null
value.
Marketing Statistics URL. Value may appear if marketing_acive: true
; otherwise returns null
value.
{
"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"
}
}