The coupons API (Application Programming Interface) is implemented as an XML based webservice. This service only available to Premium accounts.


The location of the web service is:
https://www.mals-e.net/mapis/coupons.php


The request should be a form POST and must include the following fields:

 

username Your shopping cart username
apikey Your api key, pick this up from Admin
version Should be set to the value 1.0
action Should be set to the value create
couponcode Sould be unique, alpha-numeric characters and spaces only
type The type of discount can be Fixed, Percent, Peritem or Freeship
rate The numeric value of the discount without a percentage or currency symbol
minvalue Minimim order value for which it can be used (zero if there is no minimum)
expires Expires midnight of (leave it blank for never) YYY-MM-DD
usage Once or Multiple.
maxvalue true or false. True if it is a fixed value discount and it should not exceed the sub-total value of the products
freeshipping true or false. A Fixed, Percent or Peritem discount can also be free shipping.
scode SKU (scode) which is used with the condition
condition

The discount is applied to products with an scode value which:

0 = is equal to
1 = begins with
2 = ends with
3 = is not equal to
4 = does not begin with
5 = is empty
6 = is not empty
7= all products


Usage - the use once option. A coupon is only marked as used once a payment has been confirmed. There is a short period of time between when a person enters the coupon and when they pay, during that period someone else may use the same coupon. With PayPal, it will be when the cart receives the IPN confirming payment and in the case of eCheck that may take several days.


Expires. The coupon expires at midnight UTC plus your local time offset which you set in Admin.


SKU (scode) Scode is an optional value you can set in your Buy Now buttons. By using the conditions you can allow the coupon to be applied to a group of products.