Light Mode
Create Special Offer
POST
/specialoffersLast modified:Â a month ago
This endpoint allows you to create a new special offer in the store.
Request
Body Params application/json
No schema defined
Example
{
"name": "new offer",
"applied_channel": "browser_and_application",
"offer_type": "buy_x_get_y",
"applied_to": "product",
"expiry_date": "2024-06-15",
"min_purchase_amount": 100,
"min_items_count": 2,
"min_items": 0,
"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
Responses
Success(200)
HTTP Code:Â 200
Content Type :Â JSONapplication/json
Data Schema
No schema defined
Example
Example Example | `offer_type = buy_x_get_y`
{
"status": 200,
"success": true,
"data": {
"id": 1935541690,
"name": "new offer",
"message": "اشتري قطعة واØصل على قطعة واØدة خصم 5% من المنتجات التالية",
"expiry_date": "0000-00-00 00:00:00",
"start_date": null,
"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": null,
"sub_title": null
},
"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": null,
"gtin": null,
"favorite": null
}
]
},
"get": {
"type": "product",
"discount_type": "percentage",
"quantity": "1",
"products": []
}
}
}
Last modified: a month ago