Vouchers
You can either validate vouchers which will return information such as SKU and expiry date, or you can claim vouchers via our API.
The request format for both validation and claiming is identical, allowing you to structure and reuse the same data for both operations. When performing a validation request, the claim_date field is optional and will be ignored if provided. This means you can safely include it in both requests without needing to modify the payload.
Validate Vouchers
This endpoint allows you to validate vouchers and receive information about the voucher such as SKU and expiry date.
Required Attributes
- Name
vouchers
- Type
- array
- Description
An array of voucher numbers you want to validate.
Optional Attributes
- Name
claim_date
- Type
- string
- Description
Will be ignored and is not needed, but you can send it to keep the payload for validation and to claiming the same.
Response Status Codes
- Name
200
- Type
- success
- Description
The request has been successful.
- Name
400
- Type
- contains errors
- Description
The request went through but some vouchers could not be validated. Check the errors array in your payload.
- Name
others
- Type
- see errors section
- Description
Check Errors Guide for general errors.
Request
curl -X POST https://www.wonderdays.co.uk/api/v1/vouchers/claim \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"vouchers": [
{
"voucher_number": "WD1111TEST",
// "claim_date": "2026-03-21" // Not needed, but can be send.
},
{
// ...
}
]
}'
Response
{
"data": [
{
"customer_first_name": "Peter",
"customer_email": "[email protected]",
"product_name": "Supercar Experience",
"product_sku": "SKU1234",
"voucher_live": true,
"voucher_claimed": false,
"voucher_number": "WD1111TEST",
"voucher_expiry": "2026-03-21",
},
{
// ...
}
]
}
Claim vouchers
This endpoint allows you to claim multiple vouchers.
Required attributes
- Name
vouchers
- Type
- Claim Object
- Description
An array with Voucher Claim objects.
Claim Object
- Name
voucher_number
- Type
- string
- Description
The description for the group.
- Name
claim_date
- Type
- string
- Description
A date as string in the format 'Y-m-d'.
Response Status Codes
- Name
200
- Type
- success
- Description
The request has been successful.
- Name
400
- Type
- contains errors
- Description
The request went through but some vouchers could not be claimed. Check the errors array in your payload.
- Name
others
- Type
- see errors section
- Description
Check Errors Guide for general errors.
Request
curl -X POST https://wonderdays.co.uk/api/v1/vouchers/claim \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"vouchers": [
{
"voucher_number": "WD1111TEST",
"claim_date": "2026-03-21"
},
{
// ...
}
]
}'
Response
{
"data": [
{
"customer_first_name": "Peter",
"customer_email": "[email protected]",
"product_name": "Supercar Experience",
"product_sku": "SKU1234",
"voucher_live": false,
"voucher_claimed": true,
"voucher_number": "WD111TEST",
"voucher_expiry": "2026-03-21",
},
{
// ...
}
]
}
Feel free to test the API using the suggested voucher numbers below. Use the same API key but use the different test endpoint /api/v1/test/vouchers/validate.
[TEST] Validate Vouchers
This endpoint allows you to test the vouchers's validation endpoint.
Required Attributes
- Name
vouchers
- Type
- array
- Description
An array of voucher numbers you want to validate.
Voucher Numbers to Trigger Success
- Name
success
- Type
- array
- Description
Use WD1111TEST and/or WD2222TEST to test for success.
Voucher Numbers to Trigger Errors
- Name
Voucher not found
- Type
- WD1111NOTFOUND
- Description
Use WD1111NOTFOUND to return error message that a voucher could not be found in the system.
- Name
Voucher claimed
- Type
- WD1111CLAIMED
- Description
Use WD1111CLAIMED to return error message that a voucher has already been claimed.
- Name
Voucher refunded
- Type
- WD1111REFUNDED
- Description
Use WD1111REFUNDED to return error message that a voucher has been refunded
- Name
Voucher redeemed
- Type
- WD1111REDEEMED
- Description
Use WD1111REDEEMED to return error message that a voucher has been redeemed
- Name
Voucher has expired
- Type
- WD1111EXPIRED
- Description
Use WD1111EXPIRED to return error message that a voucher has expired.
- Name
Voucher belongs to another partner
- Type
- WD1111WRONGPARTNER
- Description
Use WD1111WRONGPARTNER to return error message that a voucher belongs to another partner.
Request
curl -X POST https://wonderdays.co.uk/api/v1/test/vouchers/validate \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"vouchers": [
{ "voucher_number": "WD1111TEST" },
{ "voucher_number": "WD2222TEST" },
{ "voucher_number": "WD1111NOTFOUND" }
]
}'
Response
{
"data": [
{
"customer_first_name": "Peter",
"customer_email": "[email protected]",
"product_name": "Supercar Experience",
"product_sku": "SKU1234",
"voucher_live": true,
"voucher_claimed": false,
"voucher_number": "WD111TEST",
"voucher_expiry": "2026-03-21",
},
{
// ...
}
],
"errors": [
{
"WD1111NOTFOUND": {
"message": "Voucher does not exist"
}
}
]
}
Feel free to test the API using the suggested voucher numbers below. Use the same API key but use the different test endpoint /api/v1/test/vouchers/claim.
[TEST] Claim Vouchers
This endpoint allows you to test the claim vouchers endpoint.
Required Attributes
- Name
vouchers
- Type
- Claim Object
- Description
An array with Voucher Claim objects.
Claim Object
- Name
voucher_number
- Type
- string
- Description
A voucher number as string
- Name
claim_date
- Type
- string
- Description
A date as string in the format 'Y-m-d'.
Voucher Numbers to Trigger Success
- Name
success
- Type
- array
- Description
Use WD1111TEST and/or WD2222TEST to test for success.
Voucher Numbers to Trigger Errors
- Name
voucher_number / claim_date missing
- Type
- any
- Description
Just leave out the voucher_number or claim_date
- Name
claim_date
- Type
- 1-1-26
- Description
Use to trigger an claim date error. Wrong format.
- Name
Voucher not found
- Type
- WD1111NOTFOUND
- Description
Use WD1111NOTFOUND to return error message that a voucher does exist.
- Name
Voucher claimed
- Type
- WD1111CLAIMED
- Description
Use WD1111CLAIMED to return error message that a voucher has already been claimed.
- Name
Voucher refunded
- Type
- WD1111REFUNDED
- Description
Use WD1111REFUNDED to return error message that a voucher has been refunded
- Name
Voucher redeemed
- Type
- WD1111REDEEMED
- Description
Use WD1111REDEEMED to return error message that a voucher has been redeemed
- Name
Voucher expired
- Type
- WD1111EXPIRED
- Description
Use WD1111EXPIRED to return error message that a voucher has expired.
- Name
Voucher claim date after expiration
- Type
- WD1111CLAIMDATEAFTEREXPIRATION
- Description
Use WD1111CLAIMDATEAFTEREXPIRATION to return error message that a the claim date is after the expiration date.
- Name
Voucher belongs to another partner
- Type
- WD1111WRONGPARTNER
- Description
Use WD1111WRONGPARTNER to return error message that a voucher belongs to another partner.
Request
curl -X POST https://wonderdays.co.uk/api/v1/test/vouchers/claim \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"vouchers": [
{
"voucher_number": "1234",
"claim_date": "202x-03-21"
},
{
// ...
}
]
}'
Response
{
"data": [
{
"customer_first_name": "Peter",
"customer_email": "[email protected]",
"product_name": "Supercar Experience",
"product_sku": "SKU1234",
"voucher_live": false,
"voucher_claimed": true,
"voucher_number": "WD111TEST",
"voucher_expiry": "2026-03-21",
},
{
// ...
}
]
}
Soft Errors
You may receive an array of errors. This array will contain the voucher number with a corresponding error message.
The key of the error is corresponding to the voucher number or if not number has been passed, it's the number of the voucher in the array (zero index based).
In the example below, the voucher_number WD1111TEST was successfully validated. The voucher with the number WD1111NOTFOUND could not be found in the system.
If an error occurs a 400 error will be returned. This does not automatically mean every voucher_number in the payload failed but it gives you a heads up that some errors exists and you should check the response.
Errors
{
"data": [
{
"customer_first_name": "Peter",
"voucher_number": "WD1111TEST",
// ...
},
{
// ...
}
],
"errors": {
"WD1111NOTFOUND": {
"message": "Voucher does not exist"
}
{ ... }
}
}