What this endpoint does
CM provides a read-only availability endpoint that allows AI agents and partner platforms to check whether a stay is currently available for a given unit and date range. The response is returned as machine-readable JSON and is intended for system checks and AI-assisted accommodation discovery.
What it enables
An external AI agent can verify whether a unit is available for an exact date range before recommending that property to a traveler.
What it does not do
This endpoint does not create reservations, does not create blocks, does not confirm inquiries, and does not expose internal admin workflows.
Why it matters
This gives self-hosted property owners a way to participate in AI-driven travel discovery without giving third-party platforms direct access to the booking engine.
Endpoint
Public read-only endpoint:
GET /public/api/availability.php
Depending on the installation path, the full URL may look like:
https://your-domain.example/app/public/api/availability.php
or
https://your-domain.example/app_plus/public/api/availability.php.
Query parameters
Accommodation unit identifier.
Example:
T1
Arrival date in ISO format.
Example:
2026-08-10
Departure date in ISO format.
Example:
2026-08-16
Response detail level.
Allowed values:
basic or extended
Example request
Example machine-readable availability query:
GET /public/api/availability.php?unit=T1&from=2026-08-10&to=2026-08-16&mode=basic
Example response: available
{
"ok": true,
"unit": "T1",
"from": "2026-08-10",
"to": "2026-08-16",
"nights": 6,
"available": true,
"reason": "available",
"conflict_count": 0
}
Example response: not available
{
"ok": true,
"unit": "T1",
"from": "2026-08-10",
"to": "2026-08-16",
"nights": 6,
"available": false,
"reason": "conflict_found",
"conflict_count": 1
}
Extended response mode
If mode=extended, the endpoint also returns conflict details.
This is useful for diagnostics, partner integrations, or AI systems that need more context.
{
"ok": true,
"unit": "T1",
"from": "2026-08-10",
"to": "2026-08-16",
"nights": 6,
"available": false,
"reason": "conflict_found",
"conflict_count": 1,
"conflicts": [
{
"id": "20260228103635-6a45-T1",
"from": "2026-08-12",
"to": "2026-08-15",
"status": "confirmed",
"lock": "",
"source": "internal",
"platform": "",
"summary": ""
}
],
"meta": {
"mode": "extended",
"query_layer": "occupancy_merged",
"soft_holds_included": false,
"public_read_only": true,
"system_check_only": true
}
}
Design principles
Read-only
No booking operations are possible through this endpoint.
Safe by default
Internal soft-hold reservations are hidden by default.
Machine-readable
Output is designed for AI agents, search tools, and external systems.
Typical AI workflow
- A user asks an AI travel assistant for a place to stay.
- The platform identifies candidate properties.
- For each candidate, the platform queries the availability endpoint.
- Only properties with
available = trueare recommended. - The user is then redirected to the property’s official booking or inquiry page.
User asks: "Find an apartment near Lake Bled from August 10 to August 16." AI platform checks: GET /public/api/availability.php?unit=T1&from=2026-08-10&to=2026-08-16&mode=basic API returns: available = true AI platform recommends the property.
Why this exists
CM Free / CM Plus was built for self-hosted property owners who want full control over their reservations, availability data, and guest communication.
This availability capability makes it possible to participate in AI-driven accommodation discovery without relying on a third-party booking platform as the source of truth.
Integration summary
In practical terms, the contract is simple:
- The external agent sends a query with
unit,from,to, and optionalmode. - CM checks availability using its public query layer.
- CM returns JSON with structured availability information.
- The external agent transforms that response into a natural-language answer for the user.