7b222e8ec91c
List voucher codes
Returns a list of paginated voucher codes
Path parameters
The unique identifier for the existing voucher
Query parameters
The number of items to retrieve
Unix timestamp filter that returns items with matched expiry_date value.
Unix timestamp filter that returns items with expiry_date greater than the given value.
Unix timestamp filter that returns items with expiry_date greater than or equal to the given value.
Unix timestamp filter that returns items with expiry_date less than given value.
Unix timestamp filter that returns items with expiry_date less than or equal given value.
Unix timestamp filter that returns items with matched created_at value.
Unix timestamp filter that returns items with created_at greater than given value.
Unix timestamp filter that returns items with created_at greater than or equal given value.
Unix timestamp filter that returns items with created_at less than given value.
Unix timestamp filter that returns items with created_at less than or equal given value.
Response
Successfully returned the list of voucher codes
Example response
{
"data": [
{
"object": "voucher_code",
"id": "vc_123",
"code": "Test Voucher Code",
"expiry": {
"date": "2020-05-01",
"formatted": "Fri 1 May 2020 10:30 PM",
"iso": "2020-05-01T22:30:00+01:00",
"time": "22:30",
"timezone": "+01:00",
"unix": 1588368600
},
"used": {
"date": "2020-05-01",
"formatted": "Fri 1 May 2020 10:30 PM",
"iso": "2020-05-01T22:30:00+01:00",
"time": "22:30",
"timezone": "+01:00",
"unix": 1588368600
},
"value": 540,
"voucher_id": "vo_123"
}
],
"links": {
"next": "/v1/vouchers/vo_123456/codes?starting_after=vc_123",
"previous": "/v1/vouchers/vo_123456/codes?ending_before=vc_321"
}
}