Retrieve the list of forms associated with an appointment
This API helps you to fetch the list of forms that are available for the specified appointment.
You must specify appropriate details for the appointment_id parameter 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/appointments/{appointment_id}/forms
Base URL: https://api.zenoti.com
Request
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | bearer {{access_token}} |
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| appointment_id | string | Yes | — | Mandatory Unique 32-character identifier of the appointment for which you want to retrieve the list of forms. |
Response
Success (200 OK)
[
{
"appointment_id": "658423ef-5011-47e6-a617-19355a967tyu",
"form_id": "658423ef-5011-47e6-a617-19355a967cdc",
"service_name": {},
"service_displayname": {},
"name": "chiti",
"is_filled": true,
"is_submitted": true,
"lastfilled_date": "2019-07-25T12:55:00",
"form_type": 2,
"lastfilled_by": "Owner fi L1",
"latest_version": {},
"form_history": [
{
"...": "..."
}
],
"is_viewonly": false,
"expiry_date": {},
"is_editable": true,
"is_expired": false,
"owner_id": {},
"display_order": 0,
"is_service_form": true,
"source_appointment_date": "2019-07-12T09:10:00",
"permissions": {
"...": "..."
}
}
]
Response fields
| Field | Type | Description |
|---|---|---|
| [].appointment_id | string | |
| [].form_id | string | |
| [].service_name | object | |
| [].service_displayname | object | |
| [].name | string | |
| [].is_filled | boolean | |
| [].is_submitted | boolean | |
| [].lastfilled_date | string | |
| [].form_type | integer | |
| [].lastfilled_by | string | |
| [].latest_version | object | |
| [].form_history | object[] | |
| [].is_viewonly | boolean | |
| [].expiry_date | object | |
| [].is_editable | boolean | |
| [].is_expired | boolean | |
| [].owner_id | object | |
| [].display_order | integer | |
| [].is_service_form | boolean | |
| [].source_appointment_date | string | |
| [].permissions | object |
Example
curl --request GET \
--url 'https://api.zenoti.com/v1/appointments/{appointment_id}/forms?appointment_id={{appointment_id}}' \
--header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/v1/appointments/{appointment_id}/forms', {
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',
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");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'
uri = URI('https://api.zenoti.com/v1/appointments/{appointment_id}/forms')
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 |