Get Business Hours

Prev Next
Get
/api/v1/livechat/business-hours
Premium tag

Retrieves all the business hours attached to 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
Query parameters
name
string

Name of the business hour.

offset
integer

Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the official documentation to learn more.

Example50
count
integer

The number of items to return. Refer to the official documentation to learn more.

Example25
sort
(object)

List of fields to order by, and in which direction. JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, sort = {"value": -1, "_id": 1}. Refer to the official documentation to learn more.

Responses
200

OK

Example 1
{
  "businessHours": [
    {
      "_id": "5eeed2c5ffea9759d3a0e5ac",
      "name": "",
      "active": true,
      "type": "default",
      "ts": "2020-06-21T03:24:02.252Z",
      "workHours": [
        {
          "day": "Monday",
          "start": {
            "time": "08:00",
            "utc": {
              "dayOfWeek": "Monday",
              "time": "08:00"
            },
            "cron": {
              "dayOfWeek": "Monday",
              "time": "08:00"
            }
          },
          "finish": {
            "time": "21:06",
            "utc": {
              "dayOfWeek": "Monday",
              "time": "21:06"
            },
            "cron": {
              "dayOfWeek": "Monday",
              "time": "21:06"
            }
          },
          "open": true
        },
        {
          "day": "Tuesday",
          "start": {
            "time": "08:00",
            "utc": {
              "dayOfWeek": "Tuesday",
              "time": "08:00"
            },
            "cron": {
              "dayOfWeek": "Tuesday",
              "time": "08:00"
            }
          },
          "finish": {
            "time": "10:00",
            "utc": {
              "dayOfWeek": "Tuesday",
              "time": "10:00"
            },
            "cron": {
              "dayOfWeek": "Tuesday",
              "time": "10:00"
            }
          },
          "open": true
        },
        {
          "day": "Wednesday",
          "start": {
            "time": "08:00",
            "utc": {
              "dayOfWeek": "Wednesday",
              "time": "08:00"
            },
            "cron": {
              "dayOfWeek": "Wednesday",
              "time": "08:00"
            }
          },
          "finish": {
            "time": "21:00",
            "utc": {
              "dayOfWeek": "Wednesday",
              "time": "21:00"
            },
            "cron": {
              "dayOfWeek": "Wednesday",
              "time": "21:00"
            }
          },
          "open": true
        },
        {
          "day": "Thursday",
          "start": {
            "time": "01:00",
            "utc": {
              "dayOfWeek": "Thursday",
              "time": "01:00"
            },
            "cron": {
              "dayOfWeek": "Thursday",
              "time": "01:00"
            }
          },
          "finish": {
            "time": "23:00",
            "utc": {
              "dayOfWeek": "Thursday",
              "time": "23:00"
            },
            "cron": {
              "dayOfWeek": "Thursday",
              "time": "23:00"
            }
          },
          "open": true
        },
        {
          "day": "Friday",
          "start": {
            "time": "10:00",
            "utc": {
              "dayOfWeek": "Friday",
              "time": "10:00"
            },
            "cron": {
              "dayOfWeek": "Friday",
              "time": "10:00"
            }
          },
          "finish": {
            "time": "22:00",
            "utc": {
              "dayOfWeek": "Friday",
              "time": "22:00"
            },
            "cron": {
              "dayOfWeek": "Friday",
              "time": "22:00"
            }
          },
          "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"
            }
          },
          "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"
            }
          },
          "open": false
        }
      ],
      "timezone": {
        "name": "Africa/Abidjan",
        "utc": "0"
      },
      "_updatedAt": "2022-12-05T17:12:11.585Z",
      "departmentsToApplyBusinessHour": ""
    },
    {
      "_id": "62b1f74aa98c5b539adc912c",
      "ts": "2022-06-21T16:52:26.386Z",
      "name": "indian support time ",
      "workHours": [
        {
          "day": "Monday",
          "start": {
            "time": "10:00",
            "utc": {
              "dayOfWeek": "Monday",
              "time": "04:30"
            },
            "cron": {
              "dayOfWeek": "Monday",
              "time": "04:30"
            }
          },
          "finish": {
            "time": "12:00",
            "utc": {
              "dayOfWeek": "Monday",
              "time": "06:30"
            },
            "cron": {
              "dayOfWeek": "Monday",
              "time": "06:30"
            }
          },
          "open": true
        },
        {
          "day": "Tuesday",
          "start": {
            "time": "00:00",
            "utc": {
              "dayOfWeek": "Monday",
              "time": "18:30"
            },
            "cron": {
              "dayOfWeek": "Monday",
              "time": "18:30"
            }
          },
          "finish": {
            "time": "23:00",
            "utc": {
              "dayOfWeek": "Tuesday",
              "time": "17:30"
            },
            "cron": {
              "dayOfWeek": "Tuesday",
              "time": "17:30"
            }
          },
          "open": true
        },
        {
          "day": "Wednesday",
          "start": {
            "time": "08:00",
            "utc": {
              "dayOfWeek": "Wednesday",
              "time": "02:30"
            },
            "cron": {
              "dayOfWeek": "Wednesday",
              "time": "02:30"
            }
          },
          "finish": {
            "time": "23:00",
            "utc": {
              "dayOfWeek": "Wednesday",
              "time": "17:30"
            },
            "cron": {
              "dayOfWeek": "Wednesday",
              "time": "17:30"
            }
          },
          "open": true
        },
        {
          "day": "Thursday",
          "start": {
            "time": "10:00",
            "utc": {
              "dayOfWeek": "Thursday",
              "time": "04:30"
            },
            "cron": {
              "dayOfWeek": "Thursday",
              "time": "04:30"
            }
          },
          "finish": {
            "time": "01:00",
            "utc": {
              "dayOfWeek": "Wednesday",
              "time": "19:30"
            },
            "cron": {
              "dayOfWeek": "Wednesday",
              "time": "19:30"
            }
          },
          "open": true
        },
        {
          "day": "Friday",
          "start": {
            "time": "12:00",
            "utc": {
              "dayOfWeek": "Friday",
              "time": "06:30"
            },
            "cron": {
              "dayOfWeek": "Friday",
              "time": "06:30"
            }
          },
          "finish": {
            "time": "23:50",
            "utc": {
              "dayOfWeek": "Friday",
              "time": "18:20"
            },
            "cron": {
              "dayOfWeek": "Friday",
              "time": "18:20"
            }
          },
          "open": true
        },
        {
          "day": "Saturday",
          "start": {
            "time": "00:00",
            "utc": {
              "dayOfWeek": "Friday",
              "time": "18:30"
            },
            "cron": {
              "dayOfWeek": "Friday",
              "time": "18:30"
            }
          },
          "finish": {
            "time": "00:00",
            "utc": {
              "dayOfWeek": "Friday",
              "time": "18:30"
            },
            "cron": {
              "dayOfWeek": "Friday",
              "time": "18:30"
            }
          },
          "open": false
        },
        {
          "day": "Sunday",
          "start": {
            "time": "00:00",
            "utc": {
              "dayOfWeek": "Saturday",
              "time": "18:30"
            },
            "cron": {
              "dayOfWeek": "Saturday",
              "time": "18:30"
            }
          },
          "finish": {
            "time": "00:00",
            "utc": {
              "dayOfWeek": "Saturday",
              "time": "18:30"
            },
            "cron": {
              "dayOfWeek": "Saturday",
              "time": "18:30"
            }
          },
          "open": false
        }
      ],
      "active": true,
      "type": "custom",
      "timezone": {
        "name": "Asia/Kolkata",
        "utc": "+05:30"
      },
      "_updatedAt": "2022-11-28T10:41:17.303Z"
    }
  ],
  "count": 2,
  "offset": 0,
  "total": 2,
  "success": true
}
Expand All
object
businessHours
Array of object
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
open
boolean
timezone
object
name
string
utc
string
_updatedAt
string
departmentsToApplyBusinessHour
string
count
integer
offset
integer
total
integer
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
Tags