Zoho: Business Hours Configuration — business Hours get Business Hours
Zoho businessHours.getBusinessHours: arguments, response, policy and SDK examples.
← Business hours operations · Get started
Operation zoho.getbusinesshours
Provider route: GET /crm/v8/settings/business_hours. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/zoho with npm, or alter-sdk-zoho with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { ZohoIntegration } from "@alter-ai/zoho";
async function execute(input: Parameters<ZohoIntegration["businessHours"]["getBusinessHours"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new ZohoIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.businessHours.getBusinessHours(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_zoho import ZohoIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = ZohoIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.business_hours.get_business_hours(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | object | Alternative | Business hours retrieval response Additional keys: not allowed |
$ (anyOf 1).business_hours | object | Required within parent | The business hours configuration object containing all settings for the organization’s working schedule. Additional keys: not allowed |
$ (anyOf 1).business_hours.business_days | array | Required within parent | The specific days of the week on which the organization is open for business. Maximum items: 7 Minimum items: 1 Unique items: true |
$ (anyOf 1).business_hours.business_days[] | string | Each item | The specific days of the week on which the organization is open for business. Known values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday |
$ (anyOf 1).business_hours.custom_timing | JSON | Required within parent | |
$ (anyOf 1).business_hours.custom_timing (anyOf 1) | array | Alternative | Different business hours for different days when same_as_everyday is false Maximum items: 7 |
$ (anyOf 1).business_hours.custom_timing (anyOf 1)[] | Model | Each item | Expand Business Hours Configuration — business Hours get Business Hours — response body — Business hours retrieval response business hours custom timing null item |
$ (anyOf 1).business_hours.custom_timing (anyOf 2) | null | Alternative | Different business hours for different days when same_as_everyday is false Maximum items: 7 |
$ (anyOf 1).business_hours.custom_timing (anyOf 2)[] | Model | Each item | Expand Business Hours Configuration — business Hours get Business Hours — response body — Business hours retrieval response business hours custom timing null item |
$ (anyOf 1).business_hours.daily_timing | JSON | Required within parent | |
$ (anyOf 1).business_hours.daily_timing (anyOf 1) | array | Alternative | Default working hours applied to all business days (start and end time) Maximum items: 2 Minimum items: 2 |
$ (anyOf 1).business_hours.daily_timing (anyOf 1)[] | string | Each item | Time in HH:MM format (24-hour) Maximum length: 5 Pattern: ^([0-1][0-9]|2[0-3]):[0-5][0-9]$ |
$ (anyOf 1).business_hours.daily_timing (anyOf 2) | null | Alternative | Default working hours applied to all business days (start and end time) Maximum items: 2 Minimum items: 2 |
$ (anyOf 1).business_hours.daily_timing (anyOf 2)[] | string | Each item | Time in HH:MM format (24-hour) Maximum length: 5 Pattern: ^([0-1][0-9]|2[0-3]):[0-5][0-9]$ |
$ (anyOf 1).business_hours.id | string | Required within parent | The unique identifier assigned to this business hours configuration. Maximum length: 255 Pattern: ^[0-9]+$ |
$ (anyOf 1).business_hours.same_as_everyday | boolean | Required within parent | If true, the same operating hours apply to all business days. If false, hours vary by day and are defined in custom_timing. |
$ (anyOf 1).business_hours.timezone | string | Required within parent | Timezone for business hours (IANA timezone identifier) Maximum length: 100 |
$ (anyOf 1).business_hours.type | string | Required within parent | The type of business hours configuration: ‘24_by_7’ for 24/7 operation, ‘24_by_5’ for 24-hour weekday operation, or ‘custom’ for a customized schedule. Known values: 24_by_7, 24_by_5, custom |
$ (anyOf 1).business_hours.week_starts_on | string | Required within parent | The day on which the organization’s work week begins. Known values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday |
$ (anyOf 2) | null | Alternative |
Referenced models: Business Hours Configuration — business Hours get Business Hours — response body — Business hours retrieval response business hours custom timing null item
Schemas
Section titled “Schemas”Business Hours Configuration — business Hours get Business Hours — response body — Business hours retrieval response business hours custom timing null item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Different business hours for different days when same_as_everyday is false Additional keys: not allowed |
business_timing | array | Required within parent | Start and end time for business hours on this specific day Maximum items: 2 Minimum items: 2 |
business_timing[] | string | Each item | Time in HH:MM format (24-hour) Maximum length: 5 Pattern: ^([0-1][0-9]|2[0-3]):[0-5][0-9]$ |
days | string | Required within parent | Specific day of the week for custom business hours Known values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.getbusinesshours. Catalog operation: getBusinessHours. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
No-content response statuses: [204]