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 8 Next »

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

Get Redemptions for an Incentive Code

 

GET /companies/:id/incentives/codes/:code/redemptions

 

Response

An array of all redemptions for the given code.

Redeem an Incentive Code

POST /companies/: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 issuing 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.
  • No labels