v1

latestOpenAPI 3.1.02026-07-2422707.0 MB

List all memberships of a guest

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.

get/v1/guests/{guest_id}/memberships?center_id={center_id}

Path parameters

guest_idstring required

Mandatory Unique 32-character ID of the guest for whom you want to retrieve the membership history.

Query parameters

center_idstring

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_redeemableboolean

(optional) Denotes if the API should list redeemable memberships of the guest.

show_guestpass_enabled_onlyboolean

(optional) Denotes if the API must list guestpass enabled memberships of the guest.

guestpass_typeinteger

(optional) Lists specific guest pass memberships (0:Both, 1:Classes, 2:Visits)

expandstring[]

(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)

is_active'-1' | '0' | '1'

1 - Active, 0 - Others, -1 - All(default)

Request body

RAW_BODYstring json

Response

200

OR

Example response

{
  "guest_memberships": [
    {
      "user_membership_id": "af057b8e-8e2f-4a43-9540-2920b4641e88",
      "status": 1,
      "recurrence_status": -1,
      "membership": {
        "code": "vammoiufdxgfhg",
        "id": "9adad542-30c1-44d9-a77c-b03967e1ef30",
        "name": "Test Discount"
      },
      "invoice": {
        "receipt_no": "RRR3090",
        "status": 4,
        "id": "f50cfe4c-0905-4207-bbe5-a49c770ea974",
        "item_id": "94b0a642-7804-4048-9459-7a0aa79789e0",
        "no": "RR12302"
      },
      "expiry_date": "2025-04-09T00:00:00",
      "invoice_center_id": "a11f578a-1b81-4de0-8834-915f79e5362b",
      "guestpass_type": "Classes",
      "guestpass_total": -1,
      "guestpass_balance": -1,
      "member_code": "vammo2",
      "member_since": "2023-08-23T00:00:00"
    }
  ]
}