- 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
Create Special Offer
Production
Production
POST
https://api.salla.dev/admin/v2/specialoffers
Special Offers
Last modified:2025-01-20 07:25:03
Scopes
specialoffers.read_write
- Special Offers Read & WriteRequest
Authorization
Add the parameter
Authorization
to Headers,whose value is to concatenate the Token after the Bearer.Example:
Authorization: Bearer ********************
Body Params application/json
allOf {2}
optional
object
optional
name
string
required
message
string
optional
applied_channel
enum<string>
required
Allowed values:
browserbrowser_and_application
offer_type
enum<string>
required
Allowed values:
buy_x_get_ypercentagefixed_amountdiscounts_table
applied_to
enum<string>
required
Allowed values:
orderproductcategorypaymentMethod
start_date
string <date-time>
optional
expiry_date
string <date-time>
optional
min_purchase_amount
number
optional
min_items_count
number
optional
buy
object
optional
get
object
optional
object
optional
name
string
required
applied_channel
enum<string>
required
Allowed values:
browserbrowser_and_application
offer_type
enum<string>
required
Allowed value:
discounts_table
applied_to
enum<string>
required
Allowed values:
orderproductcategory
start_date
string <date-time>
optional
expiry_date
string <date-time>
required
status
enum<string>
optional
active
or inactive
Allowed values:
activeinactive
applied_with_coupon
boolean
optional
buy
object
optional
discounts_table
array [object {2}]
optional
offer_type
is discounts_table
Example
{
"name": "new offer",
"message": "Buy One Get One Free",
"applied_channel": "browser_and_application",
"offer_type": "buy_x_get_y",
"applied_to": "product",
"start_date": "2024-12-30",
"expiry_date": "2024-12-31",
"min_purchase_amount": 100,
"min_items_count": 2,
"min_items": 0,
"discounts_table": [
{
"quantity": 3,
"discount_amount": 5
},
{
"quantity": 5,
"discount_amount": 10
}
],
"buy": {
"type": "product",
"min_amount": 10,
"quantity": 1,
"products": [
401511871
]
},
"get": {
"type": "product",
"discount_type": "percentage",
"discount_amount": 5,
"quantity": 1,
"products": [
401511871
]
}
}
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 POST 'https://api.salla.dev/admin/v2/specialoffers' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "new offer",
"message": "Buy One Get One Free",
"applied_channel": "browser_and_application",
"offer_type": "buy_x_get_y",
"applied_to": "product",
"start_date": "2024-12-30",
"expiry_date": "2024-12-31",
"min_purchase_amount": 100,
"min_items_count": 2,
"min_items": 0,
"discounts_table": [
{
"quantity": 3,
"discount_amount": 5
},
{
"quantity": 5,
"discount_amount": 10
}
],
"buy": {
"type": "product",
"min_amount": 10,
"quantity": 1,
"products": [
401511871
]
},
"get": {
"type": "product",
"discount_type": "percentage",
"discount_amount": 5,
"quantity": 1,
"products": [
401511871
]
}
}'
Responses
🟢200Success
application/json
Body
status
number
optional
success
boolean
optional
data
object (SpecialOffer)
optional
id
number
required
name
string
required
message
string
required
expiry_date
string
required
Example:
2025-01-01
start_date
string
required
offer_type
enum<string>
required
Allowed values:
buy_x_get_yfixed_amountpercentagediscounts_table
status
string
required
show_price_after_discount
boolean
required
show_discounts_table_message
boolean
required
buy
object
required
get
object
required
Examples
{
"status": 200,
"success": true,
"data": {
"id": 1935541690,
"name": "new offer",
"message": "اشتري قطعة واحصل على قطعة واحدة خصم 5% من المنتجات التالية",
"start_date": "2024-12-08 16:00:00",
"expiry_date": "2025-12-10 16:00:00",
"offer_type": "buy_x_get_y",
"status": "inactive",
"show_price_after_discount": false,
"buy": {
"type": "product",
"quantity": 1,
"products": [
{
"id": 401511871,
"type": "food",
"promotion": {
"title": "Eid Alfitr Offer",
"sub_title": "Special Promotion"
},
"status": "sale",
"is_available": true,
"sku": "",
"name": "بيتزا",
"price": {
"amount": 40.25,
"currency": "SAR"
},
"sale_price": {
"amount": 0,
"currency": "SAR"
},
"currency": "SAR",
"url": "https://salla.sa/dev-wofftr4xsra5xtlv/بيتزا/p401511871",
"thumbnail": "https://cdn.salla.sa/bYQEn/hG0U3oATexBxt4j5QjMt8jcNUi12v97KFw9Q1xTA.jpg",
"has_special_price": false,
"regular_price": {
"amount": 40.25,
"currency": "SAR"
},
"calories": "500.00",
"mpn": "677156713",
"gtin": "76893972",
"favorite": "Product is Favourit"
}
]
},
"get": {
"type": "product",
"discount_type": "percentage",
"quantity": "1",
"products": []
}
}
}
🟠401Unauthorized
Modified at 2025-01-20 07:25:03