Secret API key bound to an environment.
In: header
Query Parameters
1 <= value <= 20050length <= 2048Value in
- "active"
- "archived"
Header Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rewards"{ "data": [ { "id": "string", "name": "string", "cost": 0, "currency": "string", "availability": 0, "issued": 0, "expiry_after": "string", "status": "active", "version": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "next_cursor": "string", "has_more": true}Secret API key bound to an environment.
In: header
Header Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/rewards" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "name": "Reward", "cost": 0 }'{ "id": "string", "name": "string", "cost": 0, "currency": "string", "availability": 0, "issued": 0, "expiry_after": "string", "status": "active", "version": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rewards/string"{ "id": "string", "name": "string", "cost": 0, "currency": "string", "availability": 0, "issued": 0, "expiry_after": "string", "status": "active", "version": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Optional legacy revision. Missing or malformed values follow the existing route parser.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/rewards/string" \ -H "Content-Type: application/json" \ -d '{ "name": "Updated" }'{ "id": "string", "name": "string", "cost": 0, "currency": "string", "availability": 0, "issued": 0, "expiry_after": "string", "status": "active", "version": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/rewards/string"Secret API key bound to an environment.
In: header
Query Parameters
1 <= value <= 20050length <= 2048Value in
- "issued"
- "redeemed"
- "cancelled"
- "expired"
Header Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/reward_issuances"{ "data": [ { "id": "string", "reward_id": "string", "customer_id": "string", "status": "issued", "source_type": "rule_execution", "source_id": "string", "cost": 0, "currency": "string", "cost_entry_id": "string", "expires_at": "2019-08-24T14:15:22Z", "redeemed_at": "2019-08-24T14:15:22Z", "cancelled_at": "2019-08-24T14:15:22Z", "version": 0, "created_at": "2019-08-24T14:15:22Z" } ], "next_cursor": "string", "has_more": true}Secret API key bound to an environment.
In: header
Header Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/reward_issuances" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "reward_id": "rw_0123456789abcdef0123456789abcdef", "customer_id": "cust_0123456789abcdef0123456789abcdef" }'{ "id": "string", "reward_id": "string", "customer_id": "string", "status": "issued", "source_type": "rule_execution", "source_id": "string", "cost": 0, "currency": "string", "cost_entry_id": "string", "expires_at": "2019-08-24T14:15:22Z", "redeemed_at": "2019-08-24T14:15:22Z", "cancelled_at": "2019-08-24T14:15:22Z", "version": 0, "created_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/reward_issuances/string"{ "id": "string", "reward_id": "string", "customer_id": "string", "status": "issued", "source_type": "rule_execution", "source_id": "string", "cost": 0, "currency": "string", "cost_entry_id": "string", "expires_at": "2019-08-24T14:15:22Z", "redeemed_at": "2019-08-24T14:15:22Z", "cancelled_at": "2019-08-24T14:15:22Z", "version": 0, "created_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Optional. When sent, the stored response is replayed for 24 h.
1 <= length <= 255Optional legacy revision. Missing or malformed values follow the existing route parser.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/reward_issuances/string/redeem"{ "id": "string", "reward_id": "string", "customer_id": "string", "status": "issued", "source_type": "rule_execution", "source_id": "string", "cost": 0, "currency": "string", "cost_entry_id": "string", "expires_at": "2019-08-24T14:15:22Z", "redeemed_at": "2019-08-24T14:15:22Z", "cancelled_at": "2019-08-24T14:15:22Z", "version": 0, "created_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Optional. When sent, the stored response is replayed for 24 h.
1 <= length <= 255Optional legacy revision. Missing or malformed values follow the existing route parser.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/reward_issuances/string/cancel" \ -H "Content-Type: application/json" \ -d '{ "reason": "Cancelled by operator" }'{ "id": "string", "reward_id": "string", "customer_id": "string", "status": "issued", "source_type": "rule_execution", "source_id": "string", "cost": 0, "currency": "string", "cost_entry_id": "string", "expires_at": "2019-08-24T14:15:22Z", "redeemed_at": "2019-08-24T14:15:22Z", "cancelled_at": "2019-08-24T14:15:22Z", "version": 0, "created_at": "2019-08-24T14:15:22Z"}