Create a guest note
This API helps you to create a note for the guest.
You must specify the unique identifier of the guest as <glossary:guest_id> in the API request.
On this page
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
POST /v1/guests/{guest_id}/notes
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. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | No | Unique identifier of the guest note. |
| name | string | No | Name of the center where the guest note is created. |
| alert | boolean | No | Indicates whether the guest note alert is active. |
| created_date | string | No | Date when the note was created. |
| entity_name | string | No | Entity Name For which the note is added. |
| entity_pk | integer (int32) | No | Entity for which the note is added. |
| is_private | boolean | No | Indicates whether the note is private. |
| note_type | enum (0, 2, 3, 4, 8, 10) | No | Type of the guest note: Unknown - 0, Generic - 2, Checkin - 3, Booking - 4, Payment - 8, Profile - 10 |
| notes | string | No | The content of the guest note. |
| privacy_type | enum (2, 3) | No | Type of the privacy note. Privacy 2 and Privacy 3 |
Response
Success (201 Created)
{
"id": "9805fb48-4c52-44fc-90da-66b1d063e8bb",
"is_private": false,
"alert": true,
"note_type": 10,
"notes": "Guest always prefer evening timings",
"center": {
"id": "c56f4e05-62b5-4033-b42e-b72db37722df",
"name": "London"
},
"added_by": {
"id": "c56f4e05-62b5-4033-b42e-b72db37722df",
"name": "admin owner"
},
"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 POST \
--url 'https://api.zenoti.com/v1/guests/{guest_id}/notes' \
--header 'Authorization: bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"id": "string",
"name": "string",
"alert": true,
"created_date": "string",
"entity_name": "string",
"entity_pk": 0,
"is_private": true,
"note_type": "0",
"notes": "string",
"privacy_type": "2"
}'
const response = await fetch('https://api.zenoti.com/v1/guests/{guest_id}/notes', {
method: 'POST',
headers: {
'Authorization': 'bearer {{access_token}}',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: 'string',
name: 'string',
alert: true,
created_date: 'string',
entity_name: 'string',
entity_pk: 0,
is_private: true,
note_type: '0',
notes: 'string',
privacy_type: '2'
})
});
const data = await response.json();
import requests
response = requests.post(
'https://api.zenoti.com/v1/guests/{guest_id}/notes',
headers={
'Authorization': 'bearer {{access_token}}',
},
json={'id': 'string', 'name': 'string', 'alert': True, 'created_date': 'string', 'entity_name': 'string', 'entity_pk': 0, 'is_private': True, 'note_type': '0', 'notes': 'string', 'privacy_type': '2'}
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var content = new StringContent(
JsonSerializer.Serialize(new {
id = "string",
name = "string",
alert = true,
created_date = "string",
entity_name = "string",
entity_pk = 0,
is_private = true,
note_type = "0",
notes = "string",
privacy_type = "2"
}),
Encoding.UTF8, "application/json");
var response = await client.PostAsync(
"https://api.zenoti.com/v1/guests/{guest_id}/notes", content);
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'
uri = URI('https://api.zenoti.com/v1/guests/{guest_id}/notes')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
request['Content-Type'] = 'application/json'
request.body = { id: 'string', name: 'string', alert: true, created_date: 'string', entity_name: 'string', entity_pk: 0, is_private: true, note_type: '0', notes: 'string', privacy_type: '2' }.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 |