Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

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).

Elements

{
  "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"
}


Data Element

Type

Description

id

Integer

Vibes unique identifier for each Incentive Pool.

name

String

The name of the Incentive Pool.

issuance_allowedBooleanWhether issuance of codes is allowed.
redemption_allowedBooleanWhether redemption of codes is allowed.

incentive_codes

Object

An object describing this pool's Incentive Codes.
incentive_codes.totalIntegerTotal 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_charactersIntegerThe maximum number of characters in an Incentive Code.
distributionObjectAn object describing this pool's distribution type.
distribution.methodStringThe method of distribution (unique|multi).
notification_email_addressStringThe email address for all notifications.
created_atTimestampThe date this pool was created.
updated_atTimestampThe date this pool was last updated.
urlStringThe 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"
}
  • No labels