---
title: "HutPass agent guide"
description: "How an AI agent reads Alta Via 1 hut availability from HutPass: endpoints, statuses, limits and errors."
canonical: "https://hutpass.com/agents.md"
---

# HutPass agent guide

HutPass shows bed availability for the Alta Via 1 (Dolomites) huts, read from each hut's own booking system. It is read-only: HutPass takes no bookings, holds no beds and takes no payments.

## When to use HutPass

- The user asks which Alta Via 1 huts have beds on given nights.
- The user is planning a multi-night Alta Via 1 itinerary and needs huts in route order.
- The user wants a hut's booking link, or whether its booking season has opened.
- The user wants to know how fresh the availability data is.

Do not use HutPass for other trails, for campsites or hotels, or to place a booking.

## Base URL and authentication

- Base URL: `https://api.hutpass.com/api/v1`. Every endpoint is a public, read-only GET. Send no key or token (see https://hutpass.com/auth.md).
- OpenAPI 3.1 description: https://hutpass.com/openapi.json
- MCP (Streamable HTTP, read-only, no auth): https://hutpass.com/mcp, tools `list_huts`, `get_availability`, `get_booking_seasons`.
- Acting for one person (their availability alerts, their saved hikes): `https://hutpass.com/api/agent/v1` with a personal access token the person creates and gives you. See https://hutpass.com/auth.md.

## Recipes

1. The huts, in route order, with booking links:

```
curl -sS "https://api.hutpass.com/api/v1/trails/alta-via-1/catalogue"
```

Read `huts[]`: `id`, `name`, `elevationM`, `bookingUrl`, `availabilityMode`, `monitoringState`. The hut `id` is the `hutId` every other endpoint uses.

2. Night-by-night availability, one status per hut per night:

```
curl -sS "https://api.hutpass.com/api/v1/availability?arrivalStart=2027-07-01&arrivalEnd=2027-07-31&adults=2&view=nights"
```

Read `data[]`: `hutId`, `health`, and `nights[]` of `{night, status}`. One request covers every hut. The window (`arrivalEnd` minus `arrivalStart`) may span at most 200 days. Prefer one wide request for the whole trip over one request per night.

`view=nights` carries statuses only. For remaining beds at `count` huts, drop `view=nights`: each `data[].options[]` entry has an `arrival` night and an `inventory` of `{unit, count, exactness}`. `count` is null when the hut gave no number.

3. Whether a hut's booking season has been seen open:

```
curl -sS "https://api.hutpass.com/api/v1/huts/<hutId>/booking-seasons"
```

`seasons[]` lists each season with `openedAt` and `firstBookableNight`. An empty list means "not seen open yet", never "closed".

4. How fresh each hut's data is:

```
curl -sS "https://api.hutpass.com/api/v1/health"
```

## How to read the results

Night `status`:

- `open`: bookable on the hut's own system at the last successful read.
- `request_only`: the hut takes booking requests, not instant bookings.
- `booked_out`: seen bookable before, closed now. A season end or a hut closing its calendar looks the same, so do not call it "full" without that caveat.
- `not_open_yet`: never seen bookable. Say it has not opened, not that it is full.
- `no_data`: no answer for that night. Say so; do not guess.

Hut `availabilityMode` (from the catalogue):

- `count`: the hut publishes remaining beds or rooms.
- `binary`: the hut publishes only whether a night is bookable. `open` means the hut has beds, not that it has beds for the whole party. Do not claim a party fits.
- `none`: the hut publishes no machine-readable calendar. Send the user to `bookingUrl`.

Hut `health`: `fresh`, `stale`, `never` or `unsupported`. A `stale` hut's statuses come from its last successful read; say how old they are and never present them as current.

Response `status` on the availability envelope: `ok`, `partial`, `no_data`, `stale` or `source_error`. It is the worst status across every hut in the response, so one stale hut makes it `stale`. Judge each hut by its own `health`, not by this field. `source_error` means HutPass could not read its own data. Report that; it does not mean "no beds".

## Acting for a person

With a token the person gave you (see https://hutpass.com/auth.md), you can list, create, change and cancel their availability alerts and read their saved hikes, within the scopes they chose. An alert emails them once, when a watched night can be booked; it never books.

1. Check the hut is monitored first: `monitoringState` in the catalogue. Alerts on an unmonitored hut are refused with 422 `monitoring_unavailable`.
2. `POST https://hutpass.com/api/agent/v1/availability-alerts` with `{"locationSlug", "startDate", "endDate", "adults", "locale"}`, or `{"locationSlug", "dateMode": "any", "adults", "locale"}` for "tell me when booking opens".
3. A 402 means the person's plan does not allow it (`limit_reached`, `window_too_long`). Tell them; do not work around it.
4. Send an `Idempotency-Key` (a new UUID per alert you mean to create) so a retry after a timeout returns the same alert instead of making a second one.

## Sending the user to the planner

To show the person their whole trip, link to the planner with their first night and group size:

```
https://hutpass.com/planner?startingDate=2027-07-15&partySize=4
```

`startingDate` is the first night (YYYY-MM-DD) and `partySize` the number of people, 1 to 10. Both are optional; a value that is not a real date, or a group outside 1 to 10, is ignored. The page opens on that date for that group, one night per hut in walking order, with each hut's status for that group, and needs no account. Use `https://hutpass.com/it/planner` for Italian.

## Booking

Send the user to the hut's `bookingUrl` to book. Availability can change between a read and a booking. Never say HutPass booked, reserved or held anything.

## Errors

Every error is JSON: `{"error": {"code": "...", "message": "..."}}`. Act on `code`. `message` is English debugging text; do not show it to users.

- `bad_request`: a parameter is invalid, or the window is longer than 200 days.
- `route_not_found`: the path is not a documented endpoint. Check https://hutpass.com/openapi.json.
- `not_found`: no such hut or trail. Re-read the catalogue.
- `rate_limited`: wait for the `Retry-After` seconds, then retry.

## Limits and caching

- About 120 requests a minute per client on `https://api.hutpass.com/api/v1`, and about 60 for MCP tool calls. A 429 carries `Retry-After`. `https://hutpass.com/api/v1` still answers the same paths, but prefer `https://api.hutpass.com`.
- Successful responses are cached for minutes. Repeating an identical request is cheap; varying it is not.
- Send a `User-Agent` that names your tool.

## Versioning

The version is in the path (`/api/v1`). Within v1, fields and endpoints may be added; ignore fields you do not know. A breaking change gets a new path version.
