MenuClose

Discounts - API Reference

Select API:

Discounts

Each product line of an order can be discounted, so an order can have multiple discounts, but only one per product.

End Point URL

https://api.cms-tool.net/webapps/api/discount

Data Dictionary

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

API End Points

Content

Blog pages are usually presented as a list udner a primary page. Individual blog pages do not appear on the menu, only in lists. The blog engine also powers FAQ and gallery type pages
A website is made up of the primary navigational pages that create the primary menu, as well as hidden pages and member only pages. Pages can contain pages in a treelike structure, however, this excludes sub pages which are defined as blogs or products

Ecommerce

Categories are used to group products. Products can belong in up to 8 categories. Categories can also form a tree, with Category parent ID = 0 being the parent level category. The term group is synomous with category, so many elements are prefixed with the word group.
Each product line of an order can be discounted, so an order can have multiple discounts, but only one per product.
The available payment methods at checkout. An order can only have 1 payment method, but the admin can change the payment method, and take part payments.
A saleable item, or variant of a parent product.
Invoices, orders, baskets and quotes are all represented by this object, and differentiated by status.
The courier or freight fee rules available for checkout. Each order can only have rule applied

Members

Bulk emails represent a newsletter that will be sent to a bulk audience via a mailing list. Alternatively, a bulk email is a sequence within a campaign.
A message is created for every contact us, enquiry form, or custom form.
Group members/customers, each member can belong to unlimited groups. Groups can contain groups
System security levels. Default level is 100 for general users.
Members or customers or users are the same thing. These are anyone who has purchased, enquired, or who has permission to login, or receive newsletters. This excludes administrative users.
A blog comment or product review uses the same engine. Each record may have a rating, as well as an optional comment, and is linked to an object and the person who posted it

Other

Bookings are for appointments, seats, hire items, etc. Not for events.
Use the Event Attendee endpoint to get your event attendee information on your site.
Events have a start/end date and additional information, they might be bookable, or just for informational purposes

Reference

A list of countries, and some meta data
Generic categories are those that relate to open source categorisations of products for SEO purposes