GET /v1/scheduling/resources/:id/occupancy
Night-by-night occupancy of a night resource: how much is used, how much is left and whether the night is blocked.
GET
Night-by-night occupancy of a night resource
Returns one entry per night of the range for a
Also
night resource. Use it to paint a calendar where the customer picks check-in and check-out, disabling the nights with no room.
A night counts every stay that sleeps there and every older resource appointment of that day. A night inside a block the business set on the resource (maintenance, a private event) comes back blocked, with nothing left.
Endpoint
Required scope
scheduling:availability:read
Path params
id: resource id. It must be a night resource.
Query params
from: first night,YYYY-MM-DD. Required.to: the day after the last night (excluded),YYYY-MM-DD. Required. At most 92 nights afterfrom.
Example request
curl
Response
200 OK
used: guests that night in asharedresource (the sum of the party sizes), or1when anexclusiveresource is taken.remaining: what is left: capacity minususedin asharedresource,1or0in anexclusiveone.blocked: the business blocked the resource that night.remainingis0whateverusedsays.
400 Bad Request
STAY_INVALID_RANGE when to is not after from or the range is longer than 92 nights.
404 Not Found
RESOURCE_NOT_FOUND: the resource does not exist or belongs to another company.
401 Unauthorized · 403 Forbidden
Same semantics as the rest of the public API.Authorizations
Query Parameters
Response
200
Night-by-night occupancy of a night resource