Connector API
  • Mews Connector API
  • Getting started
  • Usage guidelines
    • Authentication
    • Requests
    • Responses
    • Environments
    • Serialization
    • Pagination
    • Best practices
  • Concepts
    • Multi-property
    • Restrictions
    • Taxation
    • Time units
  • Use cases
    • 'How to' use cases
    • Accounting
    • Customer loyalty
    • Customer management
    • Customer messaging
    • Data export
    • Device integration
    • Events
    • Guest technology
    • Housekeeping
    • Kiosk
    • Mews Payment Terminals
    • Payment automation
    • Point of sale
    • Reputation management
    • Revenue management
    • Upsell
  • API Operations
    • Common objects
    • Accounting categories
    • Accounting items
    • Accounts
    • Account notes
    • Addresses
    • Age categories
    • Availability adjustments
    • Availability blocks
    • Bills
    • Business segments
    • Cancellation policies
    • Cashiers
    • Cashier transactions
    • Commands
    • Companies
    • Companionships
    • Company contracts
    • Configuration
    • Counters
    • Countries
    • Credit cards
    • Currencies
    • Customers
    • Departments
    • Devices
    • Enterprises
    • Exchange rates
    • Exports
    • Identity documents
    • Images
    • Languages
    • Loyalty memberships
    • Loyalty programs
    • Loyalty tiers
    • Messages
    • Message threads
    • Order items
    • Orders
    • Outlet bills
    • Outlet items
    • Outlets
    • Payments
    • Payment requests
    • Preauthorizations
    • Product categories
    • Product service orders
    • Products
    • Rates
    • Rate groups
    • Reservations
    • Reservation groups
    • Resource access tokens
    • Resource blocks
    • Resources
    • Resource categories
    • Resource features
    • Restrictions
    • Routing rules
    • Rules
    • Service order notes
    • Service overbooking limits
    • Services
    • Source assignments
    • Sources
    • Tasks
    • Tax environments
    • Taxations
    • Vouchers
    • Voucher codes
  • API Events
    • Ways to communicate
    • General Webhooks
    • Integration Webhooks
    • Webhooks FAQ
    • WebSockets
  • Your integration journey
    • Certification
  • Deprecations
    • Migration guide: Get all reservations
  • Changelog
    • Changelog 2024
    • Changelog 2023
    • Changelog 2022
    • Changelog 2021
    • Changelog 2020
    • Changelog 2019
    • Changelog 2018
    • Changelog 2017
    • Changelog 2016
Powered by GitBook
On this page
  • Get all voucher codes
  • Request
  • Response
  • Add voucher codes
  • Request
  • Response
  • Delete voucher codes
  • Request
  • Response

Was this helpful?

  1. API Operations

Voucher codes

PreviousVouchersNextAPI Events

Last updated 3 months ago

Was this helpful?

Get all voucher codes

Returns all voucher codes filtered by or other filter parameters. Note this operation uses and supports .

Request

[PlatformAddress]/api/connector/v1/voucherCodes/getAll

{
  "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
  "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
  "Client": "Sample Client 1.0.0",
  "EnterpriseIds": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "4d0201db-36f5-428b-8d11-4f0a65e960cc"
  ],
  "VoucherCodeIds": [
    "8c364829-c7ae-4972-b67f-93ea704d7228",
    "dc9d3488-7fc4-4fc9-a524-14e6504d8734"
  ],
  "VoucherIds": [
    "fe568bbd-1ecb-4bb2-bf77-96c3698de20d"
  ],
  "UpdatedUtc": {
    "StartUtc": "2023-10-10T00:00:00Z",
    "EndUtc": "2023-10-17T00:00:00Z"
  },
  "Limitation": {
    "Count": 10
  }
}
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.

EnterpriseIds

array of string

optional, max 1000 items

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

VoucherCodeIds

array of string

optional, max 1000 items

Unique identifiers of the voucher codes.

VoucherIds

array of string

required, max 1000 items

Unique identifiers of vouchers.

UpdatedUtc

optional, max length 3 months

Interval of voucher code's last update date and time.

Limitation

required

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

Response

