Skip to content

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.

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 os
from alter_sdk import App
from 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()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
bodyobjectRequired within parentThe request body for creating business hours
Additional keys: not allowed
body.business_hoursobjectRequired within parentThe business hours configuration object containing all settings for the organization’s working schedule.
Additional keys: not allowed
body.business_hours.business_daysarrayOptionalThe 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[]stringEach itemDay of the week
One of: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
body.business_hours.custom_timingarrayOptionalDifferent business hours for different days when same_as_everyday is false
Maximum items: 7
body.business_hours.custom_timing[]objectEach itemDifferent business hours for different days when same_as_everyday is false
Additional keys: not allowed
body.business_hours.custom_timing[].business_timingarrayRequired within parentStart 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[]stringEach itemTime 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[].daysstringRequired within parentSpecific day of the week for custom business hours
One of: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
body.business_hours.daily_timingarrayOptionalDefault working hours applied to all business days (start and end time)
Maximum items: 2
Minimum items: 2
body.business_hours.daily_timing[]stringEach itemTime 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_everydaybooleanOptionalIf 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.typestringRequired within parentThe 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_onstringRequired within parentThe day on which the organization’s work week begins.
One of: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$objectRootStandard success response for business hours operations
Additional keys: not allowed
business_hoursModelOptionalExpand 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

Business Hours Configuration — business Hours create Business Hours — response body — business hours
FieldTypePresenceDescription and constraints
$objectRootBusiness hours response object
Additional keys: not allowed
codestringRequired within parentCode representing the operation status
Known values: SUCCESS
detailsobjectRequired within parentDetails of the created business hours
Additional keys: not allowed
details.idstringRequired within parentUnique identifier of the created business hours
Maximum length: 255
messagestringRequired within parentMessage representing the operation status
Known values: Business Hours saved successfully
statusstringRequired within parentStatus of the operation
Known values: success

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.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.