List all gift cards of a guest

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

Provide unique identifier of the guest as guest_id and this api will retrieve the gift cards history of the respective guest.

Before you begin

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

Endpoint

GET /v1/guests/{guest_id}/gift_cards

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 Unique identifier of the guest.

Response

Success (200 OK)

{
  "gift_cards": [
    {
      "...": "..."
    }
  ],
  "page_info": {
    "total": 3,
    "page": 1,
    "size": 10
  }
}

Response fields

Field Type Description
gift_cards object[]
gift_cards[].id string
gift_cards[].code string
gift_cards[].type integer
gift_cards[].sale_date string
gift_cards[].expiry_date string
gift_cards[].price integer
gift_cards[].value integer
gift_cards[].balance integer
gift_cards[].tips integer
gift_cards[].notes string
gift_cards[].source integer
gift_cards[].is_closed boolean
gift_cards[].is_one_time_use boolean
gift_cards[].is_received boolean
gift_cards[].occassion object
gift_cards[].gifted_by object
gift_cards[].benefits object
gift_cards[].invoice object
gift_cards[].center object
page_info object
page_info.total integer
page_info.page integer
page_info.size integer

Example

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

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