> ## 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 Business Hours

> <div style="text-align: center; margin: 1rem 0 1rem 0;"><img src="https://raw.githubusercontent.com/RocketChat/Rocket.Chat-Open-API/main/images/Enterprise%20tag.svg" alt="Enterprise" style="display: block; margin: auto;"></div>

Retrieves all the <a href='https://docs.rocket.chat/docs/business-hours' target='_blank'>business hours</a> attached to a workspace.
Permission required: `view-livechat-business-hours`

## OpenAPI

````json GET /api/v1/livechat/business-hours
{
  "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-hours": {
      "get": {
        "tags": [
          "Omnichannel Business Hours"
        ],
        "summary": "Get Business Hours",
        "description": "<div style=\"text-align: center; margin: 1rem 0 1rem 0;\"><img src=\"https://raw.githubusercontent.com/RocketChat/Rocket.Chat-Open-API/main/images/Enterprise%20tag.svg\" alt=\"Enterprise\" style=\"display: block; margin: auto;\"></div>\n\nRetrieves all the <a href='https://docs.rocket.chat/docs/business-hours' target='_blank'>business hours</a> attached to a workspace.\nPermission required: `view-livechat-business-hours`",
        "operationId": "get-api-v1-livechat-business-hours",
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthToken"
          },
          {
            "$ref": "#/components/parameters/UserId"
          },
          {
            "name": "name",
            "in": "query",
            "description": "Name of the business hour.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/count"
          },
          {
            "$ref": "#/components/parameters/sort"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "businessHours": {
                      "type": "array",
                      "items": {
                        "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"
                                        }
                                      }
                                    }
                                  }
                                },
                                "open": {
                                  "type": "boolean"
                                }
                              }
                            }
                          },
                          "timezone": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "utc": {
                                "type": "string"
                              }
                            }
                          },
                          "_updatedAt": {
                            "type": "string"
                          },
                          "departmentsToApplyBusinessHour": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  }
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "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"
                    }
                  }
                }
              }
            }
          },
          "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"
      },
      "offset": {
        "name": "offset",
        "in": "query",
        "required": "false",
        "schema": {
          "type": "integer"
        },
        "example": "50",
        "description": "Number of items to \"skip\" in the query, i.e. requests return count items, skipping the first offset items. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more."
      },
      "count": {
        "name": "count",
        "in": "query",
        "required": "false",
        "schema": {
          "type": "integer"
        },
        "example": "25",
        "description": "The number of items to return. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more."
      },
      "sort": {
        "name": "sort",
        "in": "query",
        "required": "false",
        "schema": {
          "format": "object"
        },
        "description": "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](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more."
      }
    },
    "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"
                }
              }
            }
          }
        }
      }
    }
  }
}
````

