---
title: "Edit working hour"
method: PATCH
path: "/working_hours/{id}"
tags: ["Working Hours"]
---

# Edit working hour

`PATCH /working_hours/{id}`

This endpoint updates an existing working hour. At most one of days, specific_date, or custom_recurrence can be provided. The appointment_types field is included in the response only when appointment_type_ids or appointment_category_ids were part of the update.

## Path parameters

- `id` integer, required

## Query parameters

- `subdomain` string, required

## Headers

- `Nex-Api-Version` string, required

## Request body

- PatchWorkingHoursId — Edit working hour
  - `working_hour` object, required
    - `provider_id` integer — Id of the provider
    - `begin_time` string — What time working hour starts in UTC. Format is HH:MM
    - `end_time` string — What time working hour ends in UTC. Format is HH:MM
    - `operatory_id` integer — Id of the operatory
    - `appointment_type_ids` integer[] — Associate appointment types with this working hour
    - `days` string[] — Configure days of the week for this working hour
    - `specific_date` string, date — Configure specific date for this working hour
    - `custom_recurrence` object — Configure custom recurrence
      - `num` integer, required — Unit count
      - `ref` string, date, required — Starting date
      - `unit` 'day' | 'week' | 'month', required — Every # days/weeks/months
    - `active` boolean — Is this working hour active?

## Response `200`

Successful

- APIV20240412EntitiesWorkingHourResponse — API_V20240412_Entities_WorkingHour_Response model
  - `code` boolean — Indicates the success or failure of the request
  - `description` string — Additional context on the request to help with debugging.
  - `error` string[] — Any errors that occur during the execution of the request.
  - `data` APIV20240412EntitiesWorkingHour
    - `id` integer — Resource id
    - `provider_id` integer, nullable — Provider id
    - `location_id` integer, nullable — Location id
    - `operatory_id` integer, nullable — Operatory id
    - `begin_time` string — Availability start time in the practices timezone
    - `end_time` string — Availability end time in the practices timezone
    - `days` string[], nullable — Configured week days. Empty when the working hour is configured for a custom recurrence
    - `specific_date` string, date, nullable — Configured specific date
    - `custom_recurrence` object, nullable — Configured custom recurrence, with the fields num (recurrence interval count), ref (starting date), and unit (day, week, or month)
    - `tz_offset` string — UTC offset for the practice
    - `active` boolean — Is active?
    - `source` 'manual' | 'synced' — Source of the working hour
    - `label` APIV20240412EntitiesWorkingHourLabel
      - `id` integer — Resource id
      - `location_id` integer, nullable — The location ID
      - `name` string — The name for working hour label
    - `appointment_types` APIV2EntitiesAppointmentTypeBasic[] — Associated appointment types
      - `id` integer — Appointment type Id
      - `name` string — Appointment type name. Unique string identifier
      - `parent_type` string — Parent type for appointment type. Defines the belongs to relationship with either Institution or Location
      - `parent_id` integer — Identifies the specific resource the appointment type belongs to (see parent_type)
      - `minutes` integer — Default duration of appointments of this appointment type
      - `bookable_online` boolean — True if this appointment type should be bookable via the NexHealth online booking page
  - `count` integer — Number of total objects, in case of collection.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/nexhealth/apis/nexhealth-api.md) · [All operations](https://skmtc.net/nexhealth/apis/nexhealth-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nexhealth/nexhealth-api/revisions/a180e830b672/schema)
