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 |
---|---|---|
id | The unique id of the coupon. | |
code | The code of the coupon. | |
name | The name of the coupon. | |
description | The description of the coupon. | |
programName | The name of the program associated with the coupon such as Radio, TV, Internet | |
companyName | Name 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. | |
categoryId | Id 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"
}