GET /loyalty/{program_id}/rewardsΒΆ
Get a list of loyalty rewards.
Path parameters:
Name |
Type |
Description |
---|---|---|
|
integer, required |
the loyalty program identifier |
Query parameters:
Name |
Type |
Description |
---|---|---|
|
boolean, optional, default: false |
readable output formatting |
|
string, optional |
a consumer identifier |
|
string, optional, ISO 8601 formatted |
return rewards issued on or after this date and time |
|
string, optional, ISO 8601 formatted |
return rewards issued on or before this date and time |
|
string, optional, default: all |
return rewards that have been claimed, not claimed, or all rewards |
Example request:
GET /loyalty/1/rewards HTTP/1.1
Host: api.ereceipts.co.uk
Accept: application/json
Example response:
This response contains two rewards, sorted over timestamp
in descending
order. See Loyalty Reward Object for a description of the format.
HTTP/1.1 200 OK
Content-Length: 436
Content-Type: application/json; charset=UTF-8
[
{
"claimed": true,
"id": 1,
"identifier": "990000000001",
"name": "Coupon",
"receipt_timestamp": "2013-06-26T12:52:33+00:00",
"timestamp": "2013-06-24T16:25:34+00:00",
"value": 5.0
},
{
"claimed": false,
"id": 2,
"identifier": "990000000002",
"name": "Coupon",
"receipt_timestamp": "2013-06-24T16:25:30+00:00",
"timestamp": "2013-06-24T16:25:31+00:00",
"value": 10.0
}
]
A downloadable CSV file can be requested as follows:
GET /loyalty/1/rewards.csv HTTP/1.1
Host: api.ereceipts.co.uk
Accept: text/csv