Versions Compared

Key

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

An Incentive Code Redemption entity is a record of a Redemption of an Incentive Code.

Incentive Code Redemption Entity

The following is the JSON representation of an Incentive Code Redemption entity within the Application Program Interfaces (APIs).

Elements

{
  "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/1"
  },
  "updated_at": "2017-02-13T18:34:36Z",
  "created_at": "2017-02-13T18:34:36Z"
}

id

Integer

Vibes unique identifier for each redemption.

external_issuee_idStringUnique external issuee ID.
issuee_idStringVibes-generated issuee ID.

referring_application

String

Application redeeming the code.

referring_application_ref_idStringApplication reference ID (campaign ID).

incentive_code

Object

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

incentive_code.url

String

Incentive Code's URL.

incentive_pool

Object

An object describing this Redemption's pool.

incentive_pool.idIntegerThe unique identifier for the pool.
incentive_pool.urlStringPool's URL.
created_atTimestampRedemption date.
updated_atTimestampThe date this Redemption was last updated.

Last Updated:

Lastupdatedate

Livesearch
placeholderSearch the Vibes Developer Wiki
typepage

Available API methods

Table of Contents
maxLevel3


An Incentive Code Redemption entity is a record of a Redemption of an Incentive Code.

Anchor
getredemptionsforanincentivecode
getredemptionsforanincentivecode
Get Redemptions for an Incentive Code

...


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

...

Response

An array of all Redemptions for the given code.

Anchor
redeemanincentivecode
redeemanincentivecode
Redeem an Incentive Code

Code Block
POST /companies/:company_id/incentives/codes/:code/redemptions
{
  "external_issuee_id": "312",
  "issuee_id": "1234-5678",
  "referring_application": "system",
  "referring_application_ref_id" : "1234"  
}

Request Elements

Data Element
Required
Description

external_issuee_id

NoUnique external issuee ID.
issuee_idNoVibes-generated issuee ID.

referring_application

NoApplication

...

redeeming the code.

referring_application_ref_id

NoApplication reference ID.

Response

It returns a Redemption entity if the code was successfully redeemed.

An HTTP 422 error code is returned in the following cases:

  • When using an invalid issuee_id or external_issuee_id.
  • When using a 'unique' pool type, and the code has already been redeemed.