Retrieve a list of all the guest passes sent from or received by a user

GET https://api.zenoti.com/v1/guests/{guest_id}/guestpass

The purpose of this API is to retrieve a list of all the guest passes sent from or received by a user. This includes Used, Received, and Available guest passes. You must specify the unique identifier of the guest who is sharing the guest pass guest_id, the item id for which the user wants to transfer to/receive from (default value would be null) instrument_id, the item type (default would be 1. 1: Membership) instrument_type, guest pass credit type (default would be 1. 1: Classes, 2: Visits, 0: Both) credit_type, type of user list the user requested (default would be 0. 0: Both, 1: Receiver, 2:Sender) list_type, and the expand parameter (expand[0]=available, expand[1]=received, expand[2]=used) expand.

Before you begin

Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.

Endpoint

GET /v1/guests/{guest_id}/guestpass

Base URL: https://api.zenoti.com

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Query parameters

Parameter Type Required Default Description
guest_id string No — The user who is sharing the guest pass
instrument_id string No — The item id for which the user wants to transfer/received from (default value would be null)
instrument_type integer (int32) No — The item type (default would be 1. 1: Membership)
credit_type enum () No — Guest pass credit type (default would be 1. 1: Classes, 2: Visits, 0: Both)
list_type integer (int32) No — Type of user list the user requested (default would be 0. 0: Both, 1: Receiver, 2:Sender)
expand string[] No — expand[0]=available , expand[1]=received, expand[2]=used

Response

Success (200 OK)

{}

Example

curl --request GET \
  --url 'https://api.zenoti.com/v1/guests/{guest_id}/guestpass' \
  --header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/v1/guests/{guest_id}/guestpass', {
  method: 'GET',
  headers: {
    'Authorization': 'bearer {{access_token}}'
  },
});
const data = await response.json();
import requests

response = requests.get(
    'https://api.zenoti.com/v1/guests/{guest_id}/guestpass',
    headers={
        'Authorization': 'bearer {{access_token}}',
    },
)
data = response.json()
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}/guestpass");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/v1/guests/{guest_id}/guestpass')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
response = http.request(request)
data = JSON.parse(response.body)

Error codes

Status Description
401 Unauthorized -- invalid or expired access token
429 Too many requests -- rate limit exceeded