This API helps you to retrieve the membership history of the respective guest. You must specify the unique identifier of the guest as guest_id in the request. If you want to breakdown the list of memberships by their status, you must pass the expand parameter is_active. If you are using api_key to retrieve the data, it is mandatory to specify the center_id details in the request.
Permission:Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.
Endpoint
GET /v1/guests/{guest_id}/memberships
Base URL:https://api.zenoti.com
Request
Headers
Header
Required
Description
Authorization
Yes
bearer {{access_token}}
Path parameters
Parameter
Type
Required
Description
guest_id
string
Yes
Mandatory Unique 32-character ID of the guest for whom you want to retrieve the membership history.
Query parameters
Parameter
Type
Required
Default
Description
center_id
string
No
—
Unique 32-character ID of the center for which you want to retrieve the membership history of the specified guest. If you are using api_key to retrieve the data, it is mandatory for you to specify the center_id details in the request.
show_redeemable
boolean
No
—
(optional) Denotes if the API should list redeemable memberships of the guest.
show_guestpass_enabled_only
boolean
No
—
(optional) Denotes if the API must list guestpass enabled memberships of the guest.
guestpass_type
integer (int32)
No
—
(optional) Lists specific guest pass memberships (0:Both, 1:Classes, 2:Visits)
expand
string[]
No
—
(optional) Shows only the types listed. Default null and lists all. Default " show_only_guest_membership_detail" (show_only_user_membership_details, show_only_guest_membership_details)
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var response = await client.GetAsync(
"https://api.zenoti.com/v1/guests/{guest_id}/memberships");
var data = await response.Content.ReadAsStringAsync();