{"openapi":"3.1.0","info":{"title":"HutPass public API","version":"1.0.0","summary":"Read-only hut availability for the Alta Via 1 (Dolomites).","description":"HutPass reads each Alta Via 1 hut’s own booking system and reports what it saw: which nights are bookable, when each hut was last read successfully, and when each hut’s booking season was first seen open.\n\nHutPass does not take bookings, hold beds or take payments. To book, send the hiker to the hut’s own booking URL (`bookingUrl` in the trail catalogue).\n\n**Authentication:** none for `/api/v1`: every endpoint there is public, read-only and needs no key or account. The `/api/agent/v1` endpoints act for one person and take a personal access token (`Authorization: Bearer hp_pat_…`) that the person creates on their HutPass account page; each operation names the scope it needs. See `/auth.md`.\n\n**Errors:** every error is JSON, `{\"error\": {\"code\": \"...\", \"message\": \"...\"}}`. Act on `code`; `message` is English debugging text and may change.\n\n**Rate limits:** about 120 requests per minute per client. A 429 carries `Retry-After`. Responses are cached for minutes, so prefer few, wide requests over many narrow ones.\n\n**Versioning:** the version is in the path (`/api/v1`). Within v1, fields and endpoints may be added at any time, so ignore fields you do not know. A breaking change gets a new path version.\n\n**Guides:** https://hutpass.com/developers (human) and https://hutpass.com/agents.md (agents).","contact":{"name":"HutPass","url":"https://hutpass.com/contact"},"termsOfService":"https://hutpass.com/privacy"},"externalDocs":{"description":"Developer guide","url":"https://hutpass.com/developers"},"servers":[{"url":"https://hutpass.com","description":"Production"}],"security":[],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A personal access token, `hp_pat_` followed by 43 letters and digits. A person creates it on their HutPass account page, choosing its scopes: `alerts:read`, `alerts:write`, `hikes:read`."}}},"tags":[{"name":"Catalogue","description":"Trails, stages and named locations."},{"name":"Huts","description":"Hut booking profiles and booking seasons."},{"name":"Availability","description":"Night-by-night availability for every hut."},{"name":"Health","description":"How fresh each hut’s data is."},{"name":"Alerts","description":"A person’s availability alerts, with a personal access token."},{"name":"Hikes","description":"A person’s saved hikes, read-only, with a personal access token."}],"paths":{"/api/v1/trails":{"get":{"operationId":"listTrails","summary":"List trails","description":"Every trail HutPass covers. Today this is the Alta Via 1 in the Dolomites. Each trail carries its season bounds (`seasonStart`, `seasonEnd`), which make a good availability window.","tags":["Catalogue"],"parameters":[],"responses":{"200":{"description":"All trails.","headers":{"Cache-Control":{"description":"How long this response may be cached. Identical requests are served from cache.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"ref":{"type":"string","minLength":1},"distanceM":{"type":"number","exclusiveMinimum":0},"sourceUrl":{"type":"string","format":"uri"},"license":{"type":"string","minLength":1},"retrievedAt":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"starterTemplateVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"seasonStart":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"seasonEnd":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"required":["id","slug","ref","distanceM","sourceUrl","license","retrievedAt","starterTemplateVersion","seasonStart","seasonEnd"],"additionalProperties":false}}}}},"429":{"description":"Too many requests from this client. Wait for `Retry-After` seconds, then retry.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}}}},"servers":[{"url":"https://api.hutpass.com","description":"Public API"}]},"/api/v1/trails/{trailSlug}":{"get":{"operationId":"getTrail","summary":"Get one trail","description":"One trail by slug, with its season bounds.","tags":["Catalogue"],"parameters":[{"name":"trailSlug","in":"path","required":true,"description":"Trail slug, for example `alta-via-1`.","schema":{"type":"string","minLength":1},"example":"alta-via-1"}],"responses":{"200":{"description":"The trail.","headers":{"Cache-Control":{"description":"How long this response may be cached. Identical requests are served from cache.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"ref":{"type":"string","minLength":1},"distanceM":{"type":"number","exclusiveMinimum":0},"sourceUrl":{"type":"string","format":"uri"},"license":{"type":"string","minLength":1},"retrievedAt":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"starterTemplateVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"seasonStart":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"seasonEnd":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"required":["id","slug","ref","distanceM","sourceUrl","license","retrievedAt","starterTemplateVersion","seasonStart","seasonEnd"],"additionalProperties":false}}}},"404":{"description":"No trail has this slug.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}},"429":{"description":"Too many requests from this client. Wait for `Retry-After` seconds, then retry.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}}}},"servers":[{"url":"https://api.hutpass.com","description":"Public API"}]},"/api/v1/trails/{trailSlug}/catalogue":{"get":{"operationId":"getTrailCatalogue","summary":"Get a trail with its huts","description":"The trail, its trailhead, every hut along it in route order (altitude, coordinates, booking URL, whether its booking system reports availability and bed counts), and the conventional stage-by-stage starter itinerary. The best single call for an overview.","tags":["Catalogue"],"parameters":[{"name":"trailSlug","in":"path","required":true,"description":"Trail slug, for example `alta-via-1`.","schema":{"type":"string","minLength":1},"example":"alta-via-1"}],"responses":{"200":{"description":"The trail catalogue.","headers":{"Cache-Control":{"description":"How long this response may be cached. Identical requests are served from cache.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"trail":{"type":"object","properties":{"id":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"ref":{"type":"string","minLength":1},"distanceM":{"type":"number","exclusiveMinimum":0},"sourceUrl":{"type":"string","format":"uri"},"license":{"type":"string","minLength":1},"retrievedAt":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"starterTemplateVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"seasonStart":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"seasonEnd":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"required":["id","slug","ref","distanceM","sourceUrl","license","retrievedAt","starterTemplateVersion","seasonStart","seasonEnd"],"additionalProperties":false},"trailhead":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"coordinates":{"anyOf":[{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["latitude","longitude"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","coordinates"],"additionalProperties":false},"stages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"trailId":{"type":"string","minLength":1},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"startLocationSlug":{"type":"string","minLength":1},"endLocationSlug":{"type":"string","minLength":1},"distanceM":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"durationMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"ascentM":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"descentM":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","trailId","position","startLocationSlug","endLocationSlug","distanceM","durationMinutes","ascentM","descentM"],"additionalProperties":false}},"huts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"coordinates":{"anyOf":[{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["latitude","longitude"],"additionalProperties":false},{"type":"null"}]},"elevationM":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"locality":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"countryCode":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}]},"officialWebsite":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"bookingUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"bookingSystemType":{"type":"string","enum":["cai","planyo","private","unknown"]},"availabilityMode":{"type":"string","enum":["none","binary","count"]},"profileState":{"type":"string","enum":["published","catalogued"]},"monitoringState":{"type":"string","enum":["monitored","unmonitored"]},"profile":{"anyOf":[{"type":"object","properties":{"hutId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"officialWebsite":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"location":{"type":"object","properties":{"latitude":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"null"}]},"altitudeM":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"locality":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"countryCode":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}]}},"required":["latitude","longitude","altitudeM","locality","countryCode"],"additionalProperties":false},"accommodationTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["dormitory","private_room","shared_room","bed","camping_space","whole_unit","unknown"]},"privacy":{"type":"string","enum":["private","shared","not_applicable","unknown"]},"capacity":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","kind","privacy","capacity"],"additionalProperties":false}},"bookingChannels":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["hut_direct","booking_platform","regional_portal","phone","email","other","unknown"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","seasonal","unknown"]}},"required":["kind","url","status"],"additionalProperties":false}},"bookingActions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"external_booking"},"url":{"type":"string","format":"uri"}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"request"},"method":{"type":"string","enum":["web_form","email","phone","unknown"]},"target":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["kind","method","target"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"phone"},"phone":{"type":"string","minLength":1}},"required":["kind","phone"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"email"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["kind","email"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"}},"required":["kind"],"additionalProperties":false}]}},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["photo","video","floor_plan","map","other"]},"url":{"type":"string","format":"uri"},"attribution":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"attributionSourceUrl":{"type":"string","format":"uri"},"licenseUrl":{"type":"string","format":"uri"},"changeNote":{"type":"string","minLength":1}},"required":["id","kind","url","attribution"],"additionalProperties":false}},"mediaStatus":{"type":"string","enum":["published","not_published","delivery_unconfigured"]},"sourceMeta":{"type":"object","properties":{"adapterId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"lastObservedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"sourceHealth":{"type":"string","enum":["fresh","stale","never","unsupported"]}},"required":["adapterId","lastObservedAt","sourceHealth"],"additionalProperties":false}},"required":["hutId","name","officialWebsite","location","accommodationTypes","bookingChannels","bookingActions","media","sourceMeta"],"additionalProperties":false},{"type":"null"}]},"trailOptions":{"type":"array","items":{"type":"object","properties":{"stageId":{"type":"string","minLength":1},"stagePosition":{"type":"integer","minimum":0,"maximum":9007199254740991},"role":{"type":"string","enum":["primary","alternate"]},"optionPosition":{"type":"integer","minimum":0,"maximum":9007199254740991},"starterTemplateVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"starterPosition":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["stageId","stagePosition","role","optionPosition","starterTemplateVersion","starterPosition"],"additionalProperties":false}}},"required":["id","name","coordinates","elevationM","locality","countryCode","officialWebsite","bookingUrl","bookingSystemType","availabilityMode","profileState","monitoringState","profile","trailOptions"],"additionalProperties":false}},"starterTemplate":{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"days":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"stageId":{"type":"string","minLength":1},"startLocationSlug":{"type":"string","minLength":1},"endLocationSlug":{"type":"string","minLength":1},"hutId":{"type":"string","minLength":1}},"required":["id","position","stageId","startLocationSlug","endLocationSlug","hutId"],"additionalProperties":false}}},"required":["id","version","days"],"additionalProperties":false}},"required":["trail","trailhead","stages","huts","starterTemplate"],"additionalProperties":false}}}},"404":{"description":"No trail has this slug.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}},"429":{"description":"Too many requests from this client. Wait for `Retry-After` seconds, then retry.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}}}},"servers":[{"url":"https://api.hutpass.com","description":"Public API"}]},"/api/v1/trails/{trailSlug}/stages":{"get":{"operationId":"listTrailStages","summary":"List a trail’s stages","description":"The conventional legs of a trail, in order, with distance, duration, ascent and descent. A hiker may walk two stages in one day or one stage over two.","tags":["Catalogue"],"parameters":[{"name":"trailSlug","in":"path","required":true,"description":"Trail slug, for example `alta-via-1`.","schema":{"type":"string","minLength":1},"example":"alta-via-1"}],"responses":{"200":{"description":"The stages, in order.","headers":{"Cache-Control":{"description":"How long this response may be cached. Identical requests are served from cache.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"trailId":{"type":"string","minLength":1},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"startLocationSlug":{"type":"string","minLength":1},"endLocationSlug":{"type":"string","minLength":1},"distanceM":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"durationMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"ascentM":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"descentM":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","trailId","position","startLocationSlug","endLocationSlug","distanceM","durationMinutes","ascentM","descentM"],"additionalProperties":false}}}}},"404":{"description":"No trail has this slug.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}},"429":{"description":"Too many requests from this client. Wait for `Retry-After` seconds, then retry.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}}}},"servers":[{"url":"https://api.hutpass.com","description":"Public API"}]},"/api/v1/locations":{"get":{"operationId":"listLocations","summary":"List named locations","description":"Named points along the trails: huts, trailheads, passes and others, with coordinates. Filter by `type`.","tags":["Catalogue"],"parameters":[{"name":"type","in":"query","required":false,"description":"Only locations of this kind.","schema":{"type":"string","enum":["hut","trailhead","finish","pass","campground","bus_stop","other"]},"example":"hut"}],"responses":{"200":{"description":"Matching locations.","headers":{"Cache-Control":{"description":"How long this response may be cached. Identical requests are served from cache.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"kind":{"type":"string","enum":["hut","trailhead","finish","pass","campground","bus_stop","other"]},"latitude":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"null"}]},"elevationM":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"hutSlug":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","slug","name","kind","latitude","longitude","elevationM","hutSlug"],"additionalProperties":false}}}}},"400":{"description":"Unknown location type.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}},"429":{"description":"Too many requests from this client. Wait for `Retry-After` seconds, then retry.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}}}},"servers":[{"url":"https://api.hutpass.com","description":"Public API"}]},"/api/v1/locations/{locationSlug}":{"get":{"operationId":"getLocation","summary":"Get one location","description":"One named location by slug.","tags":["Catalogue"],"parameters":[{"name":"locationSlug","in":"path","required":true,"description":"Location slug, for example `lagazuoi`.","schema":{"type":"string","minLength":1},"example":"lagazuoi"}],"responses":{"200":{"description":"The location.","headers":{"Cache-Control":{"description":"How long this response may be cached. Identical requests are served from cache.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"kind":{"type":"string","enum":["hut","trailhead","finish","pass","campground","bus_stop","other"]},"latitude":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"null"}]},"elevationM":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"hutSlug":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","slug","name","kind","latitude","longitude","elevationM","hutSlug"],"additionalProperties":false}}}},"404":{"description":"No location has this slug.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}},"429":{"description":"Too many requests from this client. Wait for `Retry-After` seconds, then retry.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}}}},"servers":[{"url":"https://api.hutpass.com","description":"Public API"}]},"/api/v1/huts":{"get":{"operationId":"listHutProfiles","summary":"List hut profiles","description":"Reviewed booking profiles for monitored huts: booking channels, accommodation types, booking actions and each hut’s source health.","tags":["Huts"],"parameters":[],"responses":{"200":{"description":"All hut profiles.","headers":{"Cache-Control":{"description":"How long this response may be cached. Identical requests are served from cache.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"hutId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"officialWebsite":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"location":{"type":"object","properties":{"latitude":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"null"}]},"altitudeM":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"locality":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"countryCode":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}]}},"required":["latitude","longitude","altitudeM","locality","countryCode"],"additionalProperties":false},"accommodationTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["dormitory","private_room","shared_room","bed","camping_space","whole_unit","unknown"]},"privacy":{"type":"string","enum":["private","shared","not_applicable","unknown"]},"capacity":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","kind","privacy","capacity"],"additionalProperties":false}},"bookingChannels":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["hut_direct","booking_platform","regional_portal","phone","email","other","unknown"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","seasonal","unknown"]}},"required":["kind","url","status"],"additionalProperties":false}},"bookingActions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"external_booking"},"url":{"type":"string","format":"uri"}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"request"},"method":{"type":"string","enum":["web_form","email","phone","unknown"]},"target":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["kind","method","target"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"phone"},"phone":{"type":"string","minLength":1}},"required":["kind","phone"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"email"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["kind","email"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"}},"required":["kind"],"additionalProperties":false}]}},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["photo","video","floor_plan","map","other"]},"url":{"type":"string","format":"uri"},"attribution":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"attributionSourceUrl":{"type":"string","format":"uri"},"licenseUrl":{"type":"string","format":"uri"},"changeNote":{"type":"string","minLength":1}},"required":["id","kind","url","attribution"],"additionalProperties":false}},"mediaStatus":{"type":"string","enum":["published","not_published","delivery_unconfigured"]},"sourceMeta":{"type":"object","properties":{"adapterId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"lastObservedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"sourceHealth":{"type":"string","enum":["fresh","stale","never","unsupported"]}},"required":["adapterId","lastObservedAt","sourceHealth"],"additionalProperties":false}},"required":["hutId","name","officialWebsite","location","accommodationTypes","bookingChannels","bookingActions","media","sourceMeta"],"additionalProperties":false}}}}},"429":{"description":"Too many requests from this client. Wait for `Retry-After` seconds, then retry.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}}}},"servers":[{"url":"https://api.hutpass.com","description":"Public API"}]},"/api/v1/huts/{hutId}":{"get":{"operationId":"getHutProfile","summary":"Get one hut profile","description":"One hut’s reviewed booking profile.","tags":["Huts"],"parameters":[{"name":"hutId","in":"path","required":true,"description":"Hut id, for example `lagazuoi`.","schema":{"type":"string","minLength":1},"example":"lagazuoi"}],"responses":{"200":{"description":"The hut profile.","headers":{"Cache-Control":{"description":"How long this response may be cached. Identical requests are served from cache.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"hutId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"officialWebsite":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"location":{"type":"object","properties":{"latitude":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"null"}]},"altitudeM":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"locality":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"countryCode":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}]}},"required":["latitude","longitude","altitudeM","locality","countryCode"],"additionalProperties":false},"accommodationTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["dormitory","private_room","shared_room","bed","camping_space","whole_unit","unknown"]},"privacy":{"type":"string","enum":["private","shared","not_applicable","unknown"]},"capacity":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","kind","privacy","capacity"],"additionalProperties":false}},"bookingChannels":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["hut_direct","booking_platform","regional_portal","phone","email","other","unknown"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","seasonal","unknown"]}},"required":["kind","url","status"],"additionalProperties":false}},"bookingActions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"external_booking"},"url":{"type":"string","format":"uri"}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"request"},"method":{"type":"string","enum":["web_form","email","phone","unknown"]},"target":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["kind","method","target"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"phone"},"phone":{"type":"string","minLength":1}},"required":["kind","phone"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"email"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["kind","email"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"}},"required":["kind"],"additionalProperties":false}]}},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["photo","video","floor_plan","map","other"]},"url":{"type":"string","format":"uri"},"attribution":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"attributionSourceUrl":{"type":"string","format":"uri"},"licenseUrl":{"type":"string","format":"uri"},"changeNote":{"type":"string","minLength":1}},"required":["id","kind","url","attribution"],"additionalProperties":false}},"mediaStatus":{"type":"string","enum":["published","not_published","delivery_unconfigured"]},"sourceMeta":{"type":"object","properties":{"adapterId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"lastObservedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"sourceHealth":{"type":"string","enum":["fresh","stale","never","unsupported"]}},"required":["adapterId","lastObservedAt","sourceHealth"],"additionalProperties":false}},"required":["hutId","name","officialWebsite","location","accommodationTypes","bookingChannels","bookingActions","media","sourceMeta"],"additionalProperties":false}}}},"404":{"description":"No profile exists for this hut.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}},"429":{"description":"Too many requests from this client. Wait for `Retry-After` seconds, then retry.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}}}},"servers":[{"url":"https://api.hutpass.com","description":"Public API"}]},"/api/v1/huts/{hutId}/booking-seasons":{"get":{"operationId":"getHutBookingSeasons","summary":"Get a hut’s booking seasons","description":"Seasons in which HutPass has seen at least one bookable night at this hut. A season is listed once and stays listed. A season missing from the list means no bookable night has been seen yet, never that the hut is closed. When `monitored` is false, an empty list says nothing.","tags":["Huts"],"parameters":[{"name":"hutId","in":"path","required":true,"description":"Hut id, for example `lagazuoi`.","schema":{"type":"string","minLength":1},"example":"lagazuoi"}],"responses":{"200":{"description":"The seasons seen open.","headers":{"Cache-Control":{"description":"How long this response may be cached. Identical requests are served from cache.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"hutSlug":{"type":"string","minLength":1},"monitored":{"type":"boolean"},"seasons":{"type":"array","items":{"type":"object","properties":{"year":{"type":"integer","minimum":2000,"maximum":2100},"kind":{"type":"string","enum":["summer","winter"]},"openedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"firstBookableNight":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["year","kind","openedAt","firstBookableNight"],"additionalProperties":false}}},"required":["hutSlug","monitored","seasons"],"additionalProperties":false}}}},"404":{"description":"No hut has this id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}},"429":{"description":"Too many requests from this client. Wait for `Retry-After` seconds, then retry.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}}}},"servers":[{"url":"https://api.hutpass.com","description":"Public API"}]},"/api/v1/availability":{"get":{"operationId":"getAvailability","summary":"Get availability for every hut","description":"Availability at every monitored hut for arrivals between `arrivalStart` and `arrivalEnd` (inclusive), for one party.\n\nUse `view=nights` for one status per hut per night; it is about a hundredth of the size of `view=full`.\n\nRead each hut’s own `health`: `fresh` means the last check succeeded recently; `stale` means the hut’s booking system could not be read recently and the data shown is the last successful observation; `never` means it has never been read; `unsupported` means it publishes no machine-readable calendar.\n\nNight statuses: `open` (bookable), `request_only` (by request), `booked_out` (seen bookable before, not bookable now: sold out or closed), `not_open_yet` (never seen bookable: bookings may not have opened; never report this as full), `no_data` (no answer).\n\nMany huts publish no bed count, so `open` can mean one free bed rather than beds for the whole party.\n\nThe window may span at most 200 days. Prefer one request per trail season (the trail’s `seasonStart`–`seasonEnd`): identical requests are served from cache.\n\nUnknown query parameters are ignored.","tags":["Availability"],"parameters":[{"name":"arrivalStart","in":"query","required":true,"description":"First arrival date, YYYY-MM-DD.","schema":{"type":"string","format":"date"},"example":"2027-07-01"},{"name":"arrivalEnd","in":"query","required":true,"description":"Last arrival date, YYYY-MM-DD, on or after `arrivalStart`.","schema":{"type":"string","format":"date"},"example":"2027-07-31"},{"name":"nights","in":"query","required":false,"description":"Length of stay per arrival, in nights.","schema":{"type":"integer","minimum":1,"default":1},"example":1},{"name":"adults","in":"query","required":false,"description":"Adults in the party.","schema":{"type":"integer","minimum":1,"default":2},"example":2},{"name":"childAges","in":"query","required":false,"description":"Ages (0–17) of children in the party, comma-separated, for example `5,8`.","schema":{"type":"string","pattern":"^\\d{1,2}(,\\d{1,2})*$"},"example":"5,8"},{"name":"pets","in":"query","required":false,"description":"Number of pets.","schema":{"type":"integer","minimum":0,"default":0},"example":0},{"name":"view","in":"query","required":false,"description":"`nights`: one status per hut per night (compact). `full`: every room option with prices and restrictions.","schema":{"type":"string","enum":["full","nights"],"default":"full"},"example":"nights"}],"responses":{"200":{"description":"Availability for every hut. `data` holds full hut views, or night views with `view=nights`.","headers":{"Cache-Control":{"description":"How long this response may be cached. Identical requests are served from cache.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["ok","partial","no_data","stale","source_error"]},"data":{"type":"array","items":{"type":"object","properties":{"hutId":{"type":"string","minLength":1},"options":{"type":"array","items":{"type":"object","properties":{"arrival":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"departure":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"scope":{"oneOf":[{"type":"object","properties":{"level":{"type":"string","const":"hut"},"hutId":{"type":"string","minLength":1}},"required":["level","hutId"],"additionalProperties":false},{"type":"object","properties":{"level":{"type":"string","const":"accommodation"},"accommodationId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["level","accommodationId"],"additionalProperties":false}]},"state":{"type":"string","enum":["available","unavailable","request_only","unknown"]},"reason":{"type":"string","enum":["inventory_available","sold_out","closed","outside_sales_window","restriction","party_not_supported","request_required","source_returned_no_detail","source_error","ambiguous","unknown"]},"inventory":{"type":"object","properties":{"unit":{"type":"string","enum":["bed","room","space","whole_unit","unknown"]},"count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"exactness":{"type":"string","enum":["exact","at_least","at_most","approximate","binary","unknown"]}},"required":["unit","count","exactness"],"additionalProperties":false},"price":{"anyOf":[{"type":"object","properties":{"total":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"amount":{"type":"string","pattern":"^\\d+(?:\\.\\d{1,4})?$"}},"required":["currency","amount"],"additionalProperties":false},"basis":{"type":"string","enum":["stay","night","person_per_stay","person_per_night","unit_per_stay","unit_per_night","unknown"]},"taxes":{"type":"string","enum":["included","excluded","unknown"]},"fees":{"type":"string","enum":["included","excluded","unknown"]}},"required":["total","basis","taxes","fees"],"additionalProperties":false},{"type":"null"}]},"restrictions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"minimum_stay"},"nights":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","nights"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"maximum_stay"},"nights":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","nights"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"closed_to_arrival"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"closed_to_departure"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"party_size"},"minimumGuests":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"maximumGuests":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","minimumGuests","maximumGuests"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"children"},"status":{"type":"string","enum":["allowed","not_allowed","request","unknown"]},"minimumAge":{"anyOf":[{"type":"integer","minimum":0,"maximum":17},{"type":"null"}]}},"required":["kind","status","minimumAge"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"pets"},"status":{"type":"string","enum":["allowed","not_allowed","request","unknown"]}},"required":["kind","status"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"advance_booking"},"minimumDays":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"maximumDays":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","minimumDays","maximumDays"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"}},"required":["kind"],"additionalProperties":false}]}},"bookingActions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"external_booking"},"url":{"type":"string","format":"uri"}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"request"},"method":{"type":"string","enum":["web_form","email","phone","unknown"]},"target":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["kind","method","target"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"phone"},"phone":{"type":"string","minLength":1}},"required":["kind","phone"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"email"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["kind","email"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"}},"required":["kind"],"additionalProperties":false}]}},"observedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["arrival","departure","scope","state","reason","inventory","price","restrictions","bookingActions","observedAt"],"additionalProperties":false}},"summary":{"type":"object","properties":{"nightsConfirmed":{"type":"integer","minimum":0,"maximum":9007199254740991},"nightsNoAnswer":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["nightsConfirmed","nightsNoAnswer"],"additionalProperties":false},"nights":{"type":"array","items":{"type":"object","properties":{"night":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"type":"string","enum":["open","request_only","booked_out","not_open_yet","no_data"]}},"required":["night","status"],"additionalProperties":false}},"coverage":{"type":"object","properties":{"status":{"type":"string","enum":["complete","partial","none"]},"observedArrivalDates":{"type":"array","items":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"missingArrivalDates":{"type":"array","items":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}},"required":["status","observedArrivalDates","missingArrivalDates"],"additionalProperties":false},"health":{"type":"string","enum":["fresh","stale","never","unsupported"]}},"required":["hutId","options","summary","coverage","health"],"additionalProperties":false}},"freshness":{"type":"object","properties":{"observedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"ageHours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["observedAt","ageHours"],"additionalProperties":false}},"required":["status","data","freshness"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["ok","partial","no_data","stale","source_error"]},"data":{"type":"array","items":{"type":"object","properties":{"hutId":{"type":"string","minLength":1},"nights":{"type":"array","items":{"type":"object","properties":{"night":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"type":"string","enum":["open","request_only","booked_out","not_open_yet","no_data"]}},"required":["night","status"],"additionalProperties":false}},"health":{"type":"string","enum":["fresh","stale","never","unsupported"]}},"required":["hutId","nights","health"],"additionalProperties":false}},"freshness":{"type":"object","properties":{"observedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"ageHours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["observedAt","ageHours"],"additionalProperties":false}},"required":["status","data","freshness"],"additionalProperties":false}]}}}},"400":{"description":"A query parameter is missing or invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}},"429":{"description":"Too many requests from this client. Wait for `Retry-After` seconds, then retry.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}}}},"servers":[{"url":"https://api.hutpass.com","description":"Public API"}]},"/api/v1/health":{"get":{"operationId":"getHealth","summary":"Get each hut’s data freshness","description":"When each hut’s booking system was last read successfully, and whether that data is fresh. Freshness is per hut: one hut can be stale while the others are fresh.","tags":["Health"],"parameters":[],"responses":{"200":{"description":"Per-hut freshness.","headers":{"Cache-Control":{"description":"How long this response may be cached. Identical requests are served from cache.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"huts":{"type":"array","items":{"type":"object","properties":{"hutId":{"type":"string","minLength":1},"health":{"type":"string","enum":["fresh","stale","never","unsupported"]},"lastObservedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["hutId","health","lastObservedAt"],"additionalProperties":false}}},"required":["huts"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client. Wait for `Retry-After` seconds, then retry.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}}}},"servers":[{"url":"https://api.hutpass.com","description":"Public API"}]},"/api/agent/v1/availability-alerts":{"get":{"operationId":"listAvailabilityAlerts","summary":"List the person’s availability alerts","description":"Every alert of the token’s owner, active and finished. An alert emails the person once, when a watched night can be booked, and then completes.\n\nNeeds a personal access token with the `alerts:read` scope.","tags":["Alerts"],"security":[{"bearerAuth":["alerts:read"]}],"parameters":[],"responses":{"200":{"description":"The alerts.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"hikeId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"hikeDayId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"locationSlug":{"type":"string","minLength":1},"dateMode":{"type":"string","enum":["range","any"]},"arrival":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"departure":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"adults":{"type":"integer","minimum":1,"maximum":20},"startDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"locale":{"type":"string","enum":["en","it"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["active","completed","cancelled","expired"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","hikeId","hikeDayId","locationSlug","dateMode","arrival","departure","adults","startDate","endDate","locale","revision","status","createdAt"],"additionalProperties":false}}}}},"401":{"description":"No token, or an unknown, revoked or expired one. `WWW-Authenticate` points at the protected resource metadata. Codes: `unauthenticated`.","headers":{"WWW-Authenticate":{"description":"A Bearer challenge naming the protected resource metadata (RFC 9728).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"unauthenticated"}}}}},"403":{"description":"The token does not carry the scope this operation needs. Codes: `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"insufficient_scope"}}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds, then retry. Codes: `rate_limited`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"rate_limited"}}}}}}},"post":{"operationId":"createAvailabilityAlert","summary":"Create an availability alert","description":"Watch one monitored hut for a range of nights (`startDate`..`endDate`, inclusive) or for any date (`dateMode: \"any\"`), or a night of one of the person’s hikes (`hikeDayId`). HutPass emails the person; it never books.\n\nNeeds a personal access token with the `alerts:write` scope.","tags":["Alerts"],"security":[{"bearerAuth":["alerts:write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique value per intended create, such as a UUID. Retrying with the same key and body returns the first result instead of creating again; the same key with a different body is refused (422 `idempotency_key_reused`). A refused create does not use up the key.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[!-~]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"hikeDayId":{"type":"string","minLength":1},"locale":{"type":"string","enum":["en","it"]}},"required":["hikeDayId"],"additionalProperties":false},{"type":"object","properties":{"locationSlug":{"type":"string","minLength":1,"maxLength":100},"dateMode":{"type":"string","const":"any"},"adults":{"type":"integer","minimum":1,"maximum":20},"locale":{"default":"en","type":"string","enum":["en","it"]}},"required":["locationSlug","dateMode","adults","locale"],"additionalProperties":false},{"type":"object","properties":{"locationSlug":{"type":"string","minLength":1,"maxLength":100},"dateMode":{"type":"string","const":"range"},"startDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"endDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"adults":{"type":"integer","minimum":1,"maximum":20},"locale":{"default":"en","type":"string","enum":["en","it"]}},"required":["locationSlug","startDate","endDate","adults","locale"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"A retry with an `Idempotency-Key` already used for this same body: the alert that call created, with `Idempotent-Replayed: true`. Nothing new is created.","headers":{"Idempotent-Replayed":{"description":"`true` when this response replays an earlier call with the same `Idempotency-Key`.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"hikeId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"hikeDayId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"locationSlug":{"type":"string","minLength":1},"dateMode":{"type":"string","enum":["range","any"]},"arrival":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"departure":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"adults":{"type":"integer","minimum":1,"maximum":20},"startDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"locale":{"type":"string","enum":["en","it"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["active","completed","cancelled","expired"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","hikeId","hikeDayId","locationSlug","dateMode","arrival","departure","adults","startDate","endDate","locale","revision","status","createdAt"],"additionalProperties":false}}}},"201":{"description":"The new alert.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"hikeId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"hikeDayId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"locationSlug":{"type":"string","minLength":1},"dateMode":{"type":"string","enum":["range","any"]},"arrival":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"departure":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"adults":{"type":"integer","minimum":1,"maximum":20},"startDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"locale":{"type":"string","enum":["en","it"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["active","completed","cancelled","expired"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","hikeId","hikeDayId","locationSlug","dateMode","arrival","departure","adults","startDate","endDate","locale","revision","status","createdAt"],"additionalProperties":false}}}},"400":{"description":"The body or the `Idempotency-Key` is invalid. Codes: `validation_error`, `invalid_idempotency_key`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"validation_error"}}}}},"401":{"description":"No token, or an unknown, revoked or expired one. `WWW-Authenticate` points at the protected resource metadata. Codes: `unauthenticated`.","headers":{"WWW-Authenticate":{"description":"A Bearer challenge naming the protected resource metadata (RFC 9728).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"unauthenticated"}}}}},"402":{"description":"The person’s plan does not allow this: too many active alerts, or a window longer than the plan allows. Codes: `limit_reached`, `window_too_long`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"limit_reached"}}}}},"403":{"description":"The token does not carry the scope this operation needs. Codes: `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"insufficient_scope"}}}}},"404":{"description":"No such hike night. Codes: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}},"409":{"description":"An identical active alert exists, or the `Idempotency-Key` was used for an alert that has since been deleted. Codes: `duplicate`, `idempotency_key_used`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"duplicate"}}}}},"422":{"description":"HutPass does not monitor this hut, so it cannot alert on it; or the `Idempotency-Key` was already used with a different body. Codes: `monitoring_unavailable`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"monitoring_unavailable"}}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds, then retry. Codes: `rate_limited`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"rate_limited"}}}}}}}},"/api/agent/v1/availability-alerts/{alertId}":{"patch":{"operationId":"updateAvailabilityAlert","summary":"Change an availability alert","description":"Replace an active alert’s hut, dates and party size.\n\nNeeds a personal access token with the `alerts:write` scope.","tags":["Alerts"],"security":[{"bearerAuth":["alerts:write"]}],"parameters":[{"name":"alertId","in":"path","required":true,"description":"An alert id from the alert list.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"locationSlug":{"type":"string","minLength":1,"maxLength":100},"dateMode":{"type":"string","const":"any"},"adults":{"type":"integer","minimum":1,"maximum":20},"locale":{"default":"en","type":"string","enum":["en","it"]}},"required":["locationSlug","dateMode","adults","locale"],"additionalProperties":false},{"type":"object","properties":{"locationSlug":{"type":"string","minLength":1,"maxLength":100},"dateMode":{"type":"string","const":"range"},"startDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"endDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"adults":{"type":"integer","minimum":1,"maximum":20},"locale":{"default":"en","type":"string","enum":["en","it"]}},"required":["locationSlug","startDate","endDate","adults","locale"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"The changed alert.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"hikeId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"hikeDayId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"locationSlug":{"type":"string","minLength":1},"dateMode":{"type":"string","enum":["range","any"]},"arrival":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"departure":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"adults":{"type":"integer","minimum":1,"maximum":20},"startDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"locale":{"type":"string","enum":["en","it"]},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["active","completed","cancelled","expired"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","hikeId","hikeDayId","locationSlug","dateMode","arrival","departure","adults","startDate","endDate","locale","revision","status","createdAt"],"additionalProperties":false}}}},"400":{"description":"The body is invalid. Codes: `validation_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"validation_error"}}}}},"401":{"description":"No token, or an unknown, revoked or expired one. `WWW-Authenticate` points at the protected resource metadata. Codes: `unauthenticated`.","headers":{"WWW-Authenticate":{"description":"A Bearer challenge naming the protected resource metadata (RFC 9728).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"unauthenticated"}}}}},"402":{"description":"The window is longer than the person’s plan allows. Codes: `window_too_long`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"window_too_long"}}}}},"403":{"description":"The token does not carry the scope this operation needs. Codes: `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"insufficient_scope"}}}}},"404":{"description":"No such alert. Codes: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds, then retry. Codes: `rate_limited`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"rate_limited"}}}}}}},"delete":{"operationId":"cancelAvailabilityAlert","summary":"Cancel an availability alert","description":"Stops the alert. It stays in the list with status `cancelled`.\n\nNeeds a personal access token with the `alerts:write` scope.","tags":["Alerts"],"security":[{"bearerAuth":["alerts:write"]}],"parameters":[{"name":"alertId","in":"path","required":true,"description":"An alert id from the alert list.","schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Cancelled."},"401":{"description":"No token, or an unknown, revoked or expired one. `WWW-Authenticate` points at the protected resource metadata. Codes: `unauthenticated`.","headers":{"WWW-Authenticate":{"description":"A Bearer challenge naming the protected resource metadata (RFC 9728).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"unauthenticated"}}}}},"403":{"description":"The token does not carry the scope this operation needs. Codes: `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"insufficient_scope"}}}}},"404":{"description":"No such alert. Codes: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds, then retry. Codes: `rate_limited`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"rate_limited"}}}}}}}},"/api/agent/v1/hikes":{"get":{"operationId":"listHikes","summary":"List the person’s saved hikes","description":"Summaries of the token owner’s saved multi-night plans. Read-only to tokens.\n\nNeeds a personal access token with the `hikes:read` scope.","tags":["Hikes"],"security":[{"bearerAuth":["hikes:read"]}],"parameters":[],"responses":{"200":{"description":"The hikes.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"trailSlug":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"title":{"type":"string","minLength":1,"maxLength":120},"startDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"endDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"dayCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"adults":{"type":"integer","minimum":1,"maximum":20},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","trailSlug","title","startDate","endDate","dayCount","adults","version","updatedAt"],"additionalProperties":false}}}}},"401":{"description":"No token, or an unknown, revoked or expired one. `WWW-Authenticate` points at the protected resource metadata. Codes: `unauthenticated`.","headers":{"WWW-Authenticate":{"description":"A Bearer challenge naming the protected resource metadata (RFC 9728).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"unauthenticated"}}}}},"403":{"description":"The token does not carry the scope this operation needs. Codes: `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"insufficient_scope"}}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds, then retry. Codes: `rate_limited`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"rate_limited"}}}}}}}},"/api/agent/v1/hikes/{hikeId}":{"get":{"operationId":"getHike","summary":"Get one saved hike","description":"One hike with its days, endpoints and accommodation.\n\nNeeds a personal access token with the `hikes:read` scope.","tags":["Hikes"],"security":[{"bearerAuth":["hikes:read"]}],"parameters":[{"name":"hikeId","in":"path","required":true,"description":"A hike id from the hike list.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The hike.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"ownerUserId":{"type":"string","minLength":1},"trailSlug":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"title":{"type":"string","minLength":1,"maxLength":120},"startDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"adults":{"type":"integer","minimum":1,"maximum":20},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"days":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":80},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"start":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"linked"},"locationSlug":{"type":"string","minLength":1}},"required":["mode","locationSlug"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"manual"},"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["mode","latitude","longitude"],"additionalProperties":false}]},"end":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"linked"},"locationSlug":{"type":"string","minLength":1}},"required":["mode","locationSlug"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"manual"},"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["mode","latitude","longitude"],"additionalProperties":false}]},"accommodation":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"hut"},"locationSlug":{"type":"string","minLength":1}},"required":["kind","locationSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["camp","hotel","other"]},"label":{"type":"string","minLength":1}},"required":["kind","label"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"none"}},"required":["kind"],"additionalProperties":false}]},"trailStageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","position","start","end","accommodation"],"additionalProperties":false}}},"required":["id","ownerUserId","trailSlug","title","startDate","adults","version","days"],"additionalProperties":false}}}},"401":{"description":"No token, or an unknown, revoked or expired one. `WWW-Authenticate` points at the protected resource metadata. Codes: `unauthenticated`.","headers":{"WWW-Authenticate":{"description":"A Bearer challenge naming the protected resource metadata (RFC 9728).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"unauthenticated"}}}}},"403":{"description":"The token does not carry the scope this operation needs. Codes: `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"insufficient_scope"}}}}},"404":{"description":"No such hike. Codes: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"not_found"}}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds, then retry. Codes: `rate_limited`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"example":{"error":{"code":"rate_limited"}}}}}}}}}}