Connector API
Search…
Vouchers

Get all vouchers

Returns all rate vouchers filtered by Service, voucher code or voucher identifier.

Request

[PlatformAddress]/api/connector/v1/vouchers/getAll
1
{
2
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
3
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
4
"Client": "Sample Client 1.0.0",
5
"ServiceIds": [
6
"bd26d8db-86da-4f96-9efc-e5a4654a4a94"
7
],
8
"VoucherIds": [
9
"fe568bbd-1ecb-4bb2-bf77-96c3698de20d"
10
],
11
"VoucherCodeValues": [
12
"TEST-VOUCHER-CODE"
13
],
14
"Extent": {
15
"Vouchers": true,
16
"VoucherCodes": true,
17
"VoucherAssignments": true,
18
"Companies": false,
19
"Rates": false
20
},
21
"ActivityStates": [
22
"Active"
23
]
24
}
Copied!
Property
Type
Contract
Description
ClientToken
string
required
Token identifying the client application.
AccessToken
string
required
Access token of the client application.
Client
string
required
Name and version of the client application.
ServiceIds
array of string
required, max 1000 items
Unique identifiers of Services where the vouchers belong to.
VoucherIds
array of string
optional, max 1000 items
Unique identifiers of vouchers.
VoucherCodeValues
array of string
optional, max 1000 items
Value of voucher codes used by customers.
Extent
required
Extent of data to be returned. Whether only specific voucher info should be returned or related items as well.
ActivityStates
array of string Activity state
required
Whether return only active, only deleted or both records.

Voucher extent

Property
Type
Contract
Description
Vouchers
bool
optional
Whether the response should contain main information about vouchers.
VoucherCodes
bool
optional
Whether the response should contain voucher codes used by customers.
VoucherAssignments
bool
optional
Whether the response should contain assignments between vouchers and Rates.
Companies
bool
optional
Whether the response should contain detail of related companies.
Rates
bool
optional
Whether the response should contain detail of assigned rates.

Activity state

  • Active - active records (the validity might be restricted by another parameter i.e. interval).
  • Deleted- deleted records.

Response

1
{
2
"Vouchers": [
3
{
4
"Id": "fe568bbd-1ecb-4bb2-bf77-96c3698de20d",
5
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
6
"Name": "Weekend Voucher",
7
"CreatedUtc": "2018-11-29T08:17:05Z",
8
"UpdatedUtc": "2020-10-30T13:38:49Z",
9
"ActivityState": "Active",
10
"CompanyId": "3506994b-3c0b-49ba-9f57-ac4700641440",
11
"TravelAgencyId": null
12
}
13
],
14
"VoucherCodes": [
15
{
16
"VoucherId": "fe568bbd-1ecb-4bb2-bf77-96c3698de20d",
17
"Value": "TEST-VOUCHER-CODE",
18
"ValidityStartUtc": null,
19
"ValidityEndUtc": null,
20
"CreatedUtc": "2020-10-30T13:37:16Z",
21
"UpdatedUtc": "2020-10-30T13:37:16Z",
22
"ActivityState": "Active"
23
},
24
{
25
"VoucherId": "fe568bbd-1ecb-4bb2-bf77-96c3698de20d",
26
"Value": "05400269B23A59C649E4",
27
"ValidityStartUtc": "2020-10-09T22:00:00Z",
28
"ValidityEndUtc": "2020-10-09T22:00:00Z",
29
"CreatedUtc": "2020-10-09T15:08:14Z",
30
"UpdatedUtc": "2020-10-09T15:08:14Z",
31
"ActivityState": "Active"
32
}
33
],
34
"VoucherAssignments": [
35
{
36
"VoucherId": "fe568bbd-1ecb-4bb2-bf77-96c3698de20d",
37
"RateId": "6639eaa9-bbe0-46c0-94a2-aa5d00a2353c"
38
},
39
{
40
"VoucherId": "fe568bbd-1ecb-4bb2-bf77-96c3698de20d",
41
"RateId": "61133a42-41d2-4e46-b5b0-ab1701268b75"
42
}
43
],
44
"Rates": null,
45
"Companies": null
46
}
Copied!
Property
Type
Contract
Description
Vouchers
array of Voucher
optional
Main information about voucher.
VoucherCodes
array of Voucher code
optional
Information about voucher codes used by customers.
VoucherAssignments
array of Voucher assignment
optional
The assignments between vouchers and Rates.
Rates
array of Rate
optional
The assigned rates.
Companies
array of Company
optional
The related companies and travel agencies.

Voucher

Property
Type
Contract
Description
Id
string
required
Unique identifier of voucher.
ServiceId
string
required
Unique identifier of Service the voucher belongs to.
Name
string
required
Internal name of the voucher.
CreatedUtc
string
required
Creation date and time of the voucher in UTC timezone in ISO 8601 format.
UpdatedUtc
string
required
Last update date and time of the voucher in UTC timezone in ISO 8601 format.
ActivityState
string Activity state
required
Whether voucher is active or deleted.
CompanyId
string
optional
Unique identifier of Company the voucher is related to.
TravelAgencyId
string
optional
Unique identifier of Company with Travel agency contract the voucher is related to.

Voucher code

Property
Type
Contract
Description
VoucherId
string
required
Unique identifier of Voucher the code belongs to.
Value
string
required
Value of voucher code used by customers.
ValidityStartUtc
string
optional
If specified, marks the beginning of interval in which the code can be used.
ValidityEndUtc
string
optional
If specified, marks the end of interval in which the code can be used.
CreatedUtc
string
required
Creation date and time of the voucher in UTC timezone in ISO 8601 format.
UpdatedUtc
string
required
Last update date and time of the voucher in UTC timezone in ISO 8601 format.
ActivityState
string Activity state
required
Whether voucher code is active or deleted.

Voucher assignment

Property
Type
Contract
Description
VoucherId
string
required
Unique identifier of Voucher.
RateId
string
required
Unique identifier of Rate the voucher is assigned with.
Last modified 3mo ago