Hostrail Docs
Discovery + Concepts

How do agents discover this API?

Root-site machine surfaces, Agent Card, OpenAPI, and MCP server metadata — the discovery documents an agent fetches before making any business call.

Metadata JSONDocs Graph

Discovery endpoints

DocumentURLPurpose
Root siteGET https://hostrail.dev/Public landing page, markdown negotiation, and machine-facing links
llms.txtGET https://hostrail.dev/llms.txtShort machine-readable index for retrieval-oriented runtimes
llms-full.txtGET https://hostrail.dev/llms-full.txtExpanded factual hotel, room-plan, and policy context
CapabilitiesGET https://hostrail.dev/capabilities.jsonSupported flows, payment methods, machine surfaces, and limits
CoverageGET https://hostrail.dev/coverage.jsonLive hotel and city rollout status
API catalogGET https://hostrail.dev/.well-known/api-catalogRFC 9727 linkset for API discovery
ACP discoveryGET https://hostrail.dev/.well-known/acp.jsonAgentic Commerce Protocol capability map for the current platform
OpenID configurationGET https://hostrail.dev/.well-known/openid-configurationOIDC-style auth discovery
OAuth authorization serverGET https://hostrail.dev/.well-known/oauth-authorization-serverRFC 8414 auth metadata
OAuth protected resourceGET https://hostrail.dev/.well-known/oauth-protected-resourceRFC 9728 resource metadata
Agent CardGET https://api.hostrail.dev/.well-known/agent-card.jsonCapabilities, flows, auth, and contracts
A2A Agent CardGET https://api.hostrail.dev/.well-known/agent.jsonGemini and A2A discovery
AI Plugin manifestGET https://api.hostrail.dev/.well-known/ai-plugin.jsonChatGPT-style plugin/app import
Error CatalogGET https://api.hostrail.dev/.well-known/errorsAll error codes with remediation and next_actions
Delegation IssuersGET https://api.hostrail.dev/.well-known/delegation-issuersTrusted JWT issuers for traveler delegation
OpenAPI SpecGET https://api.hostrail.dev/openapi.jsonFull request/response schemas (OpenAPI 3.1)
MCP Server CardGET https://hostrail.dev/.well-known/mcp/server-card.jsonTransport metadata for https://mcp.hostrail.dev/mcp

Recommended cold-start sequence:

  1. GET https://hostrail.dev/llms.txt or GET https://hostrail.dev/capabilities.json → discover public machine surfaces
  2. GET https://hostrail.dev/.well-known/api-catalog or GET https://hostrail.dev/.well-known/acp.json → understand standards-oriented discovery metadata
  3. GET https://api.hostrail.dev/.well-known/agent-card.json → understand exact capabilities and contracts
  4. GET https://api.hostrail.dev/.well-known/errors → build error lookup table
  5. GET https://api.hostrail.dev/openapi.json → learn exact request/response schemas
  6. If the runtime wants standards-based auth, fetch root-site OAuth metadata before the first protected call

Which discovery surface should I start from?

Runtime styleBest first documentWhy
Retrieval-first assistanthttps://hostrail.dev/llms.txtSmall, cheap machine index
Long-context plannerhttps://hostrail.dev/llms-full.txtRicher factual grounding
Capability-aware agenthttps://hostrail.dev/capabilities.jsonExplicit supported flows and limitations
Standards-oriented agenthttps://hostrail.dev/.well-known/api-catalogWell-known linkset and auth metadata
Tool-calling runtimehttps://api.hostrail.dev/.well-known/agent-card.jsonExact operation and auth contract
SDK / backend integrationhttps://api.hostrail.dev/openapi.jsonTyped request and response schemas

ACP discovery

/.well-known/acp.json is a truthful summary of what the platform already supports today:

  • catalog
  • pricing
  • reservation
  • booking

It is intentionally narrower than a full ACP-native checkout stack. Use it as a high-level capability map, then switch to the Agent Card and OpenAPI for exact route-level integration detail.

Agent Card

The Agent Card lists every operation, canonical flows, and auth schemes:

Capabilities

Each capability declares method, href, idempotent, and next_rel (what to do next):

{
  "capabilities": [
    {
      "id": "search_availability",
      "method": "POST",
      "href": "/v1/search",
      "idempotent": false,
      "next_rel": "quote"
    }
  ]
}

Canonical flows

FlowStepsWhen to use
book_a_roomsearch → quote → hold → bookGolden path
rebook_after_hold_expiryquote → hold → bookRecovery from hold_expired (410)
cancel_with_refundget_booking → cancelGuest cancellation
abandon_and_retryrelease_hold → quote → hold → bookAgent changes selection mid-flow
prove_what_happenedget_booking → get_auditReconstruct booking timeline

Auth schemes

HeaderRequiredPurpose
X-Tenant-IdAPI laneIdentifies the hotel tenant
Authorization: Bearer <key>Protected callsAgent credential or OAuth bearer
X-Delegated-User: <jwt>Booking/cancelTraveler consent JWT

OAuth-aware runtimes can discover the issuer and resource metadata from the root site, then mint client_credentials access tokens from https://api.hostrail.dev/oauth/token.

Pagination

The Agent Card declares the platform's pagination strategy under pagination:

{
  "pagination": {
    "strategy": "complete",
    "description": "All list endpoints return the complete result set in a single response..."
  }
}
ValueMeaning
completeList endpoints return the full result set in one response. No cursor, offset, or page query params are accepted today.
cursorFuture: responses will carry next / prev links. Backward-compatible — agents ignoring the links continue to work on the first page.
offsetReserved. Not in use.

Today's contract: agents do not need to implement pagination. Read pagination.strategy from the Agent Card at startup; if it flips to cursor, follow the next link from the response envelope until absent.

Error catalog endpoint

GET /.well-known/errors returns every error code the API can return. Agents should fetch this once at startup and build a local lookup table keyed on code.

See the full Error Catalog for all 44 codes.

Cache behavior

All discovery documents return Cache-Control: public, max-age=300. Delegation issuers use max-age=60.

On this page