> ## Documentation Index > Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Get Default Business Hour >
Enterprise
Fetches the default business hours of a workspace. Permission required: `view-livechat-business-hours` ## OpenAPI ````json GET /api/v1/livechat/business-hour { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Omnichannel" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Omnichannel Users" }, { "name": "Omnichannel Agents" }, { "name": "Omnichannel Monitors" }, { "name": "Omnichannel Visitors" }, { "name": "Omnichannel Contacts" }, { "name": "Omnichannel Rooms" }, { "name": "Omnichannel Departments" }, { "name": "Omnichannel Custom Fields" }, { "name": "Omnichannel Business Hours" }, { "name": "Omnichannel Priorities" }, { "name": "Omnichannel Tags" }, { "name": "Omnichannel Units" }, { "name": "SLA Policies" }, { "name": "Canned Responses" }, { "name": "Omnichannel Transcript" }, { "name": "Omnichannel Statistics" }, { "name": "Omnichannel Agent Stats" }, { "name": "Omnichannel Dashboards" }, { "name": "Reports" }, { "name": "Omnichannel Inquiries" }, { "name": "Omnichannel Webhooks" }, { "name": "Livechat" }, { "name": "Livechat Appearance" }, { "name": "Livechat Triggers" }, { "name": "Livechat Messages" }, { "name": "Livechat Page Visited" } ], "paths": { "/api/v1/livechat/business-hour": { "get": { "tags": [ "Omnichannel Business Hours" ], "summary": "Get Default Business Hour", "description": "
\"Enterprise\"
\n\nFetches the default business hours of a workspace.\nPermission required: `view-livechat-business-hours`", "operationId": "get-api-v1-livechat-business-hour", "parameters": [ { "$ref": "#/components/parameters/AuthToken" }, { "$ref": "#/components/parameters/UserId" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "businessHour": { "type": "object", "properties": { "_id": { "type": "string" }, "name": { "type": "string" }, "active": { "type": "boolean" }, "type": { "type": "string" }, "ts": { "type": "string" }, "workHours": { "type": "array", "items": { "type": "object", "properties": { "day": { "type": "string" }, "start": { "type": "object", "properties": { "time": { "type": "string" }, "utc": { "type": "object", "properties": { "dayOfWeek": { "type": "string" }, "time": { "type": "string" } } }, "cron": { "type": "object", "properties": { "dayOfWeek": { "type": "string" }, "time": { "type": "string" } } } } }, "finish": { "type": "object", "properties": { "time": { "type": "string" }, "utc": { "type": "object", "properties": { "dayOfWeek": { "type": "string" }, "time": { "type": "string" } } }, "cron": { "type": "object", "properties": { "dayOfWeek": { "type": "string" }, "time": { "type": "string" } } } } }, "code": { "type": "integer" }, "open": { "type": "boolean" } } } }, "timezone": { "type": "object", "properties": { "name": { "type": "string" }, "utc": { "type": "string" } } }, "_updatedAt": { "type": "string" } } }, "success": { "type": "boolean" } } }, "examples": { "Example 1": { "value": { "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" } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" }, "403": { "$ref": "#/components/responses/permissionError" } } } } }, "components": { "parameters": { "AuthToken": { "name": "X-Auth-Token", "in": "header", "description": "The `authToken` of the authenticated user.", "required": "true", "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" }, "UserId": { "name": "X-User-Id", "in": "header", "description": "The `userId` of the authenticated user.", "required": "true", "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" } }, "responses": { "authorizationError": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "message": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "status": "error", "message": "You must be logged in to do this." } } } } } }, "permissionError": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Permission Error": { "value": { "success": "false", "error": "User does not have the permissions required for this action [error-unauthorized]" } }, "Unauthorized": { "value": { "success": "false", "error": "unauthorized" } } } } } } } } } ````