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" }
Data Element | Type | Description |
---|---|---|
id | Integer | Vibes unique identifier for each redemption. |
external_issuee_id | String | Unique external issuee ID. |
issuee_id | String | Vibes-generated issuee ID. |
referring_application | String | Application redeeming the code. |
referring_application_ref_id | String | Application reference ID (campaign ID). |
incentive_code | Object | An object describing this Redemption's Incentive Code. |
incentive_code.code | String | Incentive Code. |
incentive_code.url | String | Incentive Code's URL. |
incentive_pool | Object | An object describing this Redemption's pool. |
incentive_pool.id | Integer | The unique identifier for the pool. |
incentive_pool.url | String | Pool's URL. |
created_at | Timestamp | Redemption date. |
updated_at | Timestamp | The 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 | No | Unique external issuee ID. |
issuee_id | No | Vibes-generated issuee ID. |
referring_application | No | Application issuing the code. |
referring_application_ref_id | No | Application 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.
Overview
Content Tools