# Promotions
Promotions are a way to attract customers by offering them benefits when they spend or buy a certain number or value of menu items. Promotions can be limited to a certain date period, time period during the day, certain weekdays, and even order types.
# The Promotion Object
# Sample
{
"id": "8f81cf82",
"name": "Weekend Promotion",
"name_localized": null,
"type": 1,
"from_date": "2000-03-07",
"to_date": "2010-06-03",
"from_time": 0,
"to_time": 23,
"is_sat": true,
"is_sun": true,
"is_mon": true,
"is_tue": true,
"is_wed": true,
"is_thu": true,
"is_fri": true,
"is_active": true,
"include_modifiers": true,
"target_quantity": 2,
"reward_quantity": 3,
"reward_type": 1,
"reward_amount": 3,
"maximum_discount_amount": 30,
"products": [
{
"id": "8f7bdd7f"
}
],
"product_tags": [
{
"id": "8f7b9527",
"pivot": {
"promotion_id": "8f81cf82",
"product_tag_id": "8f7b9527"
}
}
],
"combos": [
{
"id": "8f7bef38",
"pivot": {
"promotion_id": "8f81cf82",
"combo_id": "8f7bef38"
}
}
],
"categories": [
{
"id": "8f7ab8c9",
"pivot": {
"promotion_id": "8f81cf82",
"category_id": "8f7ab8c9"
}
}
],
"branches": [
{
"id": "8f7ab00a"
}
],
"customer_tags": [
{
"id": "8f7b9371",
"pivot": {
"promotion_id": "8f81cf82",
"customer_tag_id": "8f7b9371"
}
},
{
"id": "8f7b937b",
"pivot": {
"promotion_id": "8f81cf82",
"customer_tag_id": "8f7b937b"
}
}
],
"reward_products": [
{
"id": "8f7bb4f5"
}
],
"reward_product_tags": [
{
"id": "8f7b9527",
"pivot": {
"promotion_id": "8f81cf82",
"product_tag_id": "8f7b9527"
}
}
],
"reward_combos": [
{
"id": "8f7be85a",
"pivot": {
"promotion_id": "8f81cf82",
"combo_id": "8f7be85a"
}
}
],
"reward_categories": [
{
"id": "8f7ab8de",
"pivot": {
"promotion_id": "8f81cf82",
"category_id": "8f7ab8de-"
}
}
],
"created_at": "2019-02-24 11:43:28",
"updated_at": "2019-02-24 11:43:28",
"deleted_at": null
}
# Attributes
| Field | Type | Rule | Description |
|---|---|---|---|
id | string | Unique identifier for the promotion. | |
name* | string | updatable | Name of the promotion. |
name_localized | string | nullable updatable | Localized name of the promotion. |
is_active | boolean | updatable | True if the promotion is active. |
type* | integer | updatable | The Promotion Type. |
condition_type | integer | updatable | The Promotion Condition Type. |
from_date* | string | updatable | The starting date of the promotion. |
to_date* | string | updatable | The last date of the promotion. |
is_sat | boolean | updatable | True if the promotion can be used on Saturday. |
is_sun | boolean | updatable | True if the promotion can be used on Sunday. |
is_mon | boolean | updatable | True if the promotion can be used on Monday. |
is_tue | boolean | updatable | True if the promotion can be used on Tuesday. |
is_wed | boolean | updatable | True if the promotion can be used on Wednesday. |
is_thu | boolean | updatable | True if the promotion can be used on Thursday. |
is_fri | boolean | updatable | True if the promotion can be used on Friday. |
from_time* | string | updatable | The starting time of the promotion each day. |
to_time* | string | updatable | The ending time of the promotion each day. |
priority | integer | updatable | Defines the priority of the promotion in case there are multiple active promotions applied on the same object (e.g. same product) Higher number means higher priority, the promotion with higher priority will be applied |
product_tags | array | updatable includable | The Product Tag objects attached to the promotion. |
products | array | updatable includable | List of Product objects that the promotion can be applied on. |
combos | array | updatable includable | List of Combo objects that the promotion can be applied on. |
branches | array | updatable includable | List of Branch objects that the promotion can be applied in. |
tags | array | updatable includable | List of Tag objects attached to the promotion. |
categories | array | updatable includable | List of Category objects that the promotion can be applied on. |
customer_tags | array | updatable | List of Customer Tag objects that the promotion can be applied on. |
order_types* | array | updatable | List of Orders types that the promotion applies on |
include_modifiers | boolean | updatable | Determines if promotion is also applied on modifiers or not |
target_quantity | integer | updatable | The target quantity/spending for the promotion to be applicable. |
reward_quantity | integer | updatable | The quantity the reward can be applied on. |
maximum_discount_amount* | double | updatable | If the reward is a percentage discount, this attribute sets the maximum value this discount can provide. |
reward_products | array | updatable includable | The products offered as a reward in the promotion |
reward_product_tags | array | updatable includable | The tags of the products offered as a reward in the promotion |
reward_categories | array | updatable includable | The categories that are included in the promotion rewards |
reward_combos | array | updatable includable | The combos that are included in the promotion rewards |
reward_type | array | updatable | The Reward Types. |
reward_amount | array | updatable | The amount of the reward. |
created_at | string | sortable | Time YYYY-MM-DD HH-MM-SS in UTC at which the object was created. |
updated_at | string | sortable | Time YYYY-MM-DD HH-MM-SS in UTC at which the object was updated. |
deleted_at | string | nullable updatable | Time YYYY-MM-DD HH-MM-SS in UTC at which the object was deleted. |
# Condition Types
| Type | Description |
|---|---|
1 | Quantity Based |
2 | Spending Based |
# Promotion Types
| Type | Description |
|---|---|
1 | Basic |
2 | Advanced |
# Reward Types
| Type | Description |
|---|---|
1 | Percentage discount On Products. |
2 | Amount discount On Products. |
3 | Percentage discount On Order. |
4 | Amount discount On Order. |
5 | Fixed Price. |
# List Promotions
GET /promotions
# Scope
general.read
# Filters
idnamename_localizedis_activecondition_typetypereward_typeupdated_afteris_deletedcreated_onupdated_ondeleted_on
# Response
{
"data": [
{
"id": "8f81cf82",
"name": "Weekend Promotion",
"name_localized": null,
"type": 1,
"from_date": "2000-03-07",
"to_date": "2010-06-03",
"from_time": 0,
"to_time": 23,
"is_sat": true,
"is_sun": true,
"is_mon": true,
"is_tue": true,
"is_wed": true,
"is_thu": true,
"is_fri": true,
"is_active": true,
"include_modifiers": true,
"target_quantity": 2,
"reward_quantity": 3,
"reward_type": 1,
"reward_amount": 3,
"maximum_discount_amount": 30,
"products": [
{
"id": "8f7bdd7f"
}
],
"product_tags": [
{
"id": "8f7b9527",
"pivot": {
"promotion_id": "8f81cf82",
"product_tag_id": "8f7b9527"
}
}
],
"combos": [
{
"id": "8f7bef38",
"pivot": {
"promotion_id": "8f81cf82",
"combo_id": "8f7bef38"
}
}
],
"categories": [
{
"id": "8f7ab8c9",
"pivot": {
"promotion_id": "8f81cf82",
"category_id": "8f7ab8c9"
}
}
],
"branches": [
{
"id": "8f7ab00a"
}
],
"customer_tags": [
{
"id": "8f7b9371",
"pivot": {
"promotion_id": "8f81cf82",
"customer_tag_id": "8f7b9371"
}
},
{
"id": "8f7b937b",
"pivot": {
"promotion_id": "8f81cf82",
"customer_tag_id": "8f7b937b"
}
}
],
"reward_products": [
{
"id": "8f7bb4f5"
}
],
"reward_product_tags": [
{
"id": "8f7b9527",
"pivot": {
"promotion_id": "8f81cf82",
"product_tag_id": "8f7b9527"
}
}
],
"reward_combos": [
{
"id": "8f7be85a",
"pivot": {
"promotion_id": "8f81cf82",
"combo_id": "8f7be85a"
}
}
],
"reward_categories": [
{
"id": "8f7ab8de",
"pivot": {
"promotion_id": "8f81cf82",
"category_id": "8f7ab8de-"
}
}
],
"created_at": "2019-02-24 11:43:28",
"updated_at": "2019-02-24 11:43:28",
"deleted_at": null
}
]
}
# Get Promotion
GET /promotions/{promotionId}
# Scope
general.read
# Response
{
"data": {
"id": "8f81cf82",
"name": "Weekend Promotion",
"name_localized": null,
"type": 1,
"from_date": "2000-03-07",
"to_date": "2010-06-03",
"from_time": 0,
"to_time": 23,
"is_sat": true,
"is_sun": true,
"is_mon": true,
"is_tue": true,
"is_wed": true,
"is_thu": true,
"is_fri": true,
"is_active": true,
"include_modifiers": true,
"target_quantity": 2,
"reward_quantity": 3,
"reward_type": 1,
"reward_amount": 3,
"maximum_discount_amount": 30,
"products": [
{
"id": "8f7bdd7f"
}
],
"product_tags": [
{
"id": "8f7b9527",
"pivot": {
"promotion_id": "8f81cf82",
"product_tag_id": "8f7b9527"
}
}
],
"combos": [
{
"id": "8f7bef38",
"pivot": {
"promotion_id": "8f81cf82",
"combo_id": "8f7bef38"
}
}
],
"categories": [
{
"id": "8f7ab8c9",
"pivot": {
"promotion_id": "8f81cf82",
"category_id": "8f7ab8c9"
}
}
],
"branches": [
{
"id": "8f7ab00a"
}
],
"customer_tags": [
{
"id": "8f7b9371",
"pivot": {
"promotion_id": "8f81cf82",
"customer_tag_id": "8f7b9371"
}
},
{
"id": "8f7b937b",
"pivot": {
"promotion_id": "8f81cf82",
"customer_tag_id": "8f7b937b"
}
}
],
"reward_products": [
{
"id": "8f7bb4f5"
}
],
"reward_product_tags": [
{
"id": "8f7b9527",
"pivot": {
"promotion_id": "8f81cf82",
"product_tag_id": "8f7b9527"
}
}
],
"reward_combos": [
{
"id": "8f7be85a",
"pivot": {
"promotion_id": "8f81cf82",
"combo_id": "8f7be85a"
}
}
],
"reward_categories": [
{
"id": "8f7ab8de",
"pivot": {
"promotion_id": "8f81cf82",
"category_id": "8f7ab8de-"
}
}
],
"created_at": "2019-02-24 11:43:28",
"updated_at": "2019-02-24 11:43:28",
"deleted_at": null
}
}
# Create Promotion
POST /promotions
# Scope
admin.write
# Request
{
"name": "Weekend Promotion",
"name_localized": null,
"type": 1,
"from_date": "2000-03-07",
"to_date": "2010-06-03",
"from_time": 0,
"to_time": 23,
"is_sat": true,
"is_sun": true,
"is_mon": true,
"is_tue": true,
"is_wed": true,
"is_thu": true,
"is_fri": true,
"is_active": true,
"include_modifiers": true,
"target_quantity": 2,
"reward_quantity": 3,
"reward_type": 1,
"reward_amount": 3,
"maximum_discount_amount": 30,
"branches": [
{
"id": "8cd1956b"
}
],
"products": [
{
"id": "8cd1956b"
}
],
"product_tags": [
{
"id": "8cd1956b"
}
],
"customer_tags": [
{
"id": "8cd1956b"
}
],
"categories": [
{
"id": "8cd1956b"
}
],
"combos": [
{
"id": "8cd1956b"
}
],
"reward_products": [
{
"id": "8cd1956b"
}
],
"reward_product_tags": [
{
"id": "8cd1956b"
}
],
"reward_categories": [
{
"id": "8cd1956b"
}
],
"reward_combos": [
{
"id": "8cd1956b"
}
]
}
# Response
{
"data": {
"id": "8f81cf82",
"name": "Weekend Promotion",
"name_localized": null,
"type": 1,
"from_date": "2000-03-07",
"to_date": "2010-06-03",
"from_time": 0,
"to_time": 23,
"is_sat": true,
"is_sun": true,
"is_mon": true,
"is_tue": true,
"is_wed": true,
"is_thu": true,
"is_fri": true,
"is_active": true,
"include_modifiers": true,
"target_quantity": 2,
"reward_quantity": 3,
"reward_type": 1,
"reward_amount": 3,
"maximum_discount_amount": 30,
"products": [
{
"id": "8f7bdd7f"
}
],
"product_tags": [
{
"id": "8f7b9527",
"pivot": {
"promotion_id": "8f81cf82",
"product_tag_id": "8f7b9527"
}
}
],
"combos": [
{
"id": "8f7bef38",
"pivot": {
"promotion_id": "8f81cf82",
"combo_id": "8f7bef38"
}
}
],
"categories": [
{
"id": "8f7ab8c9",
"pivot": {
"promotion_id": "8f81cf82",
"category_id": "8f7ab8c9"
}
}
],
"branches": [
{
"id": "8f7ab00a"
}
],
"customer_tags": [
{
"id": "8f7b9371",
"pivot": {
"promotion_id": "8f81cf82",
"customer_tag_id": "8f7b9371"
}
},
{
"id": "8f7b937b",
"pivot": {
"promotion_id": "8f81cf82",
"customer_tag_id": "8f7b937b"
}
}
],
"reward_products": [
{
"id": "8f7bb4f5"
}
],
"reward_product_tags": [
{
"id": "8f7b9527",
"pivot": {
"promotion_id": "8f81cf82",
"product_tag_id": "8f7b9527"
}
}
],
"reward_combos": [
{
"id": "8f7be85a",
"pivot": {
"promotion_id": "8f81cf82",
"combo_id": "8f7be85a"
}
}
],
"reward_categories": [
{
"id": "8f7ab8de",
"pivot": {
"promotion_id": "8f81cf82",
"category_id": "8f7ab8de-"
}
}
],
"created_at": "2019-02-24 11:43:28",
"updated_at": "2019-02-24 11:43:28",
"deleted_at": null
}
}
# Update Promotion
PUT /promotions/{promotionId}
# Scope
admin.write
# Request
{
"name": "Weekend Promotion",
"name_localized": null,
"type": 1,
"from_date": "2000-03-07",
"to_date": "2010-06-03",
"from_time": 0,
"to_time": 23,
"is_sat": true,
"is_sun": true,
"is_mon": true,
"is_tue": true,
"is_wed": true,
"is_thu": true,
"is_fri": true,
"is_active": true,
"include_modifiers": true,
"target_quantity": 2,
"reward_quantity": 3,
"reward_type": 1,
"reward_amount": 3,
"maximum_discount_amount": 30,
"branches": [
{
"id": "8cd1956b"
}
],
"products": [
{
"id": "8cd1956b"
}
],
"product_tags": [
{
"id": "8cd1956b"
}
],
"customer_tags": [
{
"id": "8cd1956b"
}
],
"categories": [
{
"id": "8cd1956b"
}
],
"combos": [
{
"id": "8cd1956b"
}
],
"reward_products": [
{
"id": "8cd1956b"
}
],
"reward_product_tags": [
{
"id": "8cd1956b"
}
],
"reward_categories": [
{
"id": "8cd1956b"
}
],
"reward_combos": [
{
"id": "8cd1956b"
}
]
}
# Response
{
"data": {
"id": "8f81cf82",
"name": "Weekend Promotion",
"name_localized": null,
"type": 1,
"from_date": "2000-03-07",
"to_date": "2010-06-03",
"from_time": 0,
"to_time": 23,
"is_sat": true,
"is_sun": true,
"is_mon": true,
"is_tue": true,
"is_wed": true,
"is_thu": true,
"is_fri": true,
"is_active": true,
"include_modifiers": true,
"target_quantity": 2,
"reward_quantity": 3,
"reward_type": 1,
"reward_amount": 3,
"maximum_discount_amount": 30,
"products": [
{
"id": "8f7bdd7f"
}
],
"product_tags": [
{
"id": "8f7b9527",
"pivot": {
"promotion_id": "8f81cf82",
"product_tag_id": "8f7b9527"
}
}
],
"combos": [
{
"id": "8f7bef38",
"pivot": {
"promotion_id": "8f81cf82",
"combo_id": "8f7bef38"
}
}
],
"categories": [
{
"id": "8f7ab8c9",
"pivot": {
"promotion_id": "8f81cf82",
"category_id": "8f7ab8c9"
}
}
],
"branches": [
{
"id": "8f7ab00a"
}
],
"customer_tags": [
{
"id": "8f7b9371",
"pivot": {
"promotion_id": "8f81cf82",
"customer_tag_id": "8f7b9371"
}
},
{
"id": "8f7b937b",
"pivot": {
"promotion_id": "8f81cf82",
"customer_tag_id": "8f7b937b"
}
}
],
"reward_products": [
{
"id": "8f7bb4f5"
}
],
"reward_product_tags": [
{
"id": "8f7b9527",
"pivot": {
"promotion_id": "8f81cf82",
"product_tag_id": "8f7b9527"
}
}
],
"reward_combos": [
{
"id": "8f7be85a",
"pivot": {
"promotion_id": "8f81cf82",
"combo_id": "8f7be85a"
}
}
],
"reward_categories": [
{
"id": "8f7ab8de",
"pivot": {
"promotion_id": "8f81cf82",
"category_id": "8f7ab8de-"
}
}
],
"created_at": "2019-02-24 11:43:28",
"updated_at": "2019-02-24 11:43:28",
"deleted_at": null
}
}
# Delete Promotion
DELETE /promotions/{promotionId}
# Scope
admin.write
The API will respond with 200 indicating that the promotion has been deleted.
# Restore Promotion
PUT /promotions/{promotionId}/restore
# Scope
admin.restore
The API will respond with 200 indicating that the promotion has been restored.