List Member Vouchers
Returns vouchers that are eligible or issued for a specific member.
Example curl:
```bash
curl --request POST '{{base_url}}/sp/members/vouchers/list' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"contact_id": {{contact_id}},
"location_id": {{location_id}},
"per_page": 25,
"page": 1
}'
```
Example success response shape:
```json
{
"success": true,
"message": "OK",
"data": [
{
"voucher_id": 10,
"campaign_name": "Birthday Voucher",
"coupon_code": "BIRTHDAY10",
"coupon_value": 10,
"eligible": true
}
],
"meta": {
"pagination": {
"total": 1,
"per_page": 25,
"current_page": 1,
"last_page": 1,
"from": 1,
"to": 1
}
}
}
```
Example error response shape:
```json
{
"success": false,
"message": "Unauthorized.",
"error": {
"code": "unauthorized",
"details": {}
}
}
```
Common platform errors:
- `sp_scope_not_granted`
- `sp_token_scope_missing`
- `sp_location_not_allowed`
- `legacy_field_not_allowed`
- `query_parameters_not_allowed`
- `invalid_content_type`
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Headers
Authorization
Response
200 OK Example
success
message
data
meta
