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 loyalty memberships
  • Request
  • Response
  • Add loyalty memberships
  • Request
  • Response
  • Update loyalty memberships
  • Request
  • Response
  • Delete loyalty memberships
  • Request
  • Response

Was this helpful?

  1. API Operations

Loyalty memberships

PreviousLanguagesNextLoyalty programs

Last updated 4 months ago

Was this helpful?

Get all loyalty memberships

Returns all loyalty memberships of the enterprise, optionally filtered by specific loyalty membership identifiers, activity states, or other filter parameters. Note this operation uses and supports .

Request

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

{
    "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
    "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
    "Client": "Sample Client 1.0.0",
    "ChainIds": [
        "1df21f06-0cfc-4960-9c58-a3bf1261663e",
        "5fcd1933-22f2-40b9-84da-7db04cbecec2"
    ],
    "LoyaltyMembershipIds": [
        "3f4d9db2-9910-4a63-b9f0-e94a13fab9ac",
        "ea7da00f-fdc9-4014-b0f7-71003b87e3d0"
    ],
    "LoyaltyProgramIds": [
        "3ed9e2f3-4bba-4df6-8d41-ab1b009b6425",
        "8a98965a-7c03-48a1-a28c-ab1b009b53c8"
    ],
    "AccountIds": [
        "87d4c7c4-4832-4341-8b54-e45c1a73df34",
        "0ed43ab7-4592-4c99-906a-426588de1c00"
    ],
    "MembershipStates": [
        "New",
        "Enrolled"
    ],
    "CreatedUtc": {
        "StartUtc": "2022-10-15T00:00:00Z",
        "EndUtc": "2022-10-20T00:00:00Z"
    },
    "UpdatedUtc": {
        "StartUtc": "2022-10-15T00:00:00Z",
        "EndUtc": "2022-10-20T00:00:00Z"
    },
    "ActivityStates": [
        "Active"
    ],
    "Limitation":{ "Count": 100 }
}
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.

ChainIds

array of string

optional, max 1000 items

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

LoyaltyMembershipIds

array of string

optional, max 1000 items

LoyaltyProgramIds

array of string

optional, max 1000 items

AccountIds

array of string

optional, max 1000 items

MembershipStates

optional

States of the loyalty memberships.

CreatedUtc

optional, max length 3 months

UpdatedUtc

optional, max length 3 months

ActivityStates

optional

Whether to return only active, only deleted or both records.

Limitation

required

Limitation on the quantity of data returned.

Activity state

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

  • Deleted- deleted records.

Loyalty membership state

  • New

  • Pending

  • Enrolled

  • Canceled

  • Declined

  • ...

Response

{
    "LoyaltyMemberships": [
        {
            "Id": "3f4d9db2-9910-4a63-b9f0-e94a13fab9ac",
            "ChainId": "1df21f06-0cfc-4960-9c58-a3bf1261663e",
            "LoyaltyProgramId": "3ed9e2f3-4bba-4df6-8d41-ab1b009b6425",
            "AccountId": "87d4c7c4-4832-4341-8b54-e45c1a73df34",
            "Code": "Code-001",
            "IsPrimary": true,
            "Points": 10,
            "ExpirationDate": "2024-12-31",
            "Url": "https://www.mews.com/",
            "LoyaltyTierId": "34c29a01-c075-49e4-906a-3b1d4012463e",
            "State": "New",
            "CreatorProfile": {
                "Discriminator": "Enterprise",
                "EnterpriseProfile": {
                    "ProfileId": "52d19c34-b0aa-4635-905d-1326fa8b8e13"
                }
            },
            "UpdaterProfile": {
                "Discriminator": "Integration",
                "EnterpriseProfile": null
            }
        },
        {
            "Id": "ea7da00f-fdc9-4014-b0f7-71003b87e3d0",
            "ChainId": "5fcd1933-22f2-40b9-84da-7db04cbecec2",
            "LoyaltyProgramId": "8a98965a-7c03-48a1-a28c-ab1b009b53c8",
            "AccountId": "0ed43ab7-4592-4c99-906a-426588de1c00",
            "Code": "Code-002",
            "IsPrimary": false,
            "Points": 25,
            "ExpirationDate": null,
            "Url": null,
            "LoyaltyTierId": null,
            "State": "Enrolled",
            "CreatorProfile": {
                "Discriminator": "Enterprise",
                "EnterpriseProfile": {
                    "ProfileId": "52d19c34-b0aa-4635-905d-1326fa8b8e13"
                }
            },
            "UpdaterProfile": {
                "Discriminator": "Enterprise",
                "EnterpriseProfile": {
                    "ProfileId": "2234693c-8745-42f7-9175-5e585cf7a820"
                }
            }
        }
    ],
    "Cursor": "ea7da00f-fdc9-4014-b0f7-71003b87e3d0"
}
Property
Type
Contract
Description

