Retrieve loyalty points of a guest (Earned/Redeemed)

GET https://api.zenoti.com/v1/guests/{guestid}/points/{type}

Purpose: Use this API to retrieve the details of loyalty points that are either earned or redeemed by the guest.

To retrieve the loyalty points of a guest - earned, you must pass one of the following parameters:

invoice_id program_id manual_guest_points_id associated_guest_points_id

Note: You can pass multiple associated_guest_points_id parameters as comma-separated values.

To retrieve the loyalty points of a guest - redeemed, you must pass the following parameter:

invoice_id (mandatory)

Before you begin

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

Endpoint

GET /v1/guests/{guestid}/points/{type}

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

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Path parameters

Parameter Type Required Description
guestid string Yes Unique identifier of the guest.
type enum (0, 1) Yes The type of loyalty points (earned or redeemed) that you are requesting in the API. Please specify one of the following: 0 = earned 1 = redeemed

Response

Success (200 OK)

{}

Example

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

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

uri = URI('https://api.zenoti.com/v1/guests/{guestid}/points/{type}')
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