Check voucher code

Overview

A vouchers current status can be checked within Airship. This will return the following information:
  • Contact id associated
  • Redemption unit (if redeemed)
  • Redemption date/time (if redeemed)
  • Status;
    • "Active" (not yet redeemed)
    • "Redeemed"

Example Request

GET
1
https://api.airship.co.uk/v1/unique_code
Copied!

Configuration

Headers

Field
Notes
Authentication (bearer token)
The authentication token is linked to the account that you are searching bookings in. If you are unsure of what your Authentication token is, ask our support team to confirm.

Body

Field
Notes
account_id
The account ID represents the account that you are searching bookings in. If you are unsure of what your account ID is, ask our support team to confirm.
unique_code
The unique voucher code which you are searching for.
unique_code_group_id
The unique voucher code group which the voucher is associated with. As the same voucher code can exist in different code groups (be issued in different campaigns at different points in time) - the ucgid enables us to narrow down which code is being searched for.

Basic Payload example

Request
200 Response
422 Response
1
{
2
"account_id": 2,
3
"unique_code": "AB9201E11",
4
"unique_code_group_id": 14252
5
}
Copied!
  1. 1.
    Code Active
1
{
2
"id": 62123810,
3
"unique_code": "AB9201E11",
4
"unique_code_group_id": "14252",
5
"contact_id": "51626835",
6
"redeemed_at_unit_id": "0",
7
"redeemed_at_datetime": "0000-00-00 00:00:00",
8
"unique_code_status": "Active"
9
}
Copied!
2. Code redeemed
1
{
2
"id": 62123810,
3
"unique_code": "AB9201E11",
4
"unique_code_group_id": "14252",
5
"contact_id": "51626835",
6
"redeemed_at_unit_id": "14458",
7
"redeemed_at_datetime": "2021-11-02 10:12:26",
8
"unique_code_status": "Redeemed"
9
}
Copied!
  1. 1.
    Invalid Unique Code Group ID
1
{
2
"message": "The given data was invalid.",
3
"errors": {
4
"unique_code_group_id": [
5
"This unique code group id doesn't exist"
6
]
7
}
8
}
Copied!
2. Invalid Unique Code
1
{
2
"message": "The given data was invalid.",
3
"errors": {
4
"unique_code": [
5
"This unique code doesn't exist"
6
]
7
}
8
}
Copied!
3. Invalid Account ID
1
{
2
"message": "The given data was invalid.",
3
"errors": {
4
"account_id": [
5
"You do not have access to this account"
6
]
7
}
8
}
Copied!