LoyaltyMemberships

required

The loyalty memberships of the enterprise.

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.

Loyalty membership

Property
Type
Contract
Description

Id

string

required

Unique identifier of the loyalty membership.

ChainId

string

optional

Unique identifier of the chain.

LoyaltyProgramId

string

required

Unique identifier of the loyalty program.

AccountId

string

required

Unique identifier of the customer account.

Code

string

optional

Code of the loyalty membership.

IsPrimary

boolean

required

Defines the primary loyalty membership.

Points

integer

optional

The loyalty points for the account in that membership.

ExpirationDate

string

optional

Expiration date of the loyalty membership in UTC timezone in ISO 8601 format.

Url

string

optional

Url of the loyalty membership.

LoyaltyTierId

string

optional

Unique identifier of the loyalty tier.

State

required

State of the loyalty membership.

CreatorProfile

required

The profile data of the user who created the loyalty membership.

UpdaterProfile

required

The profile data of the user who updated the loyalty membership.

Profile data

Property
Type
Contract
Description

Discriminator

required

Type of the profile data (e.g. Enterprise).

EnterpriseProfile

optional

Enterprise profile data.

Profile data discriminator

  • Personal

  • Enterprise

  • Platform

  • Static

  • Integration

  • ...

Enterprise profile data

Property
Type
Contract
Description

ProfileId

string

required

Unique identifier of the profile.

Add loyalty memberships

Request

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

{
    "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
    "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
    "Client": "Sample Client 1.0.0",
    "ChainId": "1df21f06-0cfc-4960-9c58-a3bf1261663e",
    "LoyaltyMemberships": [
        {
            "LoyaltyProgramId": "3ed9e2f3-4bba-4df6-8d41-ab1b009b6425",
            "AccountId": "87d4c7c4-4832-4341-8b54-e45c1a73df34",
            "Code": "Code-003",
            "IsPrimary": true,
            "Points": 5,
            "ExpirationDate": "2022-12-31",
            "Url": "",
            "LoyaltyTierId": "34c29a01-c075-49e4-906a-3b1d4012463e",
            "State": "New"
        }
    ]
}
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.

ChainId

string

optional

LoyaltyMemberships

required, max 1000 items

Loyalty memberships to be added.

Loyalty membership parameters

Property
Type
Contract
Description

LoyaltyProgramId

string

required

Unique identifier of the loyalty program.

AccountId

string

required

Unique identifier of the customer account.

Code

string

optional

Code of the loyalty membership.

IsPrimary

boolean

required

Defines the primary loyalty membership for the account.

Points

integer

optional

The loyalty points for the account in that membership.

ExpirationDate

string

optional

Expiration date of the loyalty membership in UTC timezone in ISO 8601 format.

Url

string

optional

URL of the loyalty membership in external loyalty system.

LoyaltyTierId

string

optional

Unique identifier of the loyalty tier.

State

optional

State of the loyalty membership.

Response

{
    "LoyaltyMemberships": [
       {
            "Id": "f9e434a3-720c-4820-b82e-202cb2efa2fd",
            "LoyaltyProgramId": "3ed9e2f3-4bba-4df6-8d41-ab1b009b6425",
            "AccountId": "87d4c7c4-4832-4341-8b54-e45c1a73df34",
            "Code": "Code-003",
            "IsPrimary": true,
            "Points": 5,
            "ExpirationDate": "2022-12-31",
            "Url": "",
            "LoyaltyTierId": "34c29a01-c075-49e4-906a-3b1d4012463e",
            "State": "Enrolled"
        }
    ]
}
Property
Type
Contract
Description

LoyaltyMemberships

required

