Get
/api/v1/livechat/business-hour
Fetches the default business hours of a workspace.
Permission required: view-livechat-business-hours
Header parameters
X-Auth-Token
stringRequired
The authToken
of the authenticated user.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired
The userId
of the authenticated user.
ExamplerbAXPnMktTFbNpwtJ
Responses
200
OK
Example 1
{
"businessHour": {
"_id": "62f14dd55026d9aac120c653",
"name": "",
"active": true,
"type": "default",
"ts": "2022-08-08T17:54:29.441Z",
"workHours": [
{
"day": "Monday",
"start": {
"time": "08:00",
"utc": {
"dayOfWeek": "Monday",
"time": "08:00"
},
"cron": {
"dayOfWeek": "Monday",
"time": "08:00"
}
},
"finish": {
"time": "20:00",
"utc": {
"dayOfWeek": "Monday",
"time": "20:00"
},
"cron": {
"dayOfWeek": "Monday",
"time": "20:00"
}
},
"code": 1,
"open": true
},
{
"day": "Tuesday",
"start": {
"time": "08:00",
"utc": {
"dayOfWeek": "Tuesday",
"time": "08:00"
},
"cron": {
"dayOfWeek": "Tuesday",
"time": "08:00"
}
},
"finish": {
"time": "20:00",
"utc": {
"dayOfWeek": "Tuesday",
"time": "20:00"
},
"cron": {
"dayOfWeek": "Tuesday",
"time": "20:00"
}
},
"code": 2,
"open": true
},
{
"day": "Wednesday",
"start": {
"time": "08:00",
"utc": {
"dayOfWeek": "Wednesday",
"time": "08:00"
},
"cron": {
"dayOfWeek": "Wednesday",
"time": "08:00"
}
},
"finish": {
"time": "20:00",
"utc": {
"dayOfWeek": "Wednesday",
"time": "20:00"
},
"cron": {
"dayOfWeek": "Wednesday",
"time": "20:00"
}
},
"code": 3,
"open": true
},
{
"day": "Thursday",
"start": {
"time": "08:00",
"utc": {
"dayOfWeek": "Thursday",
"time": "08:00"
},
"cron": {
"dayOfWeek": "Thursday",
"time": "08:00"
}
},
"finish": {
"time": "20:00",
"utc": {
"dayOfWeek": "Thursday",
"time": "20:00"
},
"cron": {
"dayOfWeek": "Thursday",
"time": "20:00"
}
},
"code": 4,
"open": true
},
{
"day": "Friday",
"start": {
"time": "08:00",
"utc": {
"dayOfWeek": "Friday",
"time": "08:00"
},
"cron": {
"dayOfWeek": "Friday",
"time": "08:00"
}
},
"finish": {
"time": "20:00",
"utc": {
"dayOfWeek": "Friday",
"time": "20:00"
},
"cron": {
"dayOfWeek": "Friday",
"time": "20:00"
}
},
"code": 5,
"open": true
},
{
"day": "Saturday",
"start": {
"time": "08:00",
"utc": {
"dayOfWeek": "Saturday",
"time": "08:00"
},
"cron": {
"dayOfWeek": "Saturday",
"time": "08:00"
}
},
"finish": {
"time": "20:00",
"utc": {
"dayOfWeek": "Saturday",
"time": "20:00"
},
"cron": {
"dayOfWeek": "Saturday",
"time": "20:00"
}
},
"code": 6,
"open": false
},
{
"day": "Sunday",
"start": {
"time": "08:00",
"utc": {
"dayOfWeek": "Sunday",
"time": "08:00"
},
"cron": {
"dayOfWeek": "Sunday",
"time": "08:00"
}
},
"finish": {
"time": "20:00",
"utc": {
"dayOfWeek": "Sunday",
"time": "20:00"
},
"cron": {
"dayOfWeek": "Sunday",
"time": "20:00"
}
},
"code": 7,
"open": false
}
],
"timezone": {
"name": "Africa/Abidjan",
"utc": "0"
},
"_updatedAt": "2023-01-02T18:30:31.632Z"
},
"success": true
}
object
businessHour
object
_id
string
name
string
active
boolean
type
string
ts
string
workHours
Array of object
object
day
string
start
object
time
string
utc
object
dayOfWeek
string
time
string
cron
object
dayOfWeek
string
time
string
finish
object
time
string
utc
object
dayOfWeek
string
time
string
cron
object
dayOfWeek
string
time
string
code
integer
open
boolean
timezone
object
name
string
utc
string
_updatedAt
string
success
boolean
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}
object
status
string
message
string
403
Forbidden
Permission Error
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}
Unauthorized
{
"success": false,
"error": "unauthorized"
}
object
success
boolean
error
string