Confirm a service booking
This API helps you to confirm the required reserved service booking (booking_id).
You can also use this API to confirm the required group service booking (booking_id). You must specify in the API request body the appropriate appointment group_name details.
You can choose a specific therapist or a therapist based on a certain gender while creating a service booking; after which, a unique 32-digit booking_id is generated.
After you have reserved the service booking, you must then specify the generated booking_id as an input parameter to use this API to confirm the service booking before the reservation time of the slot expires.
If the service booking is confirmed, you will receive the details of the service booking in the generated response.
This API also allows you to confirm service bookings for family members. Provided, there ia a relationship defined in Zenoti between the host and the family members.
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/bookings/{booking_id}/slots/confirm
Base URL: https://api.zenoti.com
Request
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | bearer {{access_token}} |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| booking_id | string | Yes | Mandatory Unique 32-character identifier of the generated booking_id. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| notes | string | No | Notes for the booking |
| group_name | string | No | group name if it is a group booking. |
Response
Success (201 Created)
{
"is_confirmed": true,
"invoice": {
"guest": {
"...": "..."
},
"invoice_id": "6bdafc31-c65d-4f57-97bd-f2a09c4619e7",
"items": [
{
"...": "..."
}
]
},
"Error": {}
}
Response fields
| Field | Type | Description |
|---|---|---|
| is_confirmed | boolean | |
| invoice | object | |
| invoice.guest | object | |
| invoice.invoice_id | string | |
| invoice.items | object[] | |
| Error | object |
Example
curl --request POST \
--url 'https://api.zenoti.com/v1/bookings/{booking_id}/slots/confirm' \
--header 'Authorization: bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"notes": "string",
"group_name": "string"
}'
const response = await fetch('https://api.zenoti.com/v1/bookings/{booking_id}/slots/confirm', {
method: 'POST',
headers: {
'Authorization': 'bearer {{access_token}}',
'Content-Type': 'application/json'
},
body: JSON.stringify({ notes: 'string', group_name: 'string' })
});
const data = await response.json();
import requests
response = requests.post(
'https://api.zenoti.com/v1/bookings/{booking_id}/slots/confirm',
headers={
'Authorization': 'bearer {{access_token}}',
},
json={'notes': 'string', 'group_name': 'string'}
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var content = new StringContent(
JsonSerializer.Serialize(new { notes = "string", group_name = "string" }),
Encoding.UTF8, "application/json");
var response = await client.PostAsync(
"https://api.zenoti.com/v1/bookings/{booking_id}/slots/confirm", content);
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'
uri = URI('https://api.zenoti.com/v1/bookings/{booking_id}/slots/confirm')
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 = { notes: 'string', group_name: '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 |