Promotions
Promotions allow you to provide discounts to customers. A Promotion can be automatic which will be applied provided any criteria are satisfied, or require codes, which are then used by the end user to get a discount. For more details, see How promotions work.
The Promotion Object
Name | Type | Description |
|
|
|
|
| The name of a promotion |
|
| The description of a promotion |
|
| Indicates whether a promotion is active |
|
| Allows promotion to be applied without the need for a code. |
|
|
|
| ||
|
| array of objects |
|
| A currency code |
|
| The minimum cart value before promotion is applied |
|
| array of objects |
|
| A currency code |
|
| The maximum value of the discount |
|
| The start time of the promotion DateTime |
|
| The end time of the promotion DateTime |
The Schema Object
Moltin offers different types of Promotion all defined by a Schema. These Schemas are used internally to verify a Promotion and calculate a discount.
Below is the list of currently available promotion type Schemas - these are to be used in the create promotion request.
Fixed Discount
Fixed discount provides a method to give a fixed discount to a cart.
Name | Type | Description |
|
| An array of objects |
|
| A currency code |
|
| The amount to discount by |
Percent Discount
Percent discount provides a method to give a percentage discount to a cart based on the value of cart_items and custom_items.
Name | Type | Description |
|
| An array of objects |
|
| A currency code |
|
| The percentage to discount by |
X for Y
An X for Y discount allows items of the same product to be sold on a 2 for 1 or 3 for 2 (or any other combination) basis.
Name | Type | Description |
|
| Number of items required to activate promotion. |
|
| Number of items that will be used to calculate the total charge. |
|
| Array of strings |
|
| A list of strings that represent the productIDs and/or SKUs. |
Multiples will be honoured by applying a multiple of the discount, e.g. 3 for 2 with 6 of the targeted items in a cart would yield a discount value equal to the value of 2 items.
X for Amount
An X for Amount discount allows items of the same product to be sold on a X for fixed amount basis. e.g. 2 for $10 or 4 for $20.
Name | Type | Description |
|
| Number of items required to activate promotion. |
|
| Array of objects |
|
| A currency code |
|
| The amount to vend items for. |
Bundle Discount
A bundle discount can be used to provide a fixed price for a selection of products when bought together. E.g. buy product x, y & z for $15 or buy 2 of product x and 3 of product y or z for $25
Name | Type | Description |
|
| Array of objects |
|
| Array of strings |
|
| A list of strings that represent the productIDs and/or SKUs. |
|
| The require number of corresponding target to satisfy the promotion. |
|
| Array of objects. |
|
| A currency code. |
|
| The amount to vend items for. |
The Promotion Code Object
A promotion code is represented by the following, very simple, object.
Name | Type | Description |
|
| Any string |
|
| Limit for number of times this code can be used |
|
| A string used as an identifier relating to a user |
Last updated