For the complete documentation index, see llms.txt. This page is also available as Markdown.

Memberships

Operations related to working with customers' membership details, i.e. linking loyalty program members to Mews customers and retrieving point values and tiers.

List memberships by IDs

post

Fetch the latest details of loyalty memberships from the provider's system using memberships' unique IDs.

Authorizations
AuthorizationstringRequired

Bearer token provided by loyalty program provider.

Header parameters
Accept-LanguagestringOptional

Language preference for error messages and descriptions. If not provided, English will be used as the default language.

Example: en-US
Body

Request payload for fetching the latest details of loyalty memberships using their unique provider IDs.

mewsEnterpriseIdstring · uuidRequired

The identifier of the Mews enterprise on whose behalf the request has been made.

Example: 123e4567-e89b-12d3-a456-426614174000
providerEnterpriseIdstringOptional

An optional identifier of the enterprise from the loyalty provider on whose behalf the request has been made.

Example: ENT-9876-AZ
providerMembershipIdsstring[] · min: 1 · max: 100Required

Array of membership IDs to retrieve.

Example: ["MEMB-845329-JK92A","MEMB-423678-BR42A"]
Responses
200

List matching memberships.

If a membership with requested providerMembershipId is not found in the result set, it will be requested again later.

Memberships with status of notFound will be removed on Mews' side.

application/json

Response payload containing an array of membership details for the requested provider membership IDs.

post/memberships/list
POST /memberships/list HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 162

{
  "providerMembershipIds": [
    "MEMB-845329-JK92A",
    "MEMB-423678-BR42A"
  ],
  "mewsEnterpriseId": "123e4567-e89b-12d3-a456-426614174000",
  "providerEnterpriseId": "ENT-9876-AZ"
}
{
  "data": [
    {
      "providerMembershipId": "MEMB-845329-JK92A",
      "membershipNumber": "M-845-329JK92A",
      "status": "enrolled"
    },
    {
      "providerMembershipId": "MEMB-423678-BR42A",
      "membershipNumber": "M-423-678BR42A",
      "status": "enrolled"
    }
  ]
}
put

Links or unlinks a Mews customer to an existing membership in the loyalty program.

Authorizations
AuthorizationstringRequired

Bearer token provided by loyalty program provider.

Header parameters
Accept-LanguagestringOptional

Language preference for error messages and descriptions. If not provided, English will be used as the default language.

Example: en-US
Body

Request payload for linking or unlinking a Mews customer to an existing membership in the loyalty program.

mewsEnterpriseIdstring · uuidRequired

The identifier of the Mews enterprise on whose behalf the request has been made.

Example: 123e4567-e89b-12d3-a456-426614174000
providerMembershipIdstring · max: 50Required

Unique internal identifier of membership from the loyalty provider. Can be the same as membershipNumber if no other value is needed.

Example: M-123-72ca09f4
providerEnterpriseIdstringOptional

An optional identifier of the enterprise from the loyalty provider on whose behalf the request has been made.

Example: ENT-9876-AZ
mewsCustomerIdstring · uuidRequired

Unique identifier of customer account in Mews. Can be used in Connector API.

Example: 550e8400-e29b-41d4-a716-446655440000
isLinkedbooleanRequired

true if the customer is linked to the membership, false if unlinked.

Providers may delete unlinked memberships; for purposes of this API it's not necessary to keep them stored on provider's side.

Example: true
Responses
200

Link operation was successful.

application/json
successbooleanOptional

Indicates if the link operation was successful.

Example: true
put/memberships/link
PUT /memberships/link HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 212

{
  "mewsEnterpriseId": "123e4567-e89b-12d3-a456-426614174000",
  "providerEnterpriseId": "ENT-9876-AZ",
  "providerMembershipId": "MEMB-123456-ABC123",
  "mewsCustomerId": "550e8400-e29b-41d4-a716-446655440000",
  "isLinked": true
}
{
  "success": true
}

Last updated

Was this helpful?