> For the complete documentation index, see [llms.txt](https://mobile-calendar.gitbook.io/v1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mobile-calendar.gitbook.io/v1/rest-api/availability.md).

# Availability

Get room availability for date range.

## GET /availability

> Get room availability for date range

```json
{"openapi":"3.0.0","info":{"title":"Public REST API v1 – mobile-calendar.com","version":"1.0.0"},"tags":[{"name":"availability","description":"Get room availability for date range."}],"servers":[{"url":"https://api.mobile-calendar.com/v1/public","description":"Production"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","description":"Pass the token in header: Authorization: Bearer <JWT>","bearerFormat":"JWT","scheme":"bearer"}},"schemas":{"AvailabilityResponse":{"description":"Room availability response for specified date range","required":["data","meta"],"properties":{"data":{"description":"Availability data for all requested rooms or room types","type":"array","items":{"$ref":"#/components/schemas/RoomAvailabilityItem"}},"meta":{"$ref":"#/components/schemas/MetaWithRuid"}},"type":"object"},"RoomAvailabilityItem":{"description":"Availability data for a room or room type","required":["type","roomId","typeId","availability"],"properties":{"type":{"description":"Type of availability item","type":"string","enum":["ROOM","ROOM_TYPE"]},"roomId":{"description":"Room ID (integer for ROOM type) or array of room IDs (for ROOM_TYPE)","oneOf":[{"type":"integer"},{"type":"array","items":{"type":"integer"}}]},"typeId":{"description":"Room type ID (null for ROOM type, integer for ROOM_TYPE)","type":"integer","nullable":true},"availability":{"description":"Daily availability for the requested date range","type":"array","items":{"$ref":"#/components/schemas/AvailabilityDay"}}},"type":"object"},"AvailabilityDay":{"description":"Daily availability for a specific date","required":["date","roomsToSell"],"properties":{"date":{"type":"string","format":"date"},"roomsToSell":{"description":"Number of rooms available for sale on this date","type":"integer"}},"type":"object"},"MetaWithRuid":{"description":"Metadata with request tracking.","required":["ruid"],"properties":{"ruid":{"description":"Request Unique ID","type":"string","format":"uuid"}},"type":"object"},"ApiProblem400":{"description":"Request syntax/format error.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"400 Bad Request","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"}]},"ApiProblemBase":{"description":"RFC 7807 Problem Details (base schema).","required":["type","title","status","detail","instance"],"properties":{"type":{"description":"RFC 7807 base — DO NOT use directly in endpoints.\nIn endpoints reference ApiProblem400/401/403/409/422/429/500.","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"},"ApiProblem401":{"description":"Missing authentication or invalid credentials.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"401 Unauthorized","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"}]},"ApiProblem422":{"description":"Input data validation error.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"422 Unprocessable Entity (validation)","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"description":"Map: field name → error message(s)","type":"object","additionalProperties":{"$ref":"#/components/schemas/ErrorValue"}}},"type":"object"}]},"ErrorValue":{"description":"Single error message or list of messages.","oneOf":[{"description":"Error value in error map can be:\n- single string, or\n- array of strings (multiple messages for one field).","type":"string"},{"type":"array","items":{"type":"string"}}]}}},"paths":{"/availability":{"get":{"tags":["availability"],"summary":"Get room availability for date range","operationId":"getAvailability","parameters":[{"name":"roomId","in":"query","description":"Room ID (integer) or array of room IDs to check availability for. Can be used together with typeId. At least one of roomId or typeId is required.","required":false,"schema":{"oneOf":[{"type":"integer"},{"type":"array","items":{"type":"integer"}}]}},{"name":"typeId","in":"query","description":"Room type ID (integer) or array of room type IDs to check availability for. Can be used together with roomId. At least one of roomId or typeId is required.","required":false,"schema":{"oneOf":[{"type":"integer"},{"type":"array","items":{"type":"integer"}}]}},{"name":"from","in":"query","description":"Start date for availability check (inclusive) - YYYY-MM-DD","required":true,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"End date for availability check (inclusive) - YYYY-MM-DD. Maximum 90 days from 'from' date.","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Room availability data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityResponse"}}}},"400":{"description":"Bad request - invalid date range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem400"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem401"}}}},"422":{"description":"Validation error - date range exceeds 90 days, invalid format, or missing required parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem422"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mobile-calendar.gitbook.io/v1/rest-api/availability.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
