Update a guest note
This API helps you to update the details of the specified guest note.
You must specify the unique identifier of the guest as guest_id and the note as note_id in the API request.
Important
You can change the notes and
note_typeelements by using this API. You can change the alert of a note by modifying thenote_typeas generic = 2. You cannot updatenote_typefor a private guest note.
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
PUT /v1/guests/{guest_id}/notes/{note_id}
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 | Mandatory Unique 32-character identifier of the guest. |
| note_id | string | Yes | Mandatory Unique 32-character identifier of the guest note. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | No | Unique identifier of the center. |
| is_private | boolean | No | This field denotes if the note is a private one. True - means the note is private. False - means the note is not private. |
| alert | boolean | No | This denotes if the alert for the note is enabled or not. True - means the alert is ON. False - means the alert is OFF. |
| note_type | enum (10, 3, 4, 2) | No | Indicates the type of the note. 10 Show on opening Guest History, 3 Show during check-in, 4 Show when booking an appointment, 8 Show when taking payment, 2 Generic |
| notes | string | No | This is the note for the guest on the appointment. |
Response
Success (200 OK)
{
"id": "9805fb48-4c52-44fc-90da-66b1d063e8bb",
"is_private": false,
"alert": true,
"note_type": 8,
"notes": "sample string 4",
"center": {
"id": "c56f4e05-62b5-4033-b42e-b72db37722df",
"name": "London"
},
"added_by": {
"id": "",
"name": ""
},
"created_date": "2018-12-20T11:06:57"
}
Response fields
| Field | Type | Description |
|---|---|---|
| id | string | |
| is_private | boolean | |
| alert | boolean | |
| note_type | integer | |
| notes | string | |
| center | object | |
| center.id | string | |
| center.name | string | |
| added_by | object | |
| added_by.id | string | |
| added_by.name | string | |
| created_date | string |
Example
curl --request PUT \
--url 'https://api.zenoti.com/v1/guests/{guest_id}/notes/{note_id}' \
--header 'Authorization: bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"id": "string",
"is_private": true,
"alert": true,
"note_type": "10",
"notes": "string"
}'
const response = await fetch('https://api.zenoti.com/v1/guests/{guest_id}/notes/{note_id}', {
method: 'PUT',
headers: {
'Authorization': 'bearer {{access_token}}',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: 'string',
is_private: true,
alert: true,
note_type: '10',
notes: 'string'
})
});
const data = await response.json();
import requests
response = requests.put(
'https://api.zenoti.com/v1/guests/{guest_id}/notes/{note_id}',
headers={
'Authorization': 'bearer {{access_token}}',
},
json={'id': 'string', 'is_private': True, 'alert': True, 'note_type': '10', 'notes': 'string'}
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var content = new StringContent(
JsonSerializer.Serialize(new {
id = "string",
is_private = true,
alert = true,
note_type = "10",
notes = "string"
}),
Encoding.UTF8, "application/json");
var response = await client.PutAsync(
"https://api.zenoti.com/v1/guests/{guest_id}/notes/{note_id}", content);
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'
uri = URI('https://api.zenoti.com/v1/guests/{guest_id}/notes/{note_id}')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Put.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
request['Content-Type'] = 'application/json'
request.body = { id: 'string', is_private: true, alert: true, note_type: '10', notes: 'string' }.to_json
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 |