---
title: "Update Hour"
method: PATCH
path: "/hours/{id}"
tags: ["hours"]
---

# Update Hour

`PATCH /hours/{id}`

Update a specific availability record.

## Path parameters

- `id` string, uuid, required

## Query parameters

- `mock` boolean

## Request body

- HourPatch — Request body for updating availability
  - `data` object — The data object
    - `type` string — Type of resource
    - `attributes` object — Attributes of resource
      - `startTime` string — Start time (in the record timeZone)
      - `endTime` string — End time (in the record timeZone)
      - `timeZone` string — Time zone of the hour record
      - `date` union — This attribute, along with `dayOfWeek` determines whether availability is recurring or special. If `date` is null, availability is is recurring on given `dayOfWeek`. If `date` is populated, availability applies specifically on given `date`. One of the two attributes is required.
        - string
        - unknown
      - `dayOfWeek` union — Day of week by index. If set, it must be 1 (Monday) through 7 (Sunday). This attribute, along with `date`, determines whether availability is recurring or special. If `date` is null, availability is recurring on the given `dayOfWeek`. If `date` is populated, availability applies specifically on given `date`. One of the two attributes is required.
        - integer
        - unknown
      - `available` boolean — Whether the record indicates that the resource is available or not available.
      - `resourceUri` string — URI of resource. resourceUri is the canonical URI for the specific resource being referenced. The resourceUri must be fully formed showing all relationships to related resources, beginning with the organization. The resourceUri must begin with a leading `/` and cannot end with a trailing `/`. So, the resourceUri for the service with the UUID `2c3cb017-e4ab-41b1-ba5e-e60095e6f1e4` at the location with the UUID `4610e604-b8d9-49c6-81ee-d76ba9e91304` for the organization with the UUID `0575d50d-7725-4e96-92e0-6aef720763fa` would be `/organizations/0575d50d-7725-4e96-92e0-6aef720763fa/locations/4610e604-b8d9-49c6-81ee-d76ba9e91304/services/2c3cb017-e4ab-41b1-ba5e-e60095e6f1e4`

## Response `201`

Return a single data response

- object
  - `data` HourDataResponse, required — Expected data response object
    - `type` string — Type of resource
    - `id` string, uuid — UUID of resource; additional resource attributes will also be returned
    - `attributes` object — Attributes of resource
      - `startTime` string — Start time (in the record timeZone)
      - `endTime` string — End time (in the record timeZone)
      - `timeZone` string — Time zone of the hour record
      - `date` union — This attribute, along with `dayOfWeek` determines whether availability is recurring or special. If `date` is null, availability is is recurring on given `dayOfWeek`. If `date` is populated, availability applies specifically on given `date`. One of the two attributes is required.
        - string
        - unknown
      - `dayOfWeek` union — Day of week by index. If set, it must be 1 (Monday) through 7 (Sunday). This attribute, along with `date`, determines whether availability is recurring or special. If `date` is null, availability is recurring on the given `dayOfWeek`. If `date` is populated, availability applies specifically on given `date`. One of the two attributes is required.
        - integer
        - unknown
      - `available` boolean — Whether the record indicates that the resource is available or not available.
      - `resourceUri` string — URI of resource. resourceUri is the canonical URI for the specific resource being referenced. The resourceUri must be fully formed showing all relationships to related resources, beginning with the organization. The resourceUri must begin with a leading `/` and cannot end with a trailing `/`. So, the resourceUri for the service with the UUID `2c3cb017-e4ab-41b1-ba5e-e60095e6f1e4` at the location with the UUID `4610e604-b8d9-49c6-81ee-d76ba9e91304` for the organization with the UUID `0575d50d-7725-4e96-92e0-6aef720763fa` would be `/organizations/0575d50d-7725-4e96-92e0-6aef720763fa/locations/4610e604-b8d9-49c6-81ee-d76ba9e91304/services/2c3cb017-e4ab-41b1-ba5e-e60095e6f1e4`
      - `createdAt` string, date-time — Date the resource was logged
      - `updatedAt` string, date-time — Date the resource was last modified
      - `createdBy` string, uuid — User who created the hour resource
      - `updatedBy` union — User who updated the hour resource
        - string, uuid
        - unknown
    - `relationships` object — Relationships of availability
    - `links` Link — Link object for resource meta data
      - `self` string
  - `links` Link — Link object for resource meta data
    - `self` string

## Other responses

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

---

[API](https://skmtc.net/brickworksoftware/apis/brickwork-software-api.md) · [All operations](https://skmtc.net/brickworksoftware/apis/brickwork-software-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/brickworksoftware/brickwork-software-api/versions/b06aa4f3b83c/schema)
