Memberships
Bearer token provided by loyalty program provider.
Language preference for error messages and descriptions. If not provided, English will be used as the default language.
en-USRequest payload for fetching the latest details of loyalty memberships using their unique provider IDs.
The identifier of the Mews enterprise on whose behalf the request has been made.
123e4567-e89b-12d3-a456-426614174000An optional identifier of the enterprise from the loyalty provider on whose behalf the request has been made.
ENT-9876-AZArray of membership IDs to retrieve.
["MEMB-845329-JK92A","MEMB-423678-BR42A"]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.
Response payload containing an array of membership details for the requested provider membership IDs.
Bad Request - Returned when the request is invalid, such as missing required fields or containing data in an incorrect format.
Unauthorized
Request Timeout
Unprocessable Content - Used when the request is syntactically valid but fails due to business logic constraints.
Internal Server Error
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"
}
]
}Bearer token provided by loyalty program provider.
Language preference for error messages and descriptions. If not provided, English will be used as the default language.
en-USRequest payload for linking or unlinking a Mews customer to an existing membership in the loyalty program.
The identifier of the Mews enterprise on whose behalf the request has been made.
123e4567-e89b-12d3-a456-426614174000Unique internal identifier of membership from the loyalty provider. Can be the same as membershipNumber if no other value is needed.
M-123-72ca09f4An optional identifier of the enterprise from the loyalty provider on whose behalf the request has been made.
ENT-9876-AZUnique identifier of customer account in Mews. Can be used in Connector API.
550e8400-e29b-41d4-a716-446655440000true 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.
trueLink operation was successful.
Indicates if the link operation was successful.
trueBad Request - Returned when the request is invalid, such as missing required fields or containing data in an incorrect format.
Unauthorized
Request Timeout
Unprocessable Content - Used when the link operation is syntactically valid but fails due to business logic constraints.
Internal Server Error
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?