Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

An Incentive Code issuance entity is a record of an Issuance of an Incentive Code.

Incentive Code Issuance Entity

The following is the JSON representation of an Incentive Code entity within the APIs.

Code Block
{
  "id": 8,
  "external_issuee_id": "user@mycompany.com",
  "issuee_id": "0eef8961-7568-485b-9b13-fc7dbd1cf712",
  "referring_application": "system",
  "referring_application_ref_id": "1234",
  "incentive_code": {
    "code": "aabb-ccdd",
    "url": "/companies/:id/incentives/codes/:code"
  },
  "incentive_pool": {
    "id": 1,
    "url": "/companies/:id/incentives/pools/:pool_id"
  },
  "updated_at": "2017-02-13T18:34:36Z",
  "created_at": "2017-02-13T18:34:36Z"
}

Elements

Data ElementTypeDescription

id

Integer

Vibes unique identifier for each issuance.

external_issuee_idStringUnique external issuee ID.
issuee_idStringVibes generated issuee ID.
referring_applicationStringApplication issuing the code.
referring_application_ref_idStringApplication reference ID (campaign ID).

incentive_code

Object

An object describing this issuance's Incentive Code.
incentive_code.codeStringIncentive Code.

incentive_code.url

String

Incentive Code's URL.

incentive_pool

Object

An object describing this issuance's Pool.

incentive_pool.idIntegerThe unique identifier for the pool.
incentive_pool.urlStringThe URL to access the Incentive pool resource.
created_atTimestampIssuance date.
updated_atTimestampThe date this issuance was last updated.

Last Updated:

Lastupdatedate

Livesearch
placeholderSearch the Vibes Developer Wiki
typepage

Available API methods

Table of Contents
maxLevel3


An Incentive Code Issuance entity is a record of an issuance of an Incentive Code.

Anchor
getissuancesforanincentivecode
getissuancesforanincentivecode
Get Issuances for an Incentive Code

Code Block
GET /companies/:company_id/incentives/codes/:code/issuances

Response

An array of all

...

Issuances for the given code.

Anchor
issueanincentivecode
issueanincentivecode
Issue an Incentive Code

Code Block
POST /companies/:company_id/incentives/pools/:pool_id/issuances
{
  "external_issuee_id": "312",
  "code": "aabb-ccdd",
  "referring_application": "system",
  "referring_application_ref_id" : "1234"
}

Request Elements

Data ElementRequiredDescription

external_issuee_id

NoUnique external issuee ID.
codeNo

If provided, a specific code is issued.

referring_application

Only in pools requiring a campaign_registration.Application issuing the code.

referring_application_ref_id

Only in pools requiring a campaign_registration.Application reference ID.

Response

It returns an

...

Issuance entity if there was an available code.

Note
Note: An HTTP error code 422 is returned if there are not enough available codes to issue.

Code Issuance

The same code is issued when using the same issuee_id. An

...

Issuance entity is created after each successful

...

Issuance request.