AI Integration

CM Free / CM Plus exposes a safe, machine-readable availability capability for AI agents, conversational search platforms, and partner systems. This page describes how to query availability without exposing internal booking workflows.

Overview Endpoint Examples AI Workflow

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.

The public availability layer is designed to expose a safe external truth. Internal soft-hold reservations are hidden by default.

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

unit
Accommodation unit identifier.
Example: T1
from
Arrival date in ISO format.
Example: 2026-08-10
to
Departure date in ISO format.
Example: 2026-08-16
mode
Response detail level.
Allowed values: basic or extended
The endpoint uses end-exclusive range logic. That means a stay ending on a date does not block a new stay starting on the same date.

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

  1. A user asks an AI travel assistant for a place to stay.
  2. The platform identifies candidate properties.
  3. For each candidate, the platform queries the availability endpoint.
  4. Only properties with available = true are recommended.
  5. 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:

This is the recommended way for AI agents to work with CM: do not scrape HTML, do not interpret visual calendars, and do not guess. Use the availability capability directly.