{"openapi":"3.0.0","info":{"description":"Appointment scheduling","version":[{"name":"v1","value":"v1"}]},"servers":[{"description":"Appointment scheduling","url":"https://api.apirails.com/zohobookings"}],"paths":{"/bookings/v1/json/addstaff":{"post":{"tags":["Staff"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://www.zoho.com/bookings/help/api/v1/add-staff.html","api_endpoint":"https://{bookings_host}/bookings/v1/json/addstaff"},"summary":"Add Staff","description":"To add staff to your Zoho Bookings account. This can be done by the admin and Super admin.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"additional info":{"type":"string","description":"The additional information about the staff"},"assigned_services":{"type":"string","description":"The services that the staff has been assigned to. You can send a single service or a list of services in the below format. **[\"service_id\"] (OR) [\"service_id_1\", \"service_id_2\"]**"},"designation":{"type":"string","description":"The designation of the staff"},"dob":{"type":"string","description":"The date of birth of the staff. **Format:** dd-MMM-yyyy HH:mm:ss (e.g. 30-Apr-2019 22:00:00) **or** dd-MMM-yyyy hh:mm:ss (e.g. 30-Apr-2019 10:00:00 PM)"},"email":{"type":"string","description":"The email id of the staff","required":true},"gender":{"type":"string","description":"The gender of the staff"},"name":{"type":"string","description":"The name of the staff","required":true},"phone":{"type":"string","description":"The phone number of the staff"},"role":{"type":"string","description":"The role of the staff. It can take any of these values - **Admin, Manager, Staff.**"}}},"example":{"additional info":"","assigned_services":"","designation":"","dob":"","email":"","gender":"","name":"","phone":"","role":""}}}}}},"/bookings/v1/json/appointment":{"post":{"tags":["Appointments"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://www.zoho.com/bookings/help/api/v1/book-appointment.html","api_endpoint":"https://{bookings_host}/bookings/v1/json/appointment"},"summary":"Book Appointment","description":"To book an appointment for a customer for a desired service.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"additional_fields":{"type":"string","description":"Additional details of the customer to be captured through custom fields can be recorded while booking the appointment. Assume the 7 fields for the different types of custom fields - *Participant2* (**Single Line**); *Description* (**Multi Line**); *Email* (**Email**); *Interests* (**Checkbox**); *Ge"},"customer_details":{"type":"string","description":"The details of the customer which needs to be recorded for booking the appointment. They are the customer's name, email address and contact number. They must be represented as a JSON like below. **e.g. {\"name\":\"John\", \"email\":\"john@email.com\", \"phone_number\":\"9876543201\"}**","required":true},"from_time":{"type":"string","description":"The starting time from which the appointment needs to be booked. (24-hour time format) **format: dd-MMM-yyyy HH:mm:ss (e.g. 30-Apr-2019 22:00:00)**","required":true},"notes":{"type":"string","description":"Additional information about the appointment."},"payment_info":{"type":"string","description":"The amount a user has paid for the booking. **e.g. {\"cost_paid\":\"100.00\"}**"},"service_id":{"type":"string","description":"The unique id of the service for which the appointment is booked.","required":true},"staff_id/resource_id/group_id  (For collective booking, group_id is mandatory)":{"type":"string","description":"staff_id: The unique id of the staff associated with the service. resource_id: The unique id of the resource associated with the service. group_id: The unique id of the staff group associated with the collective booking service.","required":true},"timezone":{"type":"string","description":"The timezone under which the appointment needs to be booked."},"to_time":{"type":"string","description":"End time till which the resource has to be booked. Applicable only for resource booking service. (24-hour time) **format: dd-MMM-yyyy HH:mm:ss (e.g. 30-Apr-2019 22:00:00)**"}}},"example":{"additional_fields":"","customer_details":"","from_time":"","notes":"","payment_info":"","service_id":"","staff_id/resource_id/group_id  (For collective booking, group_id is mandatory)":"","timezone":"","to_time":""}}}}}},"/bookings/v1/json/availableslots":{"get":{"tags":["Availability"],"parameters":[{"name":"selected_date","in":"query","description":"The date on which services are checked for availability.","required":true,"schema":{"type":"string","example":""}},{"name":"service_id","in":"query","description":"The unique id of the service for which availability is to be fetched.","required":true,"schema":{"type":"string","example":""}},{"name":"staff_id / group_id / resource_id  (Any one of the above id is mandatory)","in":"query","description":"staff_id: The unique id of the staff associated with the service for which availability is to be fetched. group_id: The unique id of the staff group associated with the service for which availability is to be fetched. resource_id: The unique id of the resource associated with the service for which a","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://www.zoho.com/bookings/help/api/v1/fetch-availability.html","api_endpoint":"https://{bookings_host}/bookings/v1/json/availableslots"},"summary":"Fetch Availability","description":"To fetch availability of appointments across services.","security":[{"bearerAuth":[]}]}},"/bookings/v1/json/resources":{"get":{"tags":["Resources"],"parameters":[{"name":"resource_id","in":"query","description":"The unique id of the resource which needs to be fetched.","required":false,"schema":{"type":"string","example":""}},{"name":"service_id","in":"query","description":"The unique id of the service under which resources needs to be fetched.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://www.zoho.com/bookings/help/api/v1/fetch-resources.html","api_endpoint":"https://{bookings_host}/bookings/v1/json/resources"},"summary":"Fetch Resources","description":"To fetch all the resources.","security":[{"bearerAuth":[]}]}},"/bookings/v1/json/services":{"get":{"tags":["Services"],"parameters":[{"name":"service_id","in":"query","description":"The unique id of the service under a specified workspace which needs to be fetched.","required":false,"schema":{"type":"string","example":""}},{"name":"staff_id","in":"query","description":"The unique id of the staff under a specified service which needs to be fetched.","required":false,"schema":{"type":"string","example":""}},{"name":"workspace_id","in":"query","description":"The unique id of the workspace whose services need to be fetched.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://www.zoho.com/bookings/help/api/v1/fetch-services.html","api_endpoint":"https://{bookings_host}/bookings/v1/json/services"},"summary":"Fetch Services","description":"To fetch all services under a workspace.","security":[{"bearerAuth":[]}]}},"/bookings/v1/json/staffs":{"get":{"tags":["Staff"],"parameters":[{"name":"service_id","in":"query","description":"The unique id if the service which must be fetched.","required":false,"schema":{"type":"string","example":""}},{"name":"staff_email","in":"query","description":"Unique email address of the staff whose details must be fetched. **Note:** This parameter is fetched based on 'contains' logic and not 'equal to' logic. That is, staff emails are searched if the passed value is present rather than requiring an exact match.","required":false,"schema":{"type":"string","example":""}},{"name":"staff_id","in":"query","description":"The unique id of the staff which must be fetched.","required":false,"schema":{"type":"string","example":""}},{"name":"workspace_id","in":"query","description":"The unique id of the [workspace](https://www.zoho.com/bookings/help/api/v1/fetch-workspaces.html).","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://www.zoho.com/bookings/help/api/v1/fetch-staff.html","api_endpoint":"https://{bookings_host}/bookings/v1/json/staffs"},"summary":"Fetch Staff","description":"To fetch the staff details.","security":[{"bearerAuth":[]}]}},"/bookings/v1/json/workspaces":{"get":{"tags":["Workspaces"],"parameters":[{"name":"workspace_id","in":"query","description":"The unique id of the workspace which needs to be fetched.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://www.zoho.com/bookings/help/api/v1/fetch-workspaces.html","api_endpoint":"https://{bookings_host}/bookings/v1/json/workspaces"},"summary":"Fetch Workspaces","description":"To fetch details of a workspace.","security":[{"bearerAuth":[]}]}},"/bookings/v1/json/getappointment":{"get":{"tags":["Appointments"],"parameters":[{"name":"booking_id","in":"query","description":"The unique id of the previously booked appointment","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://www.zoho.com/bookings/help/api/v1/get-appointment.html","api_endpoint":"https://{bookings_host}/bookings/v1/json/getappointment"},"summary":"Get Appointment","description":"To get details of an appointment.","security":[{"bearerAuth":[]}]}},"/bookings/v1/json/rescheduleappointment":{"post":{"tags":["Appointments"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://www.zoho.com/bookings/help/api/v1/reschedule-appointment.html","api_endpoint":"https://{bookings_host}/bookings/v1/json/rescheduleappointment"},"summary":"Reschedule Appointment","description":"To reschedule an appointment to a different time or to a different staff.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"booking_id":{"type":"string","description":"The unique id of the previously booked appointment.","required":true},"staff_id/group_id/start_time (Any one of the above id is mandatory)":{"type":"string","description":"staff_id: The unique id of the staff which must be rescheduled. group_id: The unique id of the staff group which must be rescheduled. start_time: The new time to which the appointment must be rescheduled. 24 hour format: **dd-MMM-yyyy HH:mm:ss (e.g. 30-Apr-2019 22:00:00)**","required":true}}},"example":{"booking_id":"","staff_id/group_id/start_time (Any one of the above id is mandatory)":""}}}}}},"/bookings/v1/json/updateappointment":{"post":{"tags":["Appointments"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://www.zoho.com/bookings/help/api/v1/update-appointment.html","api_endpoint":"https://{bookings_host}/bookings/v1/json/updateappointment"},"summary":"Update Appointment","description":"To update the status of a booking or its information.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"action":{"type":"string","description":"The action to perform. Possible values: **completed**, **cancel**, **noshow**, **edit_appointment_info**.","required":true},"booking_id":{"type":"string","description":"The unique id of the previously booked appointment","required":true},"data (mandatory when action is edit_appointment_info)":{"type":"string","description":"Use the **notes** key to update appointment notes and the **custom_fields** key to update custom booking fields. Pass the booking field labels as keys and their corresponding values as key-value pairs inside the data object.","required":true}}},"example":{"action":"","booking_id":"","data (mandatory when action is edit_appointment_info)":""}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"bearerAuth":[]}]}