Skip to content

Change a calendar

PATCH
/api/v1/calendars/{id}
curl --request PATCH \
--url https://digize.com/api/v1/calendars/example \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "name": "example", "slug": "example", "description": "example", "color": "violet", "duration": 1, "price": 1, "deposit": 1, "capacity": 1, "bufferMinutes": 1, "noticeHours": 1, "windowDays": 1, "team": [ { "id": "example", "name": "example" } ], "roundRobin": true, "active": true }'

Saves a calendar’s name, booking page, rules, price, deposit and team. Appointments already booked keep theirs.

Needs the crm:write permission.

id
required
string
>= 1 characters <= 64 characters
Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69
Media typeapplication/json
object
name
required
string
>= 1 characters <= 64 characters
slug
string
<= 48 characters
description
string
<= 2000 characters
color
required
string
Allowed values: violet orange teal blue amber pink
duration
required
integer
>= 5 <= 720
price

In the workspace currency’s minor unit: 2000 is $20.00.

integer
<= 100000000
deposit

In the workspace currency’s minor unit: 2000 is $20.00.

integer
<= 100000000
capacity
integer
>= 1 <= 50
bufferMinutes
integer
<= 240
noticeHours
integer
<= 720
windowDays
integer
>= 1 <= 365
team
required
Array<object>
<= 50 items
object
id
required

The team member’s user id.

string
name
required
string
roundRobin
boolean
active
boolean

Done

Media typeapplication/json
object
id
required
string
name
required
string
slug
required

Its booking page’s address after the workspace’s.

string
description
required
string
color
required
string
Allowed values: violet orange teal blue amber pink
duration
required

In minutes.

number
price
required

Per person, in minor units.

integer
<= 100000000
deposit
required

Per person, taken through Stripe when a customer books.

integer
<= 100000000
capacity
required

The most people one booking can bring.

number
bufferMinutes
required

Kept free after each appointment.

number
noticeHours
required

How soon before it starts a time can be booked.

number
windowDays
required

How far ahead customers can book.

number
team
required
Array<object>
object
id
required

The team member’s user id.

string
name
required
string
roundRobin
required

Each booking goes to whoever’s free and least booked.

boolean
active
required

Whether its booking page takes bookings.

boolean

Example

{
"color": "violet"
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}