Added loyalty memberships.

Update loyalty memberships

Request

[PlatformAddress]/api/connector/v1/loyaltyMemberships/update

{
    "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
    "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
    "ChainId": "1df21f06-0cfc-4960-9c58-a3bf1261663e",
    "Client": "Sample Client 1.0.0",
    "LoyaltyMembershipUpdates": [
        {
            "LoyaltyMembershipId": "f9e434a3-720c-4820-b82e-202cb2efa2fd",
            "LoyaltyProgramId": {
                "Value": "3ed9e2f3-4bba-4df6-8d41-ab1b009b6425"
            },
            "ExpirationDate": {
                "Value": "2030-12-31"
            },
            "Url": {
                "Value": "https://www.mews.com/"
            },
            "LoyaltyTierId": {
                "Value": "34c29a01-c075-49e4-906a-3b1d4012463e"
            },
            "State": {
                "Value": "Canceled"
            }
        }
    ]
}
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.

ChainId

string

optional

LoyaltyMembershipUpdates

required, max 1000 items

Loyalty memberships to be updated.

Loyalty membership update parameters

Property
Type
Contract
Description

LoyaltyMembershipId

string

required

Unique identifier of the loyalty membership.

LoyaltyProgramId

optional

Unique identifier of the loyalty program (or null if the program should not be updated).

IsPrimary

optional

Boolean value defining the primary loyalty membership for the account. (or null if the value should not be updated).

Points

optional

The loyalty points the account has in the loyalty membership (or null if the points should not be updated).

Code

optional

Code of the loyalty membership. (or null if the code should not be updated).

ExpirationDate

optional

Expiration date of the loyalty membership in UTC timezone in ISO 8601 format (or null if the date should not be updated).

Url

optional

URL of the loyalty membership (or null if the URL should not be updated).

LoyaltyTierId

optional

Unique identifier of the loyalty tier (or null if the tier should not be updated).

State

optional

State of the loyalty membership, (or null if the state should not be updated).

Loyalty membership state update

Property
Type
Contract
Description

Value

required

State of the loyalty membership.

Response

{
    "LoyaltyMemberships": [
        {
            "Id": "f9e434a3-720c-4820-b82e-202cb2efa2fd",
            "LoyaltyProgramId": "3ed9e2f3-4bba-4df6-8d41-ab1b009b6425",
            "AccountId": "87d4c7c4-4832-4341-8b54-e45c1a73df34",
            "Code": "Code-003",
            "ExpirationDate": "2030-12-31",
            "Url": "https://www.mews.com/",
            "LoyaltyTierId": "34c29a01-c075-49e4-906a-3b1d4012463e"
        }
    ]
}
Property
Type
Contract
Description

LoyaltyMemberships

required

Added loyalty memberships.

Delete loyalty memberships

Deletes loyalty memberships.

Request

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

{
    "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
    "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
    "Client": "Sample Client 1.0.0",
    "LoyaltyMembershipIds": [
        "f9e434a3-720c-4820-b82e-202cb2efa2fd"
    ]
}
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.

LoyaltyMembershipIds

array of string

required, max 1000 items

Unique identifier of the loyalty memberships to be deleted.

Response

{}

Unique identifiers of .

Unique identifiers of .

Unique identifiers of accounts (for example or ) the membership is associated with.

array of string

Interval of creation date and time.

Interval of last update date and time.

array of string

array of

string

Adds loyalty memberships to the enterprise. Note this operation supports .

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

array of

array of

Updates information about the specified loyalty memberships. Note this operation supports .

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

array of

array of

Pagination
Portfolio Access Tokens
Portfolio Access Tokens
Portfolio Access Tokens
Portfolio Access Tokens
Portfolio Access Tokens
Loyalty memberships
Loyalty membership state
Loyalty membership
Loyalty membership
Loyalty memberships
Loyalty membership state
Profile data
Profile data
Profile data discriminator
Enterprise profile data
Loyalty membership parameters
Loyalty membership state
Loyalty membership
Loyalty membership update parameters
Loyalty membership state update
Loyalty membership state
Loyalty membership
Limitation
Time interval
Time interval
Activity state
String update value
Bool update value
Integer update value
String update value
String update value
String update value
String update value
Customers
Loyalty programs
Companies