Use this endpoint to create a new Omnichannel business hour.
The authToken of the authenticated user.
The userId of the authenticated user.
{
"name": "api-BH",
"timezoneName": "Asia/Bangkok",
"daysOpen": [
"Monday",
"Wednesday"
],
"departmentsToApplyBusinessHour": "TEST-DEPT",
"active": true,
"type": "custom",
"workHours": [
{
"day": "Monday",
"start": "08:00:00",
"finish": "16:00:00",
"open": true
},
{
"day": "Wednesday",
"start": "08:00:00",
"finish": "16:00:00",
"open": true
}
],
"_id": "6953b3bc6ff48667974be88e"
}Enter a name for the business hour.
Enter the timezone for the business hour. You can view the list of time zones from the Business Hours settings in the workspace.
Enter the days of the week that the business hour will apply to.
Enter the department ID to which the business hour must be applied.
Enter whether or not the business hour must be active as soon as it is created.
Enter the type of the business hour. It can be default or custom.
Enter the work hours for each open day. Make sure to include the day you have added to the daysOpen parameter. Otherwise, it will not be included in the business hour.
Enter the day of the week.
Enter the start time of the business hour.
Enter the end time of the business hour.
Enter whether or not this work hour is active. If you set this as false, the work hour will not be included in the business hour.
Use this parameter to update an existing business hour.
OK
{
"success": true
}Bad Request
{
"success": false,
"errorType": "invalid-params",
"error": "must have required property 'name'"
}Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}