{
  "VoucherCodes": [
    {
      "Id": "8c364829-c7ae-4972-b67f-93ea704d7228",
      "VoucherId": "fe568bbd-1ecb-4bb2-bf77-96c3698de20d",
      "Value": "0E5856B0A73E62B7E446",
      "ValidityStartUtc": null,
      "ValidityEndUtc": null,
      "CreatedUtc": "2023-10-30T13:37:16Z",
      "UpdatedUtc": "2023-10-30T13:37:16Z",
      "ActivityState": "Active"
    },
    {
      "Id": "dc9d3488-7fc4-4fc9-a524-14e6504d8734",
      "VoucherId": "fe568bbd-1ecb-4bb2-bf77-96c3698de20d",
      "Value": "021D047E42A5FD522CBA",
      "ValidityStartUtc": "2023-10-09T22:00:00Z",
      "ValidityEndUtc": "2023-10-09T22:00:00Z",
      "CreatedUtc": "2023-10-09T15:08:14Z",
      "UpdatedUtc": "2023-10-09T15:08:14Z",
      "ActivityState": "Active"
    }
  ]
}
Property
Type
Contract
Description

VoucherCodes

required, max 1000 items

Information about voucher codes used by customers.

Cursor

string

optional

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.

Add voucher codes

Request

[PlatformAddress]/api/connector/v1/voucherCodes/add

{
  "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
  "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
  "Client": "Sample Client 1.0.0",
  "EnterpriseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "VoucherCodeParameters": [
    {
      "VoucherId": "8c364829-c7ae-4972-b67f-93ea704d7228",
      "Value": "0E5856B0A73E62B7E446",
      "ValidityStartUtc": "2023-10-09T22:00:00Z",
      "ValidityEndUtc": "2023-10-09T22:00:00Z"
    },
    {
      "VoucherId": "dc9d3488-7fc4-4fc9-a524-14e6504d8734",
      "Value": "021D047E42A5FD522CBA",
      "ValidityStartUtc": "2023-10-09T22:00:00Z",
      "ValidityEndUtc": "2023-10-09T22:00:00Z"
    }
  ]
}
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.

EnterpriseId

string

optional

VoucherCodeParameters

required, max 1000 items

Voucher codes to be added.

Voucher code parameters

Property
Type
Contract
Description

VoucherId

string

required

Value

string

required, max length 128 characters

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.

Response

{
  "VoucherCodes": [
    {
      "Id": "8c364829-c7ae-4972-b67f-93ea704d7228",
      "VoucherId": "fe568bbd-1ecb-4bb2-bf77-96c3698de20d",
      "Value": "0E5856B0A73E62B7E446",
      "ValidityStartUtc": null,
      "ValidityEndUtc": null,
      "CreatedUtc": "2023-10-30T13:37:16Z",
      "UpdatedUtc": "2023-10-30T13:37:16Z",
      "ActivityState": "Active"
    },
    {
      "Id": "dc9d3488-7fc4-4fc9-a524-14e6504d8734",
      "VoucherId": "fe568bbd-1ecb-4bb2-bf77-96c3698de20d",
      "Value": "021D047E42A5FD522CBA",
      "ValidityStartUtc": "2023-10-09T22:00:00Z",
      "ValidityEndUtc": "2023-10-09T22:00:00Z",
      "CreatedUtc": "2023-10-09T15:08:14Z",
      "UpdatedUtc": "2023-10-09T15:08:14Z",
      "ActivityState": "Active"
    }
  ]
}
Property
Type
Contract
Description

VoucherCodes

required, max 1000 items

Information about voucher codes used by customers.

Cursor

string

optional

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.

Voucher code

Property
Type
Contract
Description

Id

string

required

Unique identifier of the voucher code.

VoucherId

string

required

Value

string

optional

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

optional

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

UpdatedUtc

string

optional

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

IsActive

boolean

required

Whether the voucher code is still active.

ActivityState

string

optional

Whether voucher code is active or deleted. Deprecated! Use IsActive instead.

Delete voucher codes

Request

[PlatformAddress]/api/connector/v1/voucherCodes/delete

{
  "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
  "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
  "Client": "Sample Client 1.0.0",
  "EnterpriseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "VoucherCodeIds": [
    "8c364829-c7ae-4972-b67f-93ea704d7228",
    "dc9d3488-7fc4-4fc9-a524-14e6504d8734"
  ]
}
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.

EnterpriseId

string

optional

VoucherCodeIds

array of string

required, max 1000 items

Unique identifiers of the voucher codes to be deleted.

Response

{}

array of

Adds voucher codes to the specified . Note this operation supports .

Unique identifier of the enterprise. Required when using , ignored otherwise.

array of

Unique identifier of the code belongs to.

array of

Unique identifier of the code belongs to.

Delete specified voucher codes. Note this operation supports .

Unique identifier of the enterprise. Required when using , ignored otherwise.

Portfolio Access Tokens
Portfolio Access Tokens
Portfolio Access Tokens
Voucher code
Voucher code parameters
Voucher
Voucher code
Voucher
Pagination
Portfolio Access Tokens
Portfolio Access Tokens
Limitation
Time interval
Voucher
Vouchers