Zoho: Business Hours Configuration — business Hours create Business Hours
Zoho businessHours.createBusinessHours: arguments, response, policy and SDK examples.
← Business hours operations · Get started
Operation zoho.createbusinesshours
Provider route: POST /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"]["createBusinessHours"]>[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.createBusinessHours(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.create_business_hours(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | object | Required within parent | The request body for creating business hours Additional keys: not allowed |
body.business_hours | object | Required within parent | The business hours configuration object containing all settings for the organization’s working schedule. Additional keys: not allowed |
body.business_hours.business_days | array | Optional | The specific days of the week on which the organization is open for business. Maximum items: 7 Minimum items: 1 Unique items: true |
body.business_hours.business_days[] | string | Each item | Day of the week One of: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday |
body.business_hours.custom_timing | array | Optional | Different business hours for different days when same_as_everyday is false Maximum items: 7 |
body.business_hours.custom_timing[] | object | Each item | Different business hours for different days when same_as_everyday is false Additional keys: not allowed |
body.business_hours.custom_timing[].business_timing | array | Required within parent | Start and end times for this specific day in 24-hour HH:MM format Maximum items: 2 Minimum items: 2 |
body.business_hours.custom_timing[].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]$ |
body.business_hours.custom_timing[].days | string | Required within parent | Specific day of the week for custom business hours One of: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday |
body.business_hours.daily_timing | array | Optional | Default working hours applied to all business days (start and end time) Maximum items: 2 Minimum items: 2 |
body.business_hours.daily_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]$ |
body.business_hours.same_as_everyday | boolean | Optional | If true, the same operating hours apply to all business days. If false, hours vary by day and are defined in custom_timing. |
body.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. One of: 24_by_7, 24_by_5, custom |
body.business_hours.week_starts_on | string | Required within parent | The day on which the organization’s work week begins. One of: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday |
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 |
|---|---|---|---|
$ | object | Root | Standard success response for business hours operations Additional keys: not allowed |
business_hours | Model | Optional | Expand Business Hours Configuration — business Hours create Business Hours — response body — business hours |
Referenced models: Business Hours Configuration — business Hours create Business Hours — response body — business hours
Schemas
Section titled “Schemas”Business Hours Configuration — business Hours create Business Hours — response body — business hours
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Business hours response object Additional keys: not allowed |
code | string | Required within parent | Code representing the operation status Known values: SUCCESS |
details | object | Required within parent | Details of the created business hours Additional keys: not allowed |
details.id | string | Required within parent | Unique identifier of the created business hours Maximum length: 255 |
message | string | Required within parent | Message representing the operation status Known values: Business Hours saved successfully |
status | string | Required within parent | Status of the operation Known values: success |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.createbusinesshours. Catalog operation: createBusinessHours. 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.