Schedules API
Business hours schedules and exceptions.
- GET
/schedulesList business schedules - POST
/schedulesCreate a schedule - GET
/schedules/{id}Get a schedule - PATCH
/schedules/{id}Update a schedule - DELETE
/schedules/{id}Delete a schedule - GET
/schedules/{id}/statusGet open/closed status - GET
/schedules/{id}/exceptionsList exceptions - POST
/schedules/{id}/exceptionsAdd an exception - DELETE
/schedules/{id}/exceptions/{eid}Remove an exception - GET
/schedules/{id}/hoursGet weekly business hours - PUT
/schedules/{id}/hoursReplace weekly business hours
GET /schedules
List business schedules
Auth: API key (Authorization: Bearer). Scope: schedules:read.
Requires one of the following scopes: schedules:read.
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | array of object required | |
data[].id | integer | |
data[].name | string | |
data[].timezone | string | |
data[].status | object | Computed open/closed status. Accepts any keys |
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
POST /schedules
Create a schedule
Auth: API key (Authorization: Bearer). Scope: schedules:write.
Requires one of the following scopes: schedules:write.
Request body application/json required
| Field | Type | Description |
|---|---|---|
name | string required | |
timezone | string | IANA time zone name, for example Default |
Responses
201 Schedule created
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.id | integer | |
data.message | string |
400 Invalid request (validation errors under error.details.validation_errors).
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
GET /schedules/{id}
Get a schedule
Auth: API key (Authorization: Bearer). Scope: schedules:read.
Requires one of the following scopes: schedules:read.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Schedule id |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.id | integer | |
data.name | string | |
data.timezone | string | |
data.status | object | Computed open/closed status. Accepts any keys |
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
PATCH /schedules/{id}
Update a schedule
Auth: API key (Authorization: Bearer). Scope: schedules:write.
Requires one of the following scopes: schedules:write.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Schedule id |
Request body application/json required
Type: object
Accepts any keys
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.message | string |
400 Invalid request (validation errors under error.details.validation_errors).
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
DELETE /schedules/{id}
Delete a schedule
Auth: API key (Authorization: Bearer). Scope: schedules:delete.
Requires one of the following scopes: schedules:delete.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Schedule id |
Responses
204 Deleted
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
GET /schedules/{id}/status
Get open/closed status
Auth: API key (Authorization: Bearer). Scope: schedules:read.
Requires one of the following scopes: schedules:read.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Schedule id |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.schedule_id | integer | |
data.schedule_name | string | |
data.timezone | string |
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
GET /schedules/{id}/exceptions
List exceptions
Auth: API key (Authorization: Bearer). Scope: schedules:read.
Requires one of the following scopes: schedules:read.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Schedule id |
start_date | query | string | |
end_date | query | string |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.exceptions | array of object |
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
POST /schedules/{id}/exceptions
Add an exception
Auth: API key (Authorization: Bearer). Scope: schedules:write.
Requires one of the following scopes: schedules:write.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Schedule id |
Request body application/json required
| Field | Type | Description |
|---|---|---|
exception_date | string required | Date of the exception. A second exception for the same date is rejected with 400. |
is_closed | any | Whether the schedule is closed on that date. Defaults to closed (1). |
open_time | string | null | |
close_time | string | null | |
reason | string | null | |
is_recurring | any | Defaults to 0. |
Responses
201 Exception added
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.id | integer | |
data.message | string |
400 Invalid request (validation errors under error.details.validation_errors).
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
DELETE /schedules/{id}/exceptions/{eid}
Remove an exception
Auth: API key (Authorization: Bearer). Scope: schedules:delete.
Requires one of the following scopes: schedules:delete.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Schedule id |
eid | path | integer required | Exception id |
Responses
204 Removed
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
GET /schedules/{id}/hours
Get weekly business hours
Auth: API key (Authorization: Bearer). Scope: schedules:read.
Weekly business hours for the schedule (one row per configured day).
Requires the schedules:read scope.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Schedule id |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.hours | array of object | |
data.hours[].id | integer | |
data.hours[].schedule_id | integer | |
data.hours[].day_of_week | integer | 0=Sunday .. 6=Saturday. min 0 · max 6 |
data.hours[].is_open | integer | boolean | |
data.hours[].open_time | string | null | HH:MM:SS. |
data.hours[].close_time | string | null | HH:MM:SS. |
data.hours[].day_name | string |
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
PUT /schedules/{id}/hours
Replace weekly business hours
Auth: API key (Authorization: Bearer). Scope: schedules:write.
FULL REPLACE (PUT): the supplied hours array replaces all existing weekly hours for the schedule.
Requires the schedules:write scope.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Schedule id |
Request body application/json required
| Field | Type | Description |
|---|---|---|
hours | array of object required | |
hours[].day_of_week | integer | min 0 · max 6 |
hours[].is_open | integer | boolean | |
hours[].open_time | string | null | |
hours[].close_time | string | null |
Responses
200 Updated
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.message | string |
400 Invalid request (validation errors under error.details.validation_errors).
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
Ready to build on Vosy?
API access is included with the Business and Enterprise plans. Sign up, choose a plan with API access, and create your own keys from the Vosy API page in your account. Compare plans
Get Started