Skip to main content
PATCH
/
availability-periods
/
{id}
Update an availability period
curl --request PATCH \
  --url https://www.ruddr.io/api/workspace/availability-periods/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "start": "2023-12-25",
  "hoursPerDay": [
    123
  ]
}
'
{
  "id": "3a7c1f82-e5d4-4b09-8c2e-f1a6d7b0e934",
  "start": "2024-01-15",
  "end": "2024-06-30",
  "hoursPerDay": [
    6,
    6,
    6,
    6,
    6,
    0,
    0
  ],
  "isDefault": false,
  "createdAt": "2024-01-10T09:23:14.512Z"
}
A period defining a member’s expected working hours. Members may not be full-time, and their availability can change over time.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The availability period uuid.

Body

application/json
start
string<date>

The start date for the period. Will be in the form YYYY-MM-DD.

hoursPerDay
number[]

A list of hours for each day of the week. Array size should always be 7. The first value represents Monday.

Response

200

id
string

The unique identifier for the object.

start
string<date>

The start date for the period. Will be in the form YYYY-MM-DD.

end
string<date> | null

The end date for the period. Will be in the form YYYY-MM-DD. null if the period has no end date.

hoursPerDay
number[]

A list of hours for each day of the week. The array size is always 7. The first value represents Monday.

isDefault
boolean

Whether this is the default availability period for the member.

createdAt
string<date-time>

The timestamp when the object was created.