Each product line of an order can be discounted, so an order can have multiple discounts, but only one per product.
https://api.cms-tool.net/webapps/api/discount
| Key | Definition | Type | Format |
| promo |
promo
System ID, unique serial number. do not set or change this value
|
Integer (Unique ID)
|
Max Len: 11
|
| cid |
Website ID
System ID, do not set or change this value
|
int
|
Max Len: 11
|
| exclude_groupid |
exclude groupid
ID, refer to the category ID list, this value determines what category is excluded from receiving the discount
|
int
|
|
| exclude_reference_groupid |
exclude reference groupid
ID, refer to the category ID list, this value determines what category is excluded from being a reference item to win the discount.
|
int
|
Max Len: 11
|
| in_member_group |
in member group
ID of a customer group whom a customer must belong to in order to get this discount. See customer group meta data
|
int
|
Max Len: 11
|
| not_in_member_group |
not in member group
ID of a customer group whom a customer must not belong to in order to get this discount. See Customer group meta data
|
int
|
Max Len: 11
|
| onlyformemberid |
only for member id
ID of a specific customer who should get this discount. There is no meta data provided for this.
|
int
|
Max Len: 11
|
| onlyforpid |
only for pid
ID, refers to a product ID, this value determines what product is the target for the discount.
|
int
|
Max Len: 11
|
| onlyingroupid |
only in groupid
ID, refer to the category ID list, this value determines what category can receive the discount, the target discounted item
|
int
|
Max Len: 11
|
| promoaffiliateid |
promo affiliate id
ID of a specific customer who should be recorded as the affiliate who referred this new business when this discount is used
|
int
|
Max Len: 11
|
| valid_for_max_member_level |
Exclude Member Level And Above
Members of this level and above are denied using the discount. Only use member level ID from reference data. eg 200 = Trade customers excluded
|
int
|
Max Len: 11
|
| valid_for_min_member_level |
Minimum Member Level Required
Minimum Member Level Required, only use member level ID from the reference data.
|
int
|
Max Len: 11
|
| valid_on_page |
valid on page
ID of a page that may only get this discount. ignore this field
|
int
|
Max Len: 11
|
| with_purchase_of_groupid |
with purchase of groupid
ID, refer to the category ID list, this value determines what category of reference items must also be purchased in order to get this discount on the target item
|
int
|
Max Len: 11
|
| with_purchase_of_groupid2 |
with purchase of groupid2
ID, refer to the category ID list, this value determines what category of reference items must also be purchased in order to get this discount on the target item, and would be additional to with_purchase_of_groupid meaning that items from both categories must be purchased in order to get a discount on the target item
|
int
|
Max Len: 11
|
| with_purchase_of_pid |
with purchase of pid
ID, refers to a product ID, this value determines what product must also be purchased in order to get a discount on the targeted item
|
int
|
Max Len: 11
|
| autoaddproducttocart |
Auto Add Product To Cart
if true, then any free item will be automatically added to the cart when the specified rules have been met
|
bool
|
Max Len: 1
true/false
|
| comparepricing |
compare pricing
if true, then the discount will only be applied to the lowest price item when a reference item is required
|
bool
|
Max Len: 1
true/false
|
| countavailable |
count available
count of how many times can this discount be used by anyone
|
int
|
Max Len: 11
|
| countused |
count used
count of how many times has this discount been used
|
int
|
Max Len: 11
|
| free_freight |
free freight
if true then user will get free shipping or free courier
|
bool
|
Max Len: 1
true/false
|
| ifnotalreadydiscounted |
if not already discounted
if true, then an item is not value for discount if it already is discounted by some other means
|
bool
|
Max Len: 1
true/false
|
| in_price_group |
in price group
Text, Price group which a customer must belong to in order to get this discount. Do not set any valid for retail. Other price groups are one of the letters (A,B,C,D,E,F,G,H)
|
char
|
Max Len: 1
|
| limitpercustomer |
limit per customer
how many times can this discount be used by each customer
|
int
|
Max Len: 11
|
| limitquantityitemsfordiscount |
limit quantity items for discount
the maximum quantity of items that can receive the discount.
|
decimal
|
Precision: 10.2
|
| maximumdiscount |
maximum discount
The maximum discount value that can be calculated by this rule
|
decimal
|
Precision: 10.2
|
| minimumspend |
minimum spend
The minimimum a customer must spend to activate this discount, this is optional
|
decimal
|
Precision: 10.2
|
| onlyforsupplier |
only for supplier
Text, name of a product supplier for which only this discount can be applied
|
text
|
|
| percentdiscount |
percent discount
A percentage discount being a value from 0 to 100. Free items would have 100% discount
|
decimal
|
Precision: 10.2
|
| perunitdiscount |
per unit discount
A discount that is applied to each unit, so that more quantity gets more discount
|
decimal
|
Precision: 10.2
|
| perunitmaxprice |
per unit max price
The discount will be such that the product price will be capped at this value
|
decimal
|
Precision: 10.2
|
| promobegins |
begin date
timestamp when this discount will start being available
|
timestamp
|
|
| promocode |
promo code
A user friendly discount promotion code, only if the instructions require a promo code
|
text
|
Max Len: 50
|
| promocurrency |
currency
The currency of this discount, only if instructions require a currency focus
|
char
|
Max Len: 3
|
| promoexpiry |
expiry date
Timestamp when this discount will expire
|
timestamp
|
|
| promomessagetocustomer |
message to customer
A description of this discount intended for display to the customer and maximum of 50 characters
|
text
|
|
| promonotes |
notes
A description of this discount that will only be shown to administrators and maximum of 100 characters
|
text
|
|
| repeatallowance |
repeat allowance
if true, then the value of limitquantityitemsfordiscount is repeated everytime the reference product rules are met
|
bool
|
Max Len: 1
true/false
|
| valuediscount |
value discount
A specified discount value, perhaps per order or per order line. eg $10 off
|
decimal
|
Precision: 10.2
|
| withqtypurchased |
with qty purchased
The quantity of reference items that must be purchased in order to get a discount.
|
decimal
|
Precision: 10.3
|
| withsupplierpurchase |
with supplier purchase
Text, name of a product supplier for which a refererence item must be purchased
|
text
|