List the Series Packages of a Guest

GET https://api.zenoti.com/v1/guests/guest_id/Packages

This API lists the details of the Series packages that a particular guest has bought or redeemed from a specific center.

You need to provide details for the following parameters: guest_id, center_id, show redeemable, page_num, and page_size.

This API does not provide information on the Day packages that the guest has bought or redeemed at a center.

Before you begin

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

Endpoint

GET /v1/guests/guest_id/Packages

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 a specific guest.

Query parameters

Parameter Type Required Default Description
center_id string No — Optional Unique 32-character ID of a specific center. If you specify the required details for center_id in the request, the API will list only those packages that can be redeemed at this particular center. If you do not pass the center_id parameter in the request, the API will list all the packages that the guest has purchased in all centers.
show_redeemable boolean No — Optional Indicates whether the guest can redeem packages at the specific center. If you do not provide a value for 'center_id', this field is considered as 'false'. You must provide a boolean value for this parameter.
page_num integer (int32) No — Optional The number of pages on which you want the guest's package records to be retrieved and displayed. Send ‘-1’ to show all the package records of the guest, irrespective of page number. You must provide an integer value for this parameter.
page_size integer (int32) No — Optional The number of the guest's package records that you want to be retrieved and displayed per page. Send ‘0’ to retrieve all package records of the guest. You must provide an integer value for this parameter.

Response

Success (200 OK)

{}

Example

curl --request GET \
  --url 'https://api.zenoti.com/v1/guests/guest_id/Packages' \
  --header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/v1/guests/guest_id/Packages', {
  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/Packages',
    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/Packages");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/v1/guests/guest_id/Packages')
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
400 400
401 Unauthorized -- invalid or expired access token
429 Too many requests -- rate limit exceeded