List

GET {{base-url}}/v2/b2b/coupons
List coupons
Response
A list of Coupon Objects

List by Category Id

GET {base-url}}v2/b2b/coupons/category/{categoryId}
     List coupons based on the category id
 Response
      A list of Coupon Objects that is associated with the category id passed in.


Get

GET {{base-url}}/v2/b2b/coupons/{id}
Get a Coupon
Input
id:  the id of the coupon you are looking for.
Response
The Coupon Object corresponding to the specified id.


Create

POST {{base-url}}/v2/b2b/coupons
Add a new Coupon to your list
Body
 A Coupon Object you want added to your list of available coupon categories.
Response
The Coupon object that was created.


Update

PUT {{base-url}}/v2/b2b/coupons
Update a Coupon
Body
The Coupon Object you want updated.
Response
The resulting Coupon Object.


Objects

Coupon Object

 
Field
Description
Notes
idThe unique id of the coupon. 
codeThe code of the coupon. 
nameThe name of the coupon. 
descriptionThe description of the coupon. 
programNameThe name of the program associated with the coupon such as Radio, TV, Internet 
companyNameName of the company issuing the coupon on behalf of the tenant 
resellerId
Id of the reseller that is associated with the coupon. If this is set, the CompanyName will
be set with the reseller account name.
 
categoryIdId of the category associated with the coupon 
categoryName
Read only name of the category. It cannot be set since it picks the name from the coupon category
definition

Sample Object:
{
    "id": "{Coupon Database Id",
    "code": "{code code}",
    "name": "{coupon name}",
    "description": "{optional text}",
    "programName": "{Optional Program Name}",
    "companyName": "{Optional Company name}",
    "categoryId": "{Coupon Category Database ID}",
    "categoryName": "Corporate"
}