PT EN

Calendário: Dias

URL base: $BUSINESS_API

Listar dias do calendário

Registos

GET /calendar/days

Lists the tenant's dated exceptions (holidays, closures and extra working days), sorted by date, in a data array without pagination. Each day records where it came from (manual, file, url, connector or template). Recurring rules are not expanded here; use the rules endpoint or the occurrences evaluator for them. Requires automations:read.

Parâmetros

fromstring (date-time) · consulta · opcional

Earliest date to include, as YYYY-MM-DD, inclusive; omitted means no lower bound.

tostring (date-time) · consulta · opcional

Latest date to include, as YYYY-MM-DD, inclusive; omitted means no upper bound.

area_idstring · consulta · opcional

Service area id; when set, the list holds that area's days plus the tenant-wide days that have no area, and when omitted it holds every day of the tenant.

limitinteger · consulta · opcional

Maximum resources to return (default 20, maximum 100).

afterstring · consulta · opcional

Opaque cursor returned by the previous page.

Devolve

200 Calendar days

Permissões automations:read · Funções: admin, analyst, customer_service, finance, operations, owner

curl -X GET "$BUSINESS_API/calendar/days" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200

Calendar days

Adicionar um dia ao calendário

Registos

POST /calendar/days

Adds one dated exception to the tenant calendar and returns it with 201. The date must be YYYY-MM-DD and kind must be holiday (the default), closure or working; a working day overrides a weekday that is normally off, and a holiday or closure makes the date non-working for schedules. name_pt falls back to name and name_en falls back to name_pt; the day is stored with source manual. Requires automations:write.

Corpo application/json

datestring (date-time) · obrigatório
kindstring · opcional · predefinição holiday

um de holiday, closure, working

namestring · opcional
area_idstring · opcional

Devolve

201 Created day

Erros 400

Permissões automations:write · Funções: admin, finance, operations, owner

curl -X POST "$BUSINESS_API/calendar/days" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "date": "2026-11-19T09:30:00Z",
  "kind": "holiday",
  "name": "Ana Matsinhe",
  "area_id": "are_2ZTQYjrK63ZImD3sMz1O2BhWeZV"
}'
Resposta 201

Created day

Remover um dia do calendário

Registos

DELETE /calendar/days/{id}

Removes one dated exception from the tenant calendar and returns 204 with no body. Schedules evaluated afterwards treat the date by its normal weekday again. Returns 404 when the day does not exist in this tenant. Requires automations:write.

Parâmetros

idstring · caminho · obrigatório

Id of the calendar day to delete, as returned when it was added or listed (prefix cdy).

Devolve

204 Deleted

Erros 404

Permissões automations:write · Funções: admin, finance, operations, owner

curl -X DELETE "$BUSINESS_API/calendar/days/{id}" \
  -H "Authorization: Bearer sk_test_..."
Resposta 204

Deleted