Retrieve the data of an appointment form

GET https://api.zenoti.com/v1/appointments/{appointment_id}/forms_data

This API helps you to retrieve the data for tag forms associated to the specified appointment. You must provide an appropriate identifier in the API request for the appointment_id parameter. You also need to specify the required details for three other parameters in the API request. Refer to the Request Parameters table for more information.

Before you begin

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

Endpoint

GET /v1/appointments/{appointment_id}/forms_data

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

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Path parameters

Parameter Type Required Description
appointment_id string Yes Mandatory Unique 32-character identifier of the appointment for which you want to retrieve form data.

Query parameters

Parameter Type Required Default Description
tag_id string Yes — Mandatory Unique 32-character identifier of the tag. If you want to retrieve a tag form, you must specify the specific guid of the tag in the API request.
view_context integer (int32) Yes — Mandatory Currently, this parameter is not functional. You must either pass 0 or an empty string ("") in the request for this API to work. Indicates the type of context from which you want to view the appointment form data. The view_context type can either be organization-level or center-level: 0 - organization and 1 - center.
version_no integer (int32) Yes — Mandatory Currently, this parameter is not functional. You must either pass 0 or an empty string ("") in the request for this API to work. Indicates the version number of the appointment form. If you pass an integer value for this parameter in the API request, the form data of the specified appointment version will be returned in the API response.

Response

Success (200 OK)

{
  "data": {},
  "guest_data": {},
  "is_form_submitted": false,
  "error": {}
}

Response fields

Field Type Description
data object
guest_data object
is_form_submitted boolean
error object

Example

curl --request GET \
  --url 'https://api.zenoti.com/v1/appointments/{appointment_id}/forms_data?tag_id={{tag_id}}&view_context={{view_context}}&version_no={{version_no}}' \
  --header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/v1/appointments/{appointment_id}/forms_data', {
  method: 'GET',
  headers: {
    'Authorization': 'bearer {{access_token}}'
  },
});
const data = await response.json();
import requests

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

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