Skip to content

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.

VoucherFilterParameters
object
ClientToken
required

Token identifying the client application.

string
>= 1 characters
AccessToken
required

Access token of the client application.

string
>= 1 characters
Client
required

Name and version of the client application.

string
>= 1 characters
Limitation
required

Limitation on the quantity of data returned and optional Cursor for the starting point of data.

object
Count
required
integer format: int32
Cursor
string format: uuid
nullable
EnterpriseIds

Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token.

Array<string>
nullable >= 1 items <= 1000 items
Extent
required
Voucher Extent

Extent of data to be returned. Whether only specific voucher info should be returned or related items as well.

object
Vouchers

Whether the response should contain main information about vouchers.

boolean
nullable
VoucherCodes

Whether the response should contain voucher codes used by customers.

boolean
nullable
VoucherAssignments

Whether the response should contain assignments between vouchers and Rates.

boolean
nullable
Companies

Whether the response should contain detail of related companies.

boolean
nullable
Rates

Whether the response should contain detail of assigned rates.

boolean
nullable
ServiceIds
required

Unique identifiers of Services where the vouchers belong to.

Array<string>
>= 1 items <= 1000 items
VoucherIds

Unique identifiers of vouchers.

Array<string>
nullable >= 1 items <= 1000 items
CompanyIds

Unique identifiers of the companies.

Array<string>
nullable >= 1 items <= 1000 items
VoucherCodeValues

Value of voucher codes used by customers.

Array<string>
nullable >= 1 items <= 1000 items
ActivityStates

Whether to return only active, only deleted, or both types of record. If not specified, both active and deleted records will be returned.

Array<string>
nullable
Allowed values: Deleted Active
UpdatedUtc
TimeFilterInterval
object
StartUtc
string format: date-time
nullable
EndUtc
string format: date-time
nullable
ExternalIdentifiers

Identifiers of Voucher from external systems.

Array<string>
nullable >= 1 items <= 1000 items
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
}
}

OK

VoucherResult
object
Vouchers

Details about vouchers added to the system.

Array<object>
nullable
Voucher
object
Id
required

Unique identifier of voucher.

string format: uuid
ServiceId
required

Unique identifier of Service the voucher belongs to.

string format: uuid
Name
required

Internal name of the voucher.

string
>= 1 characters <= 128 characters
CreatedUtc
required

Creation date and time of the voucher in UTC timezone in ISO 8601 format.

string format: date-time
>= 1 characters
UpdatedUtc
required

Last update date and time of the voucher in UTC timezone in ISO 8601 format.

string format: date-time
>= 1 characters
Type
required
Voucher Type

Type of the voucher.

Public

PartnerCompany

TravelAgency

string
Allowed values: Public PartnerCompany TravelAgency
ActivityState
Any of:
Activity State
string
Allowed values: Deleted Active
CompanyId

Unique identifier of Company the voucher is related to.

string format: uuid
nullable
TravelAgencyId

Unique identifier of Company with Travel agency contract the voucher is related to.

string format: uuid
nullable
OccupiableIntervalStartUtc

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).

string format: date-time
nullable
OccupiableIntervalEndUtc

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).

string format: date-time
nullable
ExternalIdentifier

Identifier of the voucher from external system.

string
nullable <= 255 characters
IsActive
required

Whether the voucher is still active.

boolean
VoucherCodes

Information about voucher codes used by customers.

Array<object>
nullable
Voucher code
object
Id

Unique identifier of the voucher code.

string format: uuid
VoucherId

Unique identifier of Voucher the code belongs to.

string format: uuid
Value

Value of voucher code used by customers.

string
nullable
ValidityStartUtc

If specified, marks the beginning of interval in which the code can be used.

string
nullable
ValidityEndUtc

If specified, marks the end of interval in which the code can be used.

string
nullable
CreatedUtc

Creation date and time of the voucher in UTC timezone in ISO 8601 format.

string
nullable
UpdatedUtc

Last update date and time of the voucher in UTC timezone in ISO 8601 format.

string
nullable
ActivityState

Whether voucher code is active or deleted.

string
nullable
IsActive

Whether the voucher code is still active.

boolean
VoucherAssignments

The assignments between vouchers and Rates.

Array<object>
nullable
Voucher assignment
object
VoucherId

Unique identifier of Voucher.

string format: uuid
RateId

Unique identifier of Rate the voucher is assigned with.

string format: uuid
Rates

The assigned rates.

Array<object>
nullable
Rate for extent

Rate entity, without some of the details, e.g. pricing.

object
Id
required

Unique identifier of the rate.

string format: uuid
GroupId
required

Unique identifier of Rate Group where the rate belongs.

