An Incentive Pool entity is a collection of Incentive Codes.
Incentive Pool Entity
The following is the JSON representation of an Incentive Pool entity within the Application Program Interfaces (APIs).
{ "id": 42, "name": "Store Coupons", "issuance_allowed": true, "redemption_allowed": true, "incentive_codes": { "total": 500, "issued": 143, "remaining": 357, "low_threshold": 100, "max_characters": 50 }, "distribution": { "method": "unique" }, "notification_email_address": "your.name@vibes.com", "created_at":"2017-01-01T12:00Z", "updated_at":"2017-01-01T12:00Z", "url":"/companies/:id/incentives/pools/:pool_id" }
Elements
Data Element | Type | Description |
---|---|---|
id | Integer | Vibes unique identifier for each Incentive Pool. |
name | String | The name of the Incentive Pool. |
issuance_allowed | Boolean | Whether issuance of codes is allowed. |
redemption_allowed | Boolean | Whether redemption of codes is allowed. |
incentive_codes | Object | An object describing this pool's Incentive Codes. |
incentive_codes.total | Integer | Total number of Incentive Codes in the pool. |
incentive_codes.remaining | Integer | Remaining number of available Incentive Codes in the pool. |
incentive_codes.low_threshold | Integer | The number of remaining Incentive Codes where a notification is sent. |
incentive_codes.max_characters | Integer | The maximum number of characters in an Incentive Code. |
distribution | Object | An object describing this pool's distribution type. |
distribution.method | String | The method of distribution (unique|multi). |
notification_email_address | String | The email address for all notifications. |
created_at | Timestamp | The date this pool was created. |
updated_at | Timestamp | The date this pool was last updated. |
url | String | The URL to access this resource. |
Get Incentive Pools
GET /companies/:id/incentives/pools
Response
An array of all Incentive Pools for the given company.
Show an Incentive Pool
GET /companies/:id/incentives/pools/:pool_id
Create an Incentive Pool
POST /companies/:id/incentives/pools { "name": "Test Pool", "issuance_allowed": true, "redemption_allowed": true, "incentive_codes": { "low_threshold": 1000, "max_characters": 10 }, "distribution": { "method": "unique" }, "notification_email_address": "your.name@your.company.com" }
Update an Incentive Pool
PUT /companies/:id/incentives/pools/:pool_id { "name": "Test Pool", "issuance_allowed": true, "redemption_allowed": true, "incentive_codes": { "low_threshold": 1000, "max_characters": 10 }, "distribution": { "method": "unique" }, "notification_email_address": "your.name@your.company.com" }
Overview
Content Tools