Promotion Bonus Buys Master
A promotion: what the customer buys, what they get, in which stores and when.
Area: Coupons and promotions · Why it is here: sample S31; retail core · Fields: 35
Read and write it
Every call runs as your app's own user, with its key in one header, at the retailer's own address. The user reads and writes only what its role allows: your app's user, and the rights the retailer gives it.
Read a list (only name unless you ask for fields):
curl -s "https://⟨site⟩/api/resource/Promotion%20Bonus%20Buys%20Master?fields=%5B%22*%22%5D&limit_page_length=20" \
-H "Authorization: token ⟨api key⟩:⟨api secret⟩"
Read one, with its tables:
curl -s "https://⟨site⟩/api/resource/Promotion%20Bonus%20Buys%20Master/⟨name⟩" -H "Authorization: token ⟨api key⟩:⟨api secret⟩"
Create one (the required fields first), if your app's role may:
curl -s -X POST "https://⟨site⟩/api/resource/Promotion%20Bonus%20Buys%20Master" -H "Authorization: token ⟨api key⟩:⟨api secret⟩" \
-H "Content-Type: application/json" -d '{"id": …}'
Change one with PUT /api/resource/Promotion%20Bonus%20Buys%20Master/⟨name⟩ and the fields you change; a table sent there replaces its rows, so send its existing rows too. All the record calls and their answers: the API reference.
Samples that use it
s5_config_pack · s8_estate_rollout · s10_ai_manager · s22_customer_loyalty · s31_parent_groups
Fields
Read from the product at POS 2.1.0.667 (till app 60147699c): its own fields, the fields iVendNext adds to it, and iVendNext's changes to any of them. Read-only fields are set by iVendNext; a hidden one is not on the form but can be read. Every record also has name (its id, in the address), owner, creation, modified, modified_by and docstatus (0 a draft, 1 submitted, 2 cancelled), all read-only.
| Field | Field name | Type | Required | Read-only | Hidden | Links to |
|---|---|---|---|---|---|---|
| Name | id |
Data | yes | |||
| Has Effective Date | has_valid_date |
Check | ||||
| Start Date | start_date |
Date | ||||
| End Date | end_date |
Date | ||||
| Minimum Bill Amount | minimum_bill_amount |
Float | ||||
| Discount Type | discount_type |
Select | one of: Percent, Amount | |||
| Maximum Redemption Count Per Store | maximum_redemption_count |
Int | ||||
| Promotion Type | promotion_type |
Select | one of: Bonus Buys, Fixed Price | |||
| Active | active |
Check | ||||
| Lowest Value | lowest_value |
Check | ||||
| Sequence Number | sequence_number |
Int | yes | yes | ||
| Description | description |
Data | ||||
| Has Effective Time | has_valid_time |
Check | ||||
| Start Time | start_time |
Time | ||||
| End Time | end_time |
Time | ||||
| Minimum Quantity | minimum_quantity |
Float | ||||
| Discount | discount_percent |
Float | ||||
| Promotion Applicability Count | promotion_applicability_count |
Int | ||||
| Can Repeat In Transaction | can_repeat_in_transaction |
Check | ||||
| Exclude Discounted Items | exclude_discounted_items |
Check | ||||
| Apply On Item Scan | apply_on_item_scan |
Check | ||||
| Apply Once Per Customer | is_apply_once |
Check | ||||
| Total Redemption Count | total_redemption_count |
Int | yes | yes | ||
| Buy Optional Count | buy_optional_count |
Int | ||||
| Buy Items | table_buy_items |
Table | Promotion Buy Side | |||
| Get Optional Count | get_optional_count |
Int | ||||
| Get Item At Fixed Price | get_item_at_fixed_price |
Float | ||||
| Get Items | table_get_items |
Table | Promotion Get Side | |||
| Funded By Supplier (added by iVendNext) | custom_mpos_funding_supplier |
Link | Supplier | |||
| Applicable Source | table_applicable_source |
Table | Promotion Applicability Detail | |||
| Duration | table_applicability |
Table | Promotion Applicability | |||
| Customer Special Days | table_customer_special_days |
Table | Promotion Customer Special Days | |||
| Promotion Exclusion List | table_promotion_exclusion_list |
Table | Promotion Exclude Item | |||
| Serial Batch List | table_serials_batches |
Table | yes | Promotion Product Details | ||
| Supplier's Share (added by iVendNext) | custom_mpos_funding_share |
Percent |
Table: Promotion Applicability
The rows of table_applicability. Each row also has idx (its place), parent, parentfield and parenttype.
| Field | Field name | Type | Required | Read-only | Hidden | Links to |
|---|---|---|---|---|---|---|
| Day | day |
Select | yes | one of: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday | ||
| Enabled | enabled |
Check | ||||
| Start Time | start_time |
Time | ||||
| End Time | end_time |
Time |
Table: Promotion Applicability Detail
The rows of table_applicable_source. Each row also has idx (its place), parent, parentfield and parenttype.
| Field | Field name | Type | Required | Read-only | Hidden | Links to |
|---|---|---|---|---|---|---|
| Source Type | source_type |
Select | yes | one of: Warehouse | ||
| Source | source |
Dynamic Link | yes |
Table: Promotion Buy Side
The rows of table_buy_items. Each row also has idx (its place), parent, parentfield and parenttype.
| Field | Field name | Type | Required | Read-only | Hidden | Links to |
|---|---|---|---|---|---|---|
| Product Type | source_type |
Select | one of: Item, Item Group | |||
| Value | source_key |
Dynamic Link | ||||
| Description | description |
Data | yes | |||
| UOM | uom |
Link | UOM | |||
| Quantity | quantity |
Int | ||||
| Amount | amount |
Float | ||||
| Mandatory | is_mandatory |
Check | ||||
| Discount Type | discount_type |
Select | one of: Amount, Percent | |||
| Discount | discount |
Float |
Table: Promotion Customer Special Days
The rows of table_customer_special_days. Each row also has idx (its place), parent, parentfield and parenttype.
| Field | Field name | Type | Required | Read-only | Hidden | Links to |
|---|---|---|---|---|---|---|
| Special Days Type | special_days_type |
Select | one of: Birthday, Anniversary | |||
| Duration | special_days_duration |
Select | one of: Day, Week, Month, DaysBackwardForward | |||
| Backward Day | backward_day |
Int | ||||
| Forward Day | forward_day |
Int |
Table: Promotion Exclude Item
The rows of table_promotion_exclusion_list. Each row also has idx (its place), parent, parentfield and parenttype.
| Field | Field name | Type | Required | Read-only | Hidden | Links to |
|---|---|---|---|---|---|---|
| Source Type | source_type |
Select | one of: Item, Item Group, Customer Group | |||
| Source | source |
Dynamic Link | yes |
Table: Promotion Get Side
The rows of table_get_items. Each row also has idx (its place), parent, parentfield and parenttype.
| Field | Field name | Type | Required | Read-only | Hidden | Links to |
|---|---|---|---|---|---|---|
| Product Type | source_type |
Select | one of: Item, Item Group, Coupon, Gift Card | |||
| Source Type Internal | source_type_internal |
Select | yes | one of: Item, Item Group, Coupon | ||
| Value | source_key |
Dynamic Link | ||||
| Description | description |
Data | yes | |||
| UOM | uom |
Link | UOM | |||
| Quantity | quantity |
Int | ||||
| Discount Type | discount_type |
Select | one of: Amount, Percent | |||
| Discount | discount |
Float | ||||
| Mandatory | is_mandatory |
Check | ||||
| Show Prompt | auto_add_in_transaction |
Check | yes |
Table: Promotion Product Details
The rows of table_serials_batches. Each row also has idx (its place), parent, parentfield and parenttype.
| Field | Field name | Type | Required | Read-only | Hidden | Links to |
|---|---|---|---|---|---|---|
| Item Code | item_code |
Data | ||||
| Serial Number | serial_number |
Data | ||||
| Batch Number | batch_number |
Data |