/v1/locations/{location_id}/special_closings, with individual closings addressed at /v1/locations/{location_id}/special_closings/{special_closing_id}.
The special_closing object
Unique opaque identifier, prefixed
scl_. Treat it as a case-sensitive string.Always
"special_closing".The parent location (
loc_…) this closing applies to.ISO 8601 UTC instant at which the closure begins.
ISO 8601 UTC instant at which the closure ends.
A human-readable explanation for the closure (for example
"Public holiday"). May be null.ISO 8601 UTC creation timestamp.
ISO 8601 UTC last-update timestamp.
Time zones
starts_at and ends_at are absolute UTC instants — the trailing Z is part of the contract. They are not wall-clock times. To present a closing to a restaurant operator, convert each instant into the location’s timezone (an IANA identifier such as Europe/Zurich, available on the location object).
The example below converts a local wall-clock window in Europe/Zurich into the UTC instants the API expects.
List special closings
Returns a paginated list of the closings for a location, ordered bycreated_at.
Endpoint
Query parameters
Number of results per page, between
1 and 100.Cursor for the next page — the
id of the last object in the previous page. Mutually exclusive with ending_before.Cursor for the previous page — the
id of the first object in the current page. Mutually exclusive with starting_after.Return closings created after this ISO 8601 timestamp.
Return closings created before this ISO 8601 timestamp.
Return closings updated after this ISO 8601 timestamp.
Return closings updated before this ISO 8601 timestamp.
Response
Create a special closing
Creates a closing under a location. This is a resource-creatingPOST, so an Idempotency-Key header is required.
Endpoint
Body parameters
ISO 8601 UTC instant at which the closure begins.
ISO 8601 UTC instant at which the closure ends.
Optional human-readable explanation for the closure. Omit or send
null to leave it unset.Response
Replaying the same
Idempotency-Key with the same body returns the original closing, with the header Idempotent-Replayed: true. Reusing the key with a different body returns 409 idempotency_error, and a concurrent in-flight duplicate returns 409 conflict_error. Keys are retained for 24 hours. See Idempotency.Retrieve a special closing
Fetches a single closing by id.Endpoint
Response
404 not_found_error.
Update a special closing
Updates one or more fields on a closing. Only the fields you send are changed; omitted fields keep their current value.Endpoint
Body parameters
New start instant, ISO 8601 UTC.
New end instant, ISO 8601 UTC.
New reason. Send
null to clear an existing reason.Response
Delete a special closing
Permanently removes a closing. The location reverts to its regular opening hours for that window.Endpoint
404 not_found_error.
Errors
Special closing endpoints use the standard error model. The most common cases:| HTTP status | error.type | When |
|---|---|---|
400 | invalid_request_error | A timestamp is missing or not valid ISO 8601, or a parameter is malformed. |
401 | authentication_error | No API key was provided. |
403 | authorization_error | An admin key (ch_admin_…) was used on /v1, or a dashboard session was used. |
404 | not_found_error | The location or closing id does not exist or is not accessible to your key. |
409 | idempotency_error | The Idempotency-Key was reused with a different body. |
409 | conflict_error | A concurrent in-flight request used the same Idempotency-Key. |
429 | rate_limit_error | The per-key rate limit was exceeded; retry after Retry-After. |
Example error
Next steps
Opening hours
Special closings sit on top of a location’s regular weekly delivery and pickup schedule.
Locations
Read a location’s
timezone to render starts_at and ends_at in local wall-clock time.Idempotency
Creating a closing requires an
Idempotency-Key. Learn how safe retries work.