Reschedule a service booking

POST https://api.zenoti.com/v1/bookings

Use this API to reschedule a service booking.

To reschedule a booking, follow these steps:

STEP 1 : Invoke the Create a service booking API along with invoice_id and invoice_item_id that you received while confirming the previous booking.

STEP 2 : Now, use the newly-generated booking_id to retrieve slots from this API and choose a suitable slot_time.

STEP 3 : Reserve the slot for the newly-created service booking by using this API.

STEP 4 : Confirm the service booking by using this API. This process will reschedule the existing appointment to the new time slot.

Before you begin

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

Endpoint

POST /v1/bookings

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

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Request body

Field Type Required Description
RAW_BODY string (json) No

Response

Success (201 Created)

{
  "id": "15b0cc65-1e47-440d-8208-966959e8c93e",
  "Error": {}
}

Response fields

Field Type Description
id string
Error object

Example

curl --request POST \
  --url 'https://api.zenoti.com/v1/bookings' \
  --header 'Authorization: bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
  "RAW_BODY": "{     \"center_id\": \"{{center_id}}\",     \"date\": \"2019-09-13\",     \"is_only_catalog_employees\": \"false\",     \"guests\": [         {             \"id\": \"{{login_user_id}}\",             \"invoice_id\": \"{{invoice_id}}\",             \"items\": [                 {                     \"item\": {                         \"id\": \"{{service_id}}\"                     },                     \"therapist\": {                         \"id\": \"{{therapist_id}}\"                     },                     \"invoice_item_id\": \"{{invoice_item_id}}\"                 }             ]         }     ] }"
}'
const response = await fetch('https://api.zenoti.com/v1/bookings', {
  method: 'POST',
  headers: {
    'Authorization': 'bearer {{access_token}}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ RAW_BODY: '{     "center_id": "{{center_id}}",     "date": "2019-09-13",     "is_only_catalog_employees": "false",     "guests": [         {             "id": "{{login_user_id}}",             "invoice_id": "{{invoice_id}}",             "items": [                 {                     "item": {                         "id": "{{service_id}}"                     },                     "therapist": {                         "id": "{{therapist_id}}"                     },                     "invoice_item_id": "{{invoice_item_id}}"                 }             ]         }     ] }' })
});
const data = await response.json();
import requests

response = requests.post(
    'https://api.zenoti.com/v1/bookings',
    headers={
        'Authorization': 'bearer {{access_token}}',
    },
    json={'RAW_BODY': '{     "center_id": "{{center_id}}",     "date": "2019-09-13",     "is_only_catalog_employees": "false",     "guests": [         {             "id": "{{login_user_id}}",             "invoice_id": "{{invoice_id}}",             "items": [                 {                     "item": {                         "id": "{{service_id}}"                     },                     "therapist": {                         "id": "{{therapist_id}}"                     },                     "invoice_item_id": "{{invoice_item_id}}"                 }             ]         }     ] }'}
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var content = new StringContent(
    JsonSerializer.Serialize(new { RAW_BODY = "{     "center_id": "{{center_id}}",     "date": "2019-09-13",     "is_only_catalog_employees": "false",     "guests": [         {             "id": "{{login_user_id}}",             "invoice_id": "{{invoice_id}}",             "items": [                 {                     "item": {                         "id": "{{service_id}}"                     },                     "therapist": {                         "id": "{{therapist_id}}"                     },                     "invoice_item_id": "{{invoice_item_id}}"                 }             ]         }     ] }" }),
    Encoding.UTF8, "application/json");
var response = await client.PostAsync(
    "https://api.zenoti.com/v1/bookings", content);
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/v1/bookings')
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 = { RAW_BODY: '{     "center_id": "{{center_id}}",     "date": "2019-09-13",     "is_only_catalog_employees": "false",     "guests": [         {             "id": "{{login_user_id}}",             "invoice_id": "{{invoice_id}}",             "items": [                 {                     "item": {                         "id": "{{service_id}}"                     },                     "therapist": {                         "id": "{{therapist_id}}"                     },                     "invoice_item_id": "{{invoice_item_id}}"                 }             ]         }     ] }' }.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