post https://api.zenoti.com/v1/employees//blockouttimes
This API helps you to create a blockout time for the specified employee.
You must specify the unique identifier of the employee as employee_id in the API request.
Request Body Parameters
| Name | Type | Description |
|---|---|---|
| center_id | guid | Unique 32-character identifier of the center in which the blockout time is to be created. |
| block_out_time_type_id | int | Type of blockout time. |
| start_time | datetime | Date and time (center) on which block out time started. |
| end_time | datetime | Date and time (center) on which block out time ended. |
| notes | string | Notes/description stored during the creation of blockout time. |
| mode | int | 0 - create new recurrence breaks and 1 - modify recurrence existing breaks. |
| recurring_block_out_time | object | Object that contains all recurring blockout time-related elements. |
Response Details
| Name | Type | Description |
|---|---|---|
| block_out_times | object | Object that contains the list of block out times between start date and end date. |
| error | object | Object that contains error code and error message-related details. For more information, refer to the error Object table. |
error Object
| Error Code | Error Message |
|---|---|
| 502 | Cannot create the blockouttime on center holiday. |
| 1004 | Not a valid Employee. Please check. |
| 500 | Object reference not set to an instance of an object. |
| 503 | Any one of center_id, employee_id, block_out_time_type_id, start_time, or end_time are missing" |
| 400 | The request is invalid. |
| 1004 | time difference between start_time and end_time should be greater than zero and should not exceed 12hours". |
| 712 | service_provider_01 e is busy at this time. |
| 503 | Invalid interval or occurences or rec_end_date are passed. |
| 503 | Any one of the time_period, rec_start_date or interval is missing while creating recurring block out time. |
| 503 | both occurences or rec_end_date are passed. |
| 503 | BlockOutTimeRequest object is not supplied. |
| 503 | any one of the occurences or rec_end_date are not passed. |
| 503 | Any one of the time_period, rec_start_date or interval is missing while creating recurring block out time. |
