API Playground - generate_coupon

generate_coupon


Use this function to add a new coupon to your site. (click for full documentation)

coupon_id

ID of the existing coupon definition for the site. You can find coupons valid for your site on the Create coupons page.

holder_email

Email address of the coupon holder.

holder_name

Name of the coupon holder.

buyer_info

Info about the coupon buyer.

valid_with_email

If true, the coupon will be valid only with the specified email address. Note that at least one of the fields valid_with_email  and access_code needs to specified.

access_code

If specified, the code the needs to be used when using the coupon. Coupon code needs to contain at least one letter and one digit and be at least 8 characters long.

first_day_of_validity

Choose when the coupon validity should start. Leave it empty if it should start today. For example, you can have the coupon valid for 7 days, starting next Friday. E.g '2015-10-25'.

custom_amount

Allows you to override the original amount set up in the coupon definition (see coupon_id above).

language

by specifying a 2-letter (ISO 639-1) language code (all capital letters e.g. EN, DE, FR, ES, IT) you can change the language of the text values returned

api_key

* - påkrevd felt