Verify the payable loyalty points of a guest

GET https://api.zenoti.com/v1/guests/{InvoiceId}/payments/loyalty_points/redeemable

Use this API to check how many loyalty points and the loyalty amount (in $) that a guest can redeem while paying for an invoice. You must specify appropriate details for the InvoiceId parameter. Optionally, you can provide the required values for the lp_program_id and redeem_across_programs parameters.

Before you begin

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

Endpoint

GET /v1/guests/{InvoiceId}/payments/loyalty_points/redeemable

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

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Path parameters

Parameter Type Required Description
InvoiceId string Yes Mandatory Unique 32-character identifier of the invoice for which this API will return the guest's applicable loyalty points.

Query parameters

Parameter Type Required Default Description
lp_program_id string No — Optional Unique 32-character identifier of the loyalty program by using which the guest can redeem loyalty points. Default value: null.
redeem_across_programs integer (int32) No 0 Optional Indicates whether the guest's loyalty points can be redeemed for all loyalty programs or for a particular loyalty program. 0 - Guest's loyalty points can be redeemed for a particular loyalty program. 1 - Guest's loyalty points can be redeemed for all loyalty programs. Default value: 0. Note: If you specify the value of this parameter as 1, the API does not prioritize the value of the lp_program_id parameter.

Response

Success (200 OK)

{
  "lp_redeemable": {
    "points": 2131.1,
    "amount": 152.22,
    "loyalty_programs": [
      {
        "...": "..."
      }
    ],
    "total_available_points": 1242.8472000000002,
    "total_available_amount": 17400,
    "exchange_rate": 0.071428
  },
  "error": {}
}

Response fields

Field Type Description
lp_redeemable object
lp_redeemable.points number
lp_redeemable.amount number
lp_redeemable.loyalty_programs object[]
lp_redeemable.total_available_points number
lp_redeemable.total_available_amount integer
lp_redeemable.exchange_rate number
error object

Example

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

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

uri = URI('https://api.zenoti.com/v1/guests/{InvoiceId}/payments/loyalty_points/redeemable')
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