getCoupon

getCoupon

 

description: get the coupon details given the coupon code.

ParameterTypeDescriptionRequired
api_tokenstringAPI TokenYES
coupon_codestringCoupon code to be checked and validatedYES
product_codestringProduct code or SKUYES
pricedecimalPrice of the productYES

An example using our simple to use PHP codebookie class file:

 

Output:

VariableTypeDescription
statusstringOK - getCoupon call is successful
ERROR - Coupon code can no longer be used, or limit has been reached
NOT_VALID - Coupon code does not exist
coupon_codestringCoupon Code
discount_typestringThe discount type either $ or %
discountdecimalthe discount $ or % to take off the original price
discount_amountdecimalthe dollar amount to be discounted off the original price
new_pricedecimalthe discounted price. Original price - discount amount
checkout_tokenstringA token that will expire in an hr after the initial call has been made to store the information from the getCoupon call
Was this article helpful to you? Yes No

How can we help?