---
title: "Get all vouchers"
method: POST
path: "/api/connector/v1/vouchers/getAll"
tags: ["Vouchers"]
---

# Get all vouchers

`POST /api/connector/v1/vouchers/getAll`

Returns all rate vouchers filtered by [Service](https://mews-systems.gitbook.io/connector-api/operations/services/#service), voucher code or voucher identifier. Note this operation uses [Pagination](https://mews-systems.gitbook.io/connector-api/guidelines/pagination/) and supports [Portfolio Access Tokens](https://mews-systems.gitbook.io/connector-api/concepts/multi-property).

## Request body

- VoucherFilterParameters
  - `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.
  - `Limitation` Limitation, required — Limitation on the quantity of data returned.
    - `Count` integer, required
    - `Cursor` string, uuid, nullable
  - `EnterpriseIds` string[], nullable — Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token.
  - `Extent` VoucherExtent, required — Extent of data to be returned. Whether only specific voucher info should be returned or related items as well.
    - `Vouchers` boolean, nullable — Whether the response should contain main information about vouchers.
    - `VoucherCodes` boolean, nullable — Whether the response should contain voucher codes used by customers.
    - `VoucherAssignments` boolean, nullable — Whether the response should contain assignments between vouchers and Rates.
    - `Companies` boolean, nullable — Whether the response should contain detail of related companies.
    - `Rates` boolean, nullable — Whether the response should contain detail of assigned rates.
  - `ServiceIds` string[], required — Unique identifiers of [Services](https://mews-systems.gitbook.io/connector-api/operations/services/#service) where the vouchers belong to.
  - `VoucherIds` string[], nullable — Unique identifiers of vouchers.
  - `CompanyIds` string[], nullable — Unique identifiers of the companies.
  - `VoucherCodeValues` string[], nullable — Value of voucher codes used by customers.
  - `ActivityStates` ActivityStates[], nullable — Whether to return only active, only deleted, or both types of record. If not specified, both active and deleted records will be returned.
  - `UpdatedUtc` TimeFilterInterval — When a time interval is used for **filtering** (for example in parameters such as `CreatedUtc.StartUtc` / `CreatedUtc.EndUtc`), the following rules apply: - **Start equals End (equality mode)** If `StartUtc` and `EndUtc` are exactly the same timestamp, the filter is treated as an equality check for that precise moment in time: ``` CreatedUtc == StartUtc ``` This does not represent an interval; only records with `CreatedUtc` equal to that exact instant are returned. - **Start differs from End (interval mode)** If `StartUtc` and `EndUtc` are different, the filter is evaluated as a half-open interval: ``` StartUtc <= CreatedUtc < EndUtc ``` In other words, the start is inclusive and the end is exclusive. Make sure your integration takes inclusive Start / exclusive End behavior of time intervals into account so that no records at the boundaries are omitted.
    - `StartUtc` string, date-time, nullable
    - `EndUtc` string, date-time, nullable
  - `ExternalIdentifiers` string[], nullable — Identifiers of [Voucher](https://mews-systems.gitbook.io/connector-api/operations/#voucher) from external systems.

## Response `200`

OK

- VoucherResult
  - `Vouchers` Voucher[], nullable — Details about vouchers added to the system.
    - `Id` string, uuid, required — Unique identifier of voucher.
    - `ServiceId` string, uuid, required — Unique identifier of [Service](https://mews-systems.gitbook.io/connector-api/operations/services/#service) the voucher belongs to.
    - `EnterpriseId` string, uuid, required — Unique identifier of the enterprise to which the voucher belongs.
    - `Name` string, required — Internal name of the voucher.
    - `CreatedUtc` string, date-time, required — Creation date and time of the voucher in UTC timezone in ISO 8601 format.
    - `UpdatedUtc` string, date-time, required — Last update date and time of the voucher in UTC timezone in ISO 8601 format.
    - `Type` 'Public' | 'PartnerCompany' | 'TravelAgency', required — Public PartnerCompany TravelAgency
    - `ActivityState` 'Deleted' | 'Active', required — Deleted Active
    - `CompanyId` string, uuid, nullable — Unique identifier of [Company](https://mews-systems.gitbook.io/connector-api/operations/companies/#company) the voucher is related to.
    - `TravelAgencyId` string, uuid, nullable — Unique identifier of [Company](https://mews-systems.gitbook.io/connector-api/operations/companies/#company) with [Travel agency contract](https://mews-systems.gitbook.io/connector-api/operations/companycontracts/#travel-agency-contract) the voucher is related to.
    - `OccupiableIntervalStartUtc` string, date-time, nullable — Start of the time interval, expressed as the timestamp for the start of the first time unit, in UTC timezone ISO 8601 format.
    - `OccupiableIntervalEndUtc` string, date-time, nullable — End of the time interval, expressed as the timestamp for the start of the last time unit, in UTC timezone ISO 8601 format.
    - `ExternalIdentifier` string, nullable — Identifier of the voucher from external system.
    - `IsActive` boolean, required — Whether the voucher is still active.
  - `VoucherCodes` VoucherCode[], nullable — Information about voucher codes used by customers.
    - `Id` string, uuid, required — Unique identifier of the voucher code.
    - `VoucherId` string, uuid, required — Unique identifier of `Voucher` the code belongs to.
    - `Value` string, nullable — Value of voucher code used by customers.
    - `ValidityStartUtc` string, nullable — If specified, marks the beginning of interval in which the code can be used.
    - `ValidityEndUtc` string, nullable — If specified, marks the end of interval in which the code can be used.
    - `CreatedUtc` string, nullable — Creation date and time of the voucher in UTC timezone in ISO 8601 format.
    - `UpdatedUtc` string, nullable — Last update date and time of the voucher in UTC timezone in ISO 8601 format.
    - `ActivityState` 'Deleted' | 'Active', required — Deleted Active
    - `IsActive` boolean, required — Whether the voucher code is still active.
  - `VoucherAssignments` VoucherAssignment[], nullable — The assignments between vouchers and [Rates](https://mews-systems.gitbook.io/connector-api/operations/rates/#rate).
    - `VoucherId` string, uuid — Unique identifier of [Voucher](https://mews-systems.gitbook.io/connector-api/operations/#voucher).
    - `RateId` string, uuid — Unique identifier of [Rate](https://mews-systems.gitbook.io/connector-api/operations/rates/#rate) the voucher is assigned with.
  - `Rates` RateForExtent[], nullable — The assigned rates.
    - `Id` string, uuid, required — Unique identifier of the rate.
    - `GroupId` string, uuid, required — Unique identifier of `Rate Group` where the rate belongs.
    - `ServiceId` string, uuid, required — Unique identifier of the `Service`.
    - `BaseRateId` string, uuid, nullable — Unique identifier of the base `Rate`.
    - `IsBaseRate` boolean, required — Whether the rate is a base rate.
    - `BusinessSegmentId` string, uuid, nullable — Unique identifier of the `Business Segment`.
    - `IsActive` boolean, required — Whether the rate is still active.
    - `IsEnabled` boolean, required — Whether the rate is currently available to customers.
    - `IsPublic` boolean, required — Whether the rate is publicly available.
    - `Type` 'Public' | 'Private' | 'AvailabilityBlock', required — Public Private AvailabilityBlock
    - `Name` string, nullable — Name of the rate (in the default language).
    - `Names` object, required — All translations of the name.
    - `ShortName` string, nullable — Short name of the rate (in the default language).
    - `UpdatedUtc` string, date-time, required — Interval in which the rates were updated.
    - `ExternalNames` object, nullable — All translations of the external name of the rate.
    - `Description` object, nullable — All translations of the description of the rate.
    - `ExternalIdentifier` string, nullable — Identifier of the rate from external system.
  - `Companies` Company[], nullable — The related companies and travel agencies.
    - `Id` string, uuid, required — Unique identifier of the company.
    - `ChainId` string, uuid, required — Unique identifier of the chain.
    - `Name` string, required — Name of the company.
    - `MotherCompanyId` string, uuid, nullable — Unique identifier of mother company.
    - `InvoicingEmail` string, email, nullable — Email for issuing invoices to the company.
    - `WebsiteUrl` string, uri, nullable — The website url of the company.
    - `InvoiceDueInterval` string, nullable — The maximum time, when the invoice has to be be paid in ISO 8601 duration format.
    - `Options` CompanyOptions, required — Options of the company.
      - `Invoiceable` boolean — Whether the company is invoiceable or not.
      - `AddFeesToInvoices` boolean — Whether the company has an additional fee applied for invoicing or not.
      - `AddTaxDeductedPaymentToInvoices` boolean — Whether tax-deducted payments should be automatically added to invoices.
    - `CreditRating` CreditRating, required — Credit rating to define creditworthiness of the company.
      - `Basic` 'CreditOk' | 'PaymentRequiredUpfront' | 'LocalDecisionRequired' — CreditOk (Company can book services.) PaymentRequiredUpfront (Company must pay upfront.) LocalDecisionRequired (Requires local approval.)
    - `Department` string, nullable — The internal segmentation of a company, e.g. sales department.
    - `DunsNumber` string, nullable — The Dun & Bradstreet unique 9-digit DUNS number.
    - `ReferenceIdentifier` string, nullable — External system identifier - custom identifier used by an external system such as an external database.
    - `AccountingCode` string, nullable — Accounting code of the company.
    - `AdditionalTaxIdentifier` string, nullable — Additional tax identifier of the company.
    - `BillingCode` string, nullable — Billing code of the company.
    - `Contact` string, nullable — Other contact details, such as telephone, email or similar.
    - `ContactPerson` string, nullable — Contact person of the company.
    - `ElectronicInvoiceIdentifier` string, nullable — Electronic invoice identifier of the company.
    - `Identifier` string, nullable — Fiscal or legal identifier of the company.
    - `Iata` string, nullable — Iata of the company.
    - `IsActive` boolean, required — Whether the company is still active.
    - `Notes` string, nullable — Additional notes.
    - `Number` integer, required — Unique number of the company (max 19 digits).
    - `TaxIdentifier` string, nullable — Tax identification number of the company.
    - `Telephone` string, tel, nullable — Contact telephone number.
    - `CreatedUtc` string, date-time, nullable — Date of [Company](https://mews-systems.gitbook.io/connector-api/operations/#company) creation date and time.
    - `UpdatedUtc` string, date-time, nullable — Date of [Company](https://mews-systems.gitbook.io/connector-api/operations/#company) last update date and time.
    - `Address` OldAddress
      - `Id` string, uuid — Unique identifier of the address.
      - `Line1` string, nullable — First line of the address.
      - `Line2` string, nullable — Second line of the address.
      - `City` string, nullable — The city.
      - `PostalCode` string, nullable — Postal code.
      - `CountryCode` string, nullable — ISO 3166-1 code of the `Country`.
      - `CountrySubdivisionCode` string, nullable — ISO 3166-2 code of the administrative division, e.g. `DE-BW`.
      - `Latitude` number, double, nullable — The latitude.
      - `Longitude` number, double, nullable — The longitude.
    - `AddressId` string, uuid, nullable — Unique identifier of the company [Address](https://mews-systems.gitbook.io/connector-api/operations/addresses/#account-address).
    - `MergeTargetId` string, uuid, nullable — Unique identifier of the account (Customer) to which this company is linked.
    - `TaxIdentificationNumber` string, nullable
    - `ExternalIdentifier` string, nullable — Identifier of company from external system.
  - `Cursor` string, uuid, nullable — 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.

## Other responses

- `204` — Server has successfully fulfilled the request and there is no additional information to send back.
- `400` — 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).
- `401` — Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.
- `403` — 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.
- `408` — 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](https://mews-systems.gitbook.io/connector-api/guidelines/requests#request-timeouts)
- `429` — 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](https://mews-systems.gitbook.io/connector-api/guidelines/requests#request-limits).
- `500` — 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](https://github.com/MewsSystems/gitbook-connector-api).

---

[API](https://skmtc.net/mews/apis/connector-api.md) · [All operations](https://skmtc.net/mews/apis/connector-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mews/connector-api/versions/81933a8ff730/schema)