string format: uuid
ServiceId
required

Unique identifier of the Service.

string format: uuid
BaseRateId

Unique identifier of the base Rate.

string format: uuid
nullable
IsBaseRate
required

Whether the rate is a base rate.

boolean
BusinessSegmentId

Unique identifier of the Business Segment.

string format: uuid
nullable
IsActive
required

Whether the rate is still active.

boolean
IsEnabled
required

Whether the rate is currently available to customers.

boolean
IsPublic
required

Whether the rate is publicly available.

boolean
Type
required
Rate type

Type of the rate.

Public

Private

AvailabilityBlock

string
Allowed values: Public Private AvailabilityBlock
Name

Name of the rate (in the default language).

string
nullable
Names
required
Localized text

All translations of the name.

object
key
additional properties
string
ShortName

Short name of the rate (in the default language).

string
nullable
UpdatedUtc
required

Interval in which the rates were updated.

string format: date-time
>= 1 characters
ExternalNames
Localized text

All translations of the external name of the rate.

object
key
additional properties
string
Description
Localized text

All translations of the description of the rate.

object
key
additional properties
string
ExternalIdentifier

Identifier of the rate from external system.

string
nullable <= 255 characters
Companies

The related companies and travel agencies.

Array<object>
nullable
Company
object
Id
required

Unique identifier of the company.

string format: uuid
ChainId
required

Unique identifier of the chain.

string format: uuid
Name
required

Name of the company.

string
>= 1 characters
MotherCompanyId

Unique identifier of mother company.

string format: uuid
nullable
InvoicingEmail

Email for issuing invoices to the company.

string format: email
nullable
WebsiteUrl

The website url of the company.

string format: uri
nullable
InvoiceDueInterval

The maximum time, when the invoice has to be be paid in ISO 8601 duration format.

string
nullable
Options
required
Company Options

Options of the company.

object
Invoiceable

Whether the company is invoiceable or not.

boolean
AddFeesToInvoices

Whether the company has an additional fee applied for invoicing or not.

boolean
AddTaxDeductedPaymentToInvoices

Whether tax-deducted payments should be automatically added to invoices.

boolean
CreditRating
required
Credit Rating

Credit rating to define creditworthiness of the company.

object
Basic

Indicates the credit status of a company.

CreditOk (Company can book services.)

PaymentRequiredUpfront (Company must pay upfront.)

LocalDecisionRequired (Requires local approval.)

string
Allowed values: CreditOk PaymentRequiredUpfront LocalDecisionRequired
Department

The internal segmentation of a company, e.g. sales department.

string
nullable
DunsNumber

The Dun & Bradstreet unique 9-digit DUNS number.

string
nullable
ReferenceIdentifier

External system identifier - custom identifier used by an external system such as an external database.

string
nullable
AccountingCode

Accounting code of the company.

string
nullable
AdditionalTaxIdentifier

Additional tax identifier of the company.

string
nullable
BillingCode

Billing code of the company.

string
nullable
Contact

Other contact details, such as telephone, email or similar.

string
nullable
ContactPerson

Contact person of the company.

string
nullable
ElectronicInvoiceIdentifier

Electronic invoice identifier of the company.

string
nullable
Identifier

Fiscal or legal identifier of the company.

string
nullable
Iata

Iata of the company.

string
nullable
IsActive
required

Whether the company is still active.

boolean
Notes

Additional notes.

string
nullable
Number
required

Unique number of the company.

integer format: int64
TaxIdentifier

Tax identification number of the company.

string
nullable
Telephone

Contact telephone number.

string format: tel
nullable
CreatedUtc

Date of Company creation date and time.

string format: date-time
nullable
UpdatedUtc

Date of Company last update date and time.

string format: date-time
nullable
Address
Address
object
Id

Unique identifier of the address.

string format: uuid
Line1

First line of the address.

string
nullable
Line2

Second line of the address.

string
nullable
City

The city.

string
nullable
PostalCode

Postal code.

string
nullable
CountryCode

ISO 3166-1 code of the Country.

string
nullable
CountrySubdivisionCode

ISO 3166-2 code of the administrative division, e.g. DE-BW.

string
nullable
Latitude

The latitude.

number format: double
nullable
Longitude

The longitude.

number format: double
nullable
AddressId

Unique identifier of the company Address.

string format: uuid
nullable
MergeTargetId

Unique identifier of the account (Customer) to which this company is linked.

string format: uuid
nullable
TaxIdentificationNumber
string
nullable
ExternalIdentifier

Identifier of company from external system.

string
nullable <= 255 characters
Cursor

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.

string format: uuid
nullable
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.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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).

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable