Retrieve the merge history of guest records
Use this API to fetch the merge history of guest records. This API also retrieves the history of guest records that have been merged across different centers.
You must specify appropriate details for the start_date and end_date parameters in the API request.
Optionally, you can specify necessary details for the center_id, page, and size parameters in the API request.
Before you begin
- You need a valid API key or access token. See Set up API authentication.
Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.
Endpoint
GET /v1/guests/merge_history
Base URL: https://api.zenoti.com
Request
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | bearer {{access_token}} |
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| start_date | string (date) | Yes | — | Mandatory Date (in YYYY-MM-DD format) from which this API retrieves merge history of guest records. If you do not specify any particular time, the API considers the time as 00:00:00 by default. Note: You must ensure that the start_date value is lesser than the end_date value. |
| end_date | string (date) | Yes | — | Mandatory Date (in YYYY-MM-DD format) before which this API retrieves merge history of guest records. If you do not specify any particular time, the API considers the time as 00:00:00 by default. Note: You must ensure that the end_date value is greater than the start_date value. |
| center_id | string | No | — | Optional Unique 32-character identifier of the center for which this API retrieves the Merged To guest records. If you do not specify any value for this parameter, the API retrieves the history of guest records that have been merged across different centers. |
| page | integer (int32) | No | 1 | Optional Number of pages of merged guest records that is to be displayed. Default value of this parameter is 1. |
| size | integer (int32) | No | null | Optional Number of merged guest records that is to be displayed per page. Default value of this parameter is 10 and the maximum value is 100. |
Response
Success (200 OK)
{}
Example
curl --request GET \
--url 'https://api.zenoti.com/v1/guests/merge_history?start_date={{start_date}}&end_date={{end_date}}' \
--header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/v1/guests/merge_history', {
method: 'GET',
headers: {
'Authorization': 'bearer {{access_token}}'
},
});
const data = await response.json();
import requests
response = requests.get(
'https://api.zenoti.com/v1/guests/merge_history',
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/merge_history");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'
uri = URI('https://api.zenoti.com/v1/guests/merge_history')
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 |
| 500 | 500 |