- Welcome 👋
- Get Started
- Create Your First App
- Authorization
- Webhooks
- Conditional Webhooks
- Security Considerations
- Multi-Language Support
- Responses
- Pagination
- Rate Limiting
- Versioning
- Change Log
- Support
- APIs
- Orders
- Order Status
- Order Histories
- Order Tags
- Order Invoice
- Order Reservations
- Order Items
- Products
- Product Options
- Product Quantity
- Product Variants
- Product Tags
- Product Images
- Product Option Values
- Abandoned Carts
- Customer Groups
- Customers
- Digitals Product
- Categories
- Exports
- Shipments
- Shipping Companies
- Shipping Zones
- Shipping Rules
- Countries
- Product Option Templates
- Taxes
- Coupons
- Affiliates
- Order Assignment
- Special Offers
- Transactions
- Payments
- Settlements
- Settings
- Merchant
- Brands
- Reviews
- Branches
- Currencies
- SEO
- Cities
- DNS Records
- Languages
- Employees
- Advertisements
- Webhooks
- Custom URLs
- Loyalty Points
- Webhooks - Store Events
Update Coupon
Production
Production
PUT
https://api.salla.dev/admin/v2/coupons/{coupon_id}
Coupons
Last modified:2025-02-02 12:23:10
coupon_id
as a path parameter.Scopes
marketing.read_write
- Marketing Read & WriteRequest
Authorization
Add the parameter
Authorization
to Headers,whose value is to concatenate the Token after the Bearer.Example:
Authorization: Bearer ********************
Path Params
coupon_id
string
required
Body Params application/json
code
string
optional
Example:
TestCoupon001
type
enum<string>
optional
Allowed values:
PercentagepercentageFixedfixedFfPp
Example:
percentage
amount
number
optional
type
is updated.Example:
400
status
string
optional
Example:
inactive
start_date
string
optional
YYYY-MM-DD
or YYYY-MM-DD HH:MM:SS
Example:
2022-12-29
expiry_date
string
optional
start_date
variable . Supports two formats, either YYYY-MM-DD
or YYYY-MM-DD HH:MM:SS
Example:
2022-12-29
applied_in
enum<string>
optional
all
or web
or app
Allowed values:
allwebapp
Example:
all
usage_limit
number
optional
Example:
10
usage_limit_per_user
number
optional
Example:
10
minimum_amount
number
optional
Example:
10
maximum_amount
number
optional
Example:
400
free_shipping
boolean
optional
Default:
true
exclude_sale_products
boolean
optional
Default:
true
show_maximum_amount
boolean
optional
Default:
true
marketing_show_maximum_amount
boolean
optional
Default:
true
marketing_active
boolean
optional
Default:
true
marketing_name
string
optional
Example:
User Test Marketing
marketing_type
enum<string>
optional
Allowed values:
PercentagepercentageFixedfixedFfPp
Example:
Percentage
marketing_amount
number
optional
Example:
10
marketing_hide_total_sales
boolean
optional
Default:
true
marketing_maximum_amount
number
optional
Example:
20
marketing_info
string
optional
Example:
Additional Info
beneficiary_domain
string
optional
Example:
test.test
products_include
array[string]
optional
products_exclude
array[string]
optional
list_include_categories
array[string]
optional
list_exclude_categories
array[string]
optional
list_exclude_brands
array[string]
optional
list_include_groups
array[string]
optional
list_exclude_groups
array[string]
optional
list_exclude_shipping
array[string]
optional
payment_methods
array[string]
optional
Allowed values:
allapple_paybankcodcredit_cardknetmadapaypalspotii_paystc_paytabby_installmenttamara_installment
Example
{
"code": "TestCoupon001",
"type": "percentage",
"amount": 400,
"status": "inactive",
"is_apply_with_offer": true,
"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
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://api.salla.dev/admin/v2/coupons/' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "TestCoupon001",
"type": "percentage",
"amount": 400,
"status": "inactive",
"is_apply_with_offer": true,
"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"
]
}'
Responses
🟢200Success
application/json
Body
status
number
optional
success
boolean
optional
data
object (Coupon)
optional
code
string
required
Example:
AAVVC
type
enum<string>
required
Allowed values:
percentagePercentagefixedFixedfp
Example:
percentage
status
enum<string>
required
Allowed values:
activeinactivedeleted
Example:
active
is_apply_with_offer
boolean | null
optional
true
, the coupon will be applied with the created offer that has an apply with coupon option activated in the offers; otherwise, it will not be applied.amount
object
required
minimum_amount
object
required
maximum_amount
object
required
show_maximum_amount
boolean
required
Default:
false
expiry_date
string
required
YYYY-MM-DD
or YYYY-MM-DD HH:MM:SS
Example:
2022-12-31 12:59:59
start_date
string
required
YYYY-MM-DD
or YYYY-MM-DD HH:MM:SS
Example:
2022-12-28 12:59:59
free_shipping
boolean
required
Default:
true
usage_limit
number
required
Example:
89
usage_limit_per_user
number
required
Example:
88
include_product_ids
array[string]
required
exclude_product_ids
array[string]
required
is_sale_products_exclude
boolean
required
Default:
true
include_category_ids
array[string]
required
exclude_category_ids
array[string]
required
include_customer_group_ids
array[string]
required
exclude_customer_group_ids
array[string]
required
exclude_brands_ids
array[string]
required
exclude_shipping_ids
array[string]
required
include_customer_ids
array[string]
required
include_payment_methods
array[string]
required
Allowed values:
allapple_paybankcodcredit_cardknetmadapaypalspotii_paystc_paytabby_installmenttamara_installment
applied_in
enum<string>
required
all
or web
or app
Allowed values:
allwebapp
Example:
all
is_group
boolean
required
Default:
true
group_name
string | null
required
requiredif
is_group
= true
; otherwise returns null
valueExample:
Grouping1
group_coupons_count
number | null
required
requiredif
is_group
= true
; otherwise returns null
valueExample:
90
group_coupon_suffix
string | null
required
requiredif
is_group
= true
; otherwise returns null
valueExample:
xyz
group_coupons
array [object {1}]
required
requiredif
is_group
= true
; otherwise returns null
valuebeneficiary_domain
string | null
required
Example:
domain.test
statistics
object
required
Example:
domain.test
created_at
object
required
updated_at
object
required
marketing_active
boolean
required
Default:
true
marketing_name
string | null
required
requiredif
marketing_active
= true
; otherwise returns null
valueExample:
User Name
marketing_email
string | null
required
marketing_acive: true
; otherwise returns null
value.Example:
marketing_type
enum<string>
required
Allowed values:
percentagePercentagefixedFixedfp
Example:
percentage
marketing_amount
object | null
required
requiredif
marketing_active
= true
; otherwise returns null
valuemarketing_hide_total_sales
boolean | null
required
marketing_acive: true
; otherwise returns null
value.Default:
false
marketing_show_maximum_amount
boolean |