Skip to content

Zoho: Update a shift hour

Zoho shiftHours.updateSingleShiftHour: arguments, response, policy and SDK examples.

← Shift hours operations · Get started

Operation zoho.updatesingleshifthour

Provider route: PUT /crm/v8/settings/business_hours/shift_hours/{shift}. 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["shiftHours"]["updateSingleShiftHour"]>[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.shiftHours.updateSingleShiftHour(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.shift_hours.update_single_shift_hour(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.shiftstringRequired within parentMaximum length: 50
bodyobjectRequired within parentRepresents the request body for updating one or more shift hour configurations. Each entry in `shift_hours` updates an existing shift with its timing, break hours, optional holidays, and assigned users.
Additional keys: not allowed
body.shift_hoursarrayOptionalLists the shift hour configurations to be created or updated in the request.
Maximum items: 50
body.shift_hours[]objectEach itemEach object specifies a shift hour with its timing, break hours, holidays, and assigned users.
Additional keys: not allowed
body.shift_hours[].break_hoursarrayOptionalLists the break windows scheduled within the shift hour. A shift can have at most two break windows.
Maximum items: 50
body.shift_hours[].break_hours[]objectEach itemEach object specifies the days the break applies to and the break timing for those days.
Additional keys: not allowed
body.shift_hours[].break_hours[].break_daysarrayOptionalLists the days of the week on which the break hour applies.
Maximum items: 7
body.shift_hours[].break_hours[].break_days[]stringEach itemRepresents one day of the week on which the
break hour applies.


Possible values:

- Monday

- Tuesday

- Wednesday

- Thursday

- Friday

- Saturday

- Sunday

One of: Monday, Thursday, Friday, Sunday, Wednesday, Tuesday, Saturday
body.shift_hours[].break_hours[].custom_timingarrayOptionalLists per-day break timing overrides. This field is mandatory when the parent same_as_everyday is false. A day can have at most two breaks and the total break time on a day cannot exceed two hours.
Maximum items: 50
body.shift_hours[].break_hours[].custom_timing[]ModelEach itemExpand Update shift hours — request body — body shift hours item break hours item custom timing item
body.shift_hours[].break_hours[].daily_timingarrayOptionalRepresents the start and end time of the break
in `HH:MM` 24-hour format, applied uniformly to
every day the break is scheduled.


This field is mandatory when the parent
same_as_everyday is true. A day can have
at most two breaks and the total break time on a
day cannot exceed two hours.

Maximum items: 50
body.shift_hours[].break_hours[].daily_timing[]stringEach itemEach string epresents the start time or end time of the window in
`HH:MM` 24-hour format.

Maximum length: 5
Pattern: ^([0-1][0-9]|2[0-3]):[0-5][0-9]$
body.shift_hours[].break_hours[].same_as_everydaystringOptionalIndicates whether the shift hour follows the same timing on every active day. When the value is true, the daily_timing array becomes mandatory; when the value is false, the custom_timing array becomes mandatory.
Maximum length: 100
body.shift_hours[].custom_timingarrayOptionalLists per-day shift timing overrides. This field is mandatory when same_as_everyday is false.
Maximum items: 50
body.shift_hours[].custom_timing[]objectEach itemEach object specifies the day of the week and the start and end time of the shift on that day.
Additional keys: not allowed
body.shift_hours[].custom_timing[].daysstringOptionalRepresents the day of the week to which this
custom shift timing applies.


Possible values:

- Monday

- Tuesday

- Wednesday

- Thursday

- Friday

- Saturday

- Sunday

One of: Monday, Thursday, Friday, Sunday, Wednesday, Tuesday, Saturday
body.shift_hours[].custom_timing[].shift_timingarrayOptionalRepresents the start and end time of the shift on the specified
day in `HH:MM` 24-hour format.

Maximum items: 7
body.shift_hours[].custom_timing[].shift_timing[]stringEach itemEach string represents the start time or end time of the window in
`HH:MM` 24-hour format.

Maximum length: 5
Pattern: ^([0-1][0-9]|2[0-3]):[0-5][0-9]$
body.shift_hours[].daily_timingarrayOptionalRepresents the start and end time of the shift in `HH:MM` 24-hour
format, applied uniformly to every active day. This
field is mandatory when same_as_everyday is
true.

Maximum items: 50
body.shift_hours[].daily_timing[]stringEach itemEach string epresents the start time or end time of the window in
`HH:MM` 24-hour format.

Maximum length: 5
Pattern: ^([0-1][0-9]|2[0-3]):[0-5][0-9]$
body.shift_hours[].holidaysarrayOptionalLists the holidays observed during the shift hour. The holiday date must fall between the current and the next financial year.
Maximum items: 50
body.shift_hours[].holidays[]objectEach itemEach object specifies the date and the name of the holiday.
Additional keys: not allowed
body.shift_hours[].holidays[].datestringOptionalRepresents the date of the holiday in `YYYY-MM-DD` format.
Format: date
body.shift_hours[].holidays[].namestringOptionalRepresents the name of the holiday. The name must not contain the special characters.
Maximum length: 80
body.shift_hours[].namestringOptionalRepresents the name of the shift hour. The name must be unique within the organization and must not contain the special characters.
Maximum length: 80
body.shift_hours[].same_as_everydaybooleanOptionalIndicates whether the shift hour follows the same
timing on every active day.


Possible values:

- true - the shift hour uses the same timing every
day, and daily_timing becomes mandatory.

- false - the shift hour uses different timing for
different days, and custom_timing becomes
mandatory.
body.shift_hours[].shift_daysarrayOptionalLists the days of the week on which the shift hour is
active. You can set shift timing only on the days your
organization operates.


Possible values:

- Monday

- Tuesday

- Wednesday

- Thursday

- Friday

- Saturday

- Sunday

Maximum items: 7
body.shift_hours[].shift_days[]stringEach itemEach string represents one day of the week on which the shift hour is active.


One of: Monday, Thursday, Friday, Sunday, Wednesday, Tuesday, Saturday
body.shift_hours[].timezonestringOptionalRepresents the time zone in which the shift hours are scheduled.
Maximum length: 100
body.shift_hours[].usersarrayOptionalLists the users assigned to the shift hour.
Maximum items: 200
body.shift_hours[].users[]objectEach itemEach object specifies the user and the date from which the assignment becomes effective.
Additional keys: not allowed
body.shift_hours[].users[].idstringOptionalRepresents the unique identifier of the user assigned to the shift hour.
Maximum length: 100

Referenced models: Update shift hours — request body — body shift hours item break hours item custom timing item

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

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)ModelAlternativeExpand Delete a shift hour — response body
Response body details
$ (anyOf 2)ModelAlternativeExpand Delete a shift hour — response body

Referenced models: Delete a shift hour — response body

Delete a shift hour — response body
FieldTypePresenceDescription and constraints
$objectRootRepresents the response body that contains the shift hour configurations and the aggregate count of shifts with assigned users.
Additional keys: not allowed
shift_hoursarrayRequired within parentLists the shift hour configurations in the request or response.
Maximum items: 50
shift_hours[]objectEach itemEach object represents one shift hour with its timing, break hours, holidays, and assigned users.
Additional keys: not allowed
shift_hours[].codestringRequired within parentRepresents the response code of the operation.
Known values: SUCCESS
shift_hours[].detailsobjectRequired within parentRepresents additional details about the outcome of the operation.
Additional keys: not allowed
shift_hours[].details.idstringRequired within parentRepresents the unique identifier of the shift hour affected by the operation.
Maximum length: 100
shift_hours[].messagestringRequired within parentRepresents the message that describes the outcome of the operation.
Maximum length: 100
shift_hours[].statusstringRequired within parentRepresents the status of the operation.
Known values: success
Update shift hours — request body — body shift hours item break hours item custom timing item
FieldTypePresenceDescription and constraints
$objectRootEach object specifies the day of the week and the start and end time of the break on that day.
Additional keys: not allowed
break_timingarrayOptionalRepresents the start and end time of the break on the specified day
in `HH:MM` 24-hour format. A break must be
longer than 15 minutes and shorter than 2
hours.

Maximum items: 7
break_timing[]stringEach itemEach string represents the start time or end time of the window in
`HH:MM` 24-hour format.

Maximum length: 5
Pattern: ^([0-1][0-9]|2[0-3]):[0-5][0-9]$
daysstringOptionalRepresents the day of the week to which
this custom break timing applies.


**Possible values**:

- Monday

- Tuesday

- Wednesday

- Thursday

- Friday

- Saturday

- Sunday

One of: Monday, Thursday, Friday, Sunday, Wednesday, Tuesday, Saturday

SDK function policy ID: zoho.updatesingleshifthour. Catalog operation: updateSingleShiftHour. 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.