Get all vouchers
POST /api/connector/v1/vouchers/getAll
Returns all rate vouchers filtered by Service, voucher code or voucher identifier. Note this operation uses Pagination and supports Portfolio Access Tokens.
Request Body
Section titled “Request Body ”object
Token identifying the client application.
Access token of the client application.
Name and version of the client application.
Limitation on the quantity of data returned and optional Cursor for the starting point of data.
object
Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token.
Extent of data to be returned. Whether only specific voucher info should be returned or related items as well.
object
Whether the response should contain main information about vouchers.
Whether the response should contain voucher codes used by customers.
Whether the response should contain assignments between vouchers and Rates.
Whether the response should contain detail of related companies.
Whether the response should contain detail of assigned rates.
Unique identifiers of Services where the vouchers belong to.
Unique identifiers of vouchers.
Unique identifiers of the companies.
Value of voucher codes used by customers.
Whether to return only active, only deleted, or both types of record. If not specified, both active and deleted records will be returned.
object
Identifiers of Voucher from external systems.
Example
{ "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "Sample Client 1.0.0", "EnterpriseIds": [ "3fa85f64-5717-4562-b3fc-2c963f66afa6", "4d0201db-36f5-428b-8d11-4f0a65e960cc" ], "ServiceIds": [ "bd26d8db-86da-4f96-9efc-e5a4654a4a94" ], "VoucherIds": [ "fe568bbd-1ecb-4bb2-bf77-96c3698de20d" ], "VoucherCodeValues": [ "TEST-VOUCHER-CODE" ], "UpdatedUtc": { "StartUtc": "2023-10-10T00:00:00Z", "EndUtc": "2023-10-17T00:00:00Z" }, "ExternalIdentifiers": [ "Voucher-001", "Voucher-002" ], "Extent": { "Vouchers": true, "VoucherCodes": true, "VoucherAssignments": true, "Companies": false, "Rates": false }, "ActivityStates": [ "Active" ], "Limitation": { "Count": 10 }}
Responses
Section titled “ Responses ”OK
object
Details about vouchers added to the system.
object
Unique identifier of voucher.
Unique identifier of Service the voucher belongs to.
Internal name of the voucher.
Creation date and time of the voucher in UTC timezone in ISO 8601 format.
Last update date and time of the voucher in UTC timezone in ISO 8601 format.
Type of the voucher.
Public
PartnerCompany
TravelAgency
Unique identifier of Company the voucher is related to.
Unique identifier of Company with Travel agency contract the voucher is related to.
Start of the time interval, expressed as the timestamp for the start of the first time unit, in UTC timezone ISO 8601 format (or null if the start time should not be updated).
End of the time interval, expressed as the timestamp for the start of the last time unit, in UTC timezone ISO 8601 format (or null if the end time should not be updated).
Identifier of the voucher from external system.
Whether the voucher is still active.
Information about voucher codes used by customers.
object
Unique identifier of the voucher code.
Unique identifier of Voucher the code belongs to.
Value of voucher code used by customers.
If specified, marks the beginning of interval in which the code can be used.
If specified, marks the end of interval in which the code can be used.
Creation date and time of the voucher in UTC timezone in ISO 8601 format.
Last update date and time of the voucher in UTC timezone in ISO 8601 format.
Whether voucher code is active or deleted.
Whether the voucher code is still active.
The assigned rates.
Rate
entity, without some of the details, e.g. pricing.
object
Unique identifier of the rate.
Unique identifier of Rate Group
where the rate belongs.
Unique identifier of the Service
.
Unique identifier of the base Rate
.
Whether the rate is a base rate.
Unique identifier of the Business Segment
.
Whether the rate is still active.
Whether the rate is currently available to customers.
Whether the rate is publicly available.
Type of the rate.
Public
Private
AvailabilityBlock
Name of the rate (in the default language).
All translations of the name.
object
Short name of the rate (in the default language).
Interval in which the rates were updated.
All translations of the external name of the rate.
object
All translations of the description of the rate.
object
Identifier of the rate from external system.
The related companies and travel agencies.
object
Unique identifier of the company.
Unique identifier of the chain.
Name of the company.
Unique identifier of mother company.
Email for issuing invoices to the company.
The website url of the company.
The maximum time, when the invoice has to be be paid in ISO 8601 duration format.
Options of the company.
object
Whether the company is invoiceable or not.
Whether the company has an additional fee applied for invoicing or not.
Whether tax-deducted payments should be automatically added to invoices.
Credit rating to define creditworthiness of the company.
object
Indicates the credit status of a company.
CreditOk (Company can book services.)
PaymentRequiredUpfront (Company must pay upfront.)
LocalDecisionRequired (Requires local approval.)
The internal segmentation of a company, e.g. sales department.
The Dun & Bradstreet unique 9-digit DUNS number.
External system identifier - custom identifier used by an external system such as an external database.
Accounting code of the company.
Additional tax identifier of the company.
Billing code of the company.
Other contact details, such as telephone, email or similar.
Contact person of the company.
Electronic invoice identifier of the company.
Fiscal or legal identifier of the company.
Iata of the company.
Whether the company is still active.
Additional notes.
Unique number of the company.
Tax identification number of the company.
Contact telephone number.
Date of Company creation date and time.
Date of Company last update date and time.
object
Unique identifier of the address.
First line of the address.
Second line of the address.
The city.
Postal code.
ISO 3166-1 code of the Country
.
ISO 3166-2 code of the administrative division, e.g. DE-BW
.
The latitude.
The longitude.
Unique identifier of the company Address.
Unique identifier of the account (Customer) to which this company is linked.
Identifier of company from external system.
Unique identifier of the item one newer in time order than the items to be returned. If Cursor is not specified, i.e. null, then the latest or most recent items will be returned.
Example
{ "Vouchers": [ { "Id": "fe568bbd-1ecb-4bb2-bf77-96c3698de20d", "EnterpriseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94", "Type": "Public", "Name": "Weekend Voucher", "CreatedUtc": "2018-11-29T08:17:05Z", "UpdatedUtc": "2020-10-30T13:38:49Z", "ActivityState": "Active", "CompanyId": "3506994b-3c0b-49ba-9f57-ac4700641440", "TravelAgencyId": null, "ExternalIdentifier": "VCHR-278" } ], "VoucherCodes": [ { "VoucherId": "fe568bbd-1ecb-4bb2-bf77-96c3698de20d", "Value": "TEST-VOUCHER-CODE", "ValidityStartUtc": null, "ValidityEndUtc": null, "CreatedUtc": "2020-10-30T13:37:16Z", "UpdatedUtc": "2020-10-30T13:37:16Z", "ActivityState": "Active" }, { "VoucherId": "fe568bbd-1ecb-4bb2-bf77-96c3698de20d", "Value": "05400269B23A59C649E4", "ValidityStartUtc": "2020-10-09T22:00:00Z", "ValidityEndUtc": "2020-10-09T22:00:00Z", "CreatedUtc": "2020-10-09T15:08:14Z", "UpdatedUtc": "2020-10-09T15:08:14Z", "ActivityState": "Active" } ], "VoucherAssignments": [ { "VoucherId": "fe568bbd-1ecb-4bb2-bf77-96c3698de20d", "RateId": "6639eaa9-bbe0-46c0-94a2-aa5d00a2353c" }, { "VoucherId": "fe568bbd-1ecb-4bb2-bf77-96c3698de20d", "RateId": "61133a42-41d2-4e46-b5b0-ab1701268b75" } ], "Rates": null, "Companies": null, "Cursor": "fe568bbd-1ecb-4bb2-bf77-96c3698de20d"}
Server has successfully fulfilled the request and there is no additional information to send back.
object
Error caused by the client app, e.g. in case of malformed request or invalid identifier of a resource. In most cases, such an error signifies a bug in the client app (consumer of the API).
object
Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.
object
Server error that should be reported to the end user of the client app. Happens for example when the server-side validation fails or when a business-logic check is violated.
object
Error caused by heavy request that takes too long to process (typically tens of seconds). To get around this, request data in smaller batches. For more information, see Request timeouts
object
Error caused by too many requests sent in a given amount of time. Response contains Retry-After
header indicating how long the user agent should wait before making a follow-up request. For more information, see Request limits.
object
Unexpected error on the Mews side. This may be due to a software fault. If such a situation occurs, the error will be logged and the development team notified, however you can raise an issue through GitHub on our documentation repository.