- 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 Advertisement
Production
Production
POST
https://api.salla.dev/admin/v2/advertisements
Advertisements
Last modified:2025-01-20 07:25:03
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 ********************
Body Params application/json
title
string
required
Example:
Adv Title
description
string
required
Example:
Adv Description
type
object
required
name
enum<string>
optional
Allowed values:
categorypageproductofferswithout_urlexternal_link
Example:
product
id
number
optional
type.id
variable is requiredif
type.name
is any of these values: ["category" , "page" , "product"]
Example:
1261174103
link
string | null
optional
type.link
is requiredif
type.name
is external_link
expire_date
string
required
Example:
2022-12-31
pages
array[string]
required
Allowed values:
allcartproductpaymentcategoryhome
Example
{
"title": "Adv Title",
"description": "Adv Description",
"type": {
"name": "product",
"id": 1261174103,
"link": null
},
"expire_date": "2022-12-31",
"pages": [
"all"
]
}
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/advertisements' \
--header 'Content-Type: application/json' \
--data-raw '{
"title": "Adv Title",
"description": "Adv Description",
"type": {
"name": "product",
"id": 1261174103,
"link": null
},
"expire_date": "2022-12-31",
"pages": [
"all"
]
}'
Responses
🟢200Success
application/json
Body
status
number
optional
success
boolean
optional
data
object (Advertisement)
optional
id
number
required
title
string
required
description
string
required
type
object
required
style
object
required
expire_date
object
required
pages
array[string]
required
Example
{
"status": 200,
"success": true,
"data": {
"id": 1549230938,
"title": "Adv Title",
"description": "Adv Description",
"type": {
"id": 1261174103,
"name": "product",
"link": "https://productImageLink"
},
"style": {
"icon": "sicon-bell",
"font_color": "#ffffff",
"background_color": "#9d8383"
},
"expire_date": {
"date": "2022-12-12 00:00:00.000000",
"timezone_type": 3,
"timezone": "Asia/Riyadh"
},
"pages": [
"all"
]
}
}
🟠422Error Validation
🟠401Unauthorized
Modified at 2025-01-20 07:25:03