{"openapi":"3.1.0","info":{"title":"CHRT API","version":"1.8.0","summary":"Nautical chart vector tiles and feature data for developers.","description":"The CHRT HTTP API serves official Electronic Navigational Chart (ENC) data as vector tiles, a served S-52 style, spatial feature queries, and offline bundles.\n\n**Situational awareness only.** CHRT provides official ENC data for situational awareness only. It is NOT for primary navigation and is NOT SOLAS-compliant. Do not use CHRT as a primary means of navigation. Every data-bearing response carries `attribution` and `disclaimer`; the `ahead` and `route` queries additionally carry a `coverage` block and a `notice` — an empty result with `covered: false` means the area is uncharted in CHRT, NOT that it is clear water.\n\n**Hosts.** The canonical REST host is `https://api.chrt.co`, including all `/v1/offline/*` endpoints. Vector tiles and the served style are delivered from `https://tiles.chrt.co` (those two paths carry a path-level `servers` override). `offline.chrt.co` exists as infrastructure but the documented path for offline resources is `api.chrt.co/v1/offline/*`.\n\n**Vocabulary.** This document is the canonical parameter vocabulary. Where the prose docs, the SDK, or the MCP server disagree with it, this spec wins. The `@chrtco/mcp` tools expose the same queries under agent-friendly parameter names; the names here are the wire contract.\n\n**Out of scope.** Anything the `@chrtco/sdk` README marks JavaScript-only (`chrt.style()`, `transformRequest`, `interact.attach`, the atlas, iterators) is not HTTP and is not described here.\n\nDocs: https://chrt.co/docs · LLM reference: https://chrt.co/llms.txt","contact":{"name":"CHRT","url":"https://chrt.co/docs","email":"hello@chrt.co"},"license":{"name":"Proprietary","url":"https://chrt.co/legal"}},"servers":[{"url":"https://api.chrt.co","description":"Production REST host"}],"externalDocs":{"url":"https://chrt.co/docs","description":"CHRT developer docs"},"tags":[{"name":"Meta","description":"Discovery, health, and this spec."},{"name":"Query","description":"Spatial feature queries: point-radius, sector-ahead, and along-route."},{"name":"Features","description":"Charted features in a bounding box."},{"name":"Search","description":"CHRTsearch — the gazetteer over the ENC corpus. Text in, ranked named places out. Its own meter, separate from the feature allowance."},{"name":"POI","description":"CHRTpoi — marine points of interest derived from the ENC corpus itself (v1: marinas, from HRBFAC CATHAF=5). Its own meter, separate from the feature allowance. Every response names its coverage state — 'no POIs here' and 'no coverage here' are different answers."},{"name":"Cells","description":"ENC cell metadata and data currency."},{"name":"Coverage","description":"Which chart sources CHRT serves, and which cells cover a route."},{"name":"Mint","description":"Mint short-lived Bearer tokens for tiles, styles, and offline bundles."},{"name":"Interact","description":"CHRTinteract entitlement check."},{"name":"Tiles","description":"Vector tiles and TileJSON on tiles.chrt.co."},{"name":"Styles","description":"Served S-52 MapLibre style on tiles.chrt.co."},{"name":"Sprites","description":"Public GL sprite sheets on tiles.chrt.co — the artwork every served style's `sprite` declaration points at."},{"name":"Offline","description":"Offline bundle catalogue, download, style, chart-assets pack, and heartbeat."},{"name":"Weather","description":"NOAA-backed marine weather: observed conditions, active warnings, and the NWS zone forecast. U.S. waters only. Requires the `weather:read` scope on your API key — a chart key does not carry it implicitly. **None of these endpoints ever asserts that conditions are safe**, and an empty result never means calm water."}],"security":[{"ApiKeyHeader":[]}],"paths":{"/":{"get":{"operationId":"getRoot","summary":"API discovery index","description":"A self-describing index of endpoints, auth, and links. No authentication. Includes an `openapi` link to this document.","tags":["Meta"],"security":[],"responses":{"200":{"description":"The index.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RootIndex"}}}}}}},"/health":{"get":{"operationId":"getHealth","summary":"Liveness probe","description":"Unauthenticated liveness check.","tags":["Meta"],"security":[],"responses":{"200":{"description":"Alive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/v1/status":{"get":{"operationId":"getStatus","summary":"Service status","description":"Normalised platform status. Never a false green — upstream failures degrade to `unknown`. No authentication.","tags":["Meta"],"security":[],"responses":{"200":{"description":"Current status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}}}}},"/openapi.json":{"get":{"operationId":"getOpenapi","summary":"This OpenAPI document","description":"The machine-readable API contract. No authentication. `/.well-known/openapi.json` redirects here (308).","tags":["Meta"],"security":[],"responses":{"200":{"description":"The OpenAPI 3.1 document.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/query":{"get":{"operationId":"query","summary":"Charted features near a point","description":"Features within a radius of a longitude/latitude point, nearest first. `attribution` and `disclaimer` are always present.","tags":["Query"],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"parameters":[{"name":"point","in":"query","required":true,"schema":{"type":"string"},"description":"\"longitude,latitude\" in WGS 84, e.g. -70.92,42.33.","example":"-70.92,42.33"},{"name":"radius","in":"query","required":false,"schema":{"type":"number","default":500,"minimum":1,"maximum":50000},"description":"Search radius in metres. Clamped to [1, 50000]."},{"name":"layer","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated S-57 layer acronyms, e.g. WRECKS,OBSTRN. Omit for all layers."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"minimum":1,"maximum":500}}],"responses":{"200":{"description":"Nearby features.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryFeatureCollection"}}}},"400":{"description":"Missing or malformed `point`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Unknown /v1/query sub-path — the body names the valid routes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit (60-second window) or monthly quota exceeded. The two are told apart by the headers: a rate-limit block carries X-RateLimit-*, a monthly-quota block carries X-Quota-* and `resets_at` in the body. The per-minute headers are NOT sent on a monthly block.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Reset":{"$ref":"#/components/headers/X-Quota-Reset"},"X-Quota-Window":{"$ref":"#/components/headers/X-Quota-Window"}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RateLimitError"},{"$ref":"#/components/schemas/MonthlyLimitError"}]}}}},"500":{"description":"Server fault; carries request_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryError500"}}}}}}},"/v1/query/ahead":{"get":{"operationId":"queryAhead","summary":"Charted features in a sector ahead of a bearing","description":"\"What's ahead of me?\" — features inside a sector defined by a bearing, arc, and range. Returns facts that sort (distance, bearing, least depth, clearance); it NEVER returns a verdict or severity. `coverage`, `attribution`, `disclaimer`, and `notice` are always present, and an empty result is not an all-clear. The @chrtco/mcp tools expose this query under agent-friendly parameter names; the names here are the wire contract.","tags":["Query"],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"parameters":[{"name":"point","in":"query","required":true,"schema":{"type":"string"},"description":"\"longitude,latitude\".","example":"-70.92,42.33"},{"name":"bearing","in":"query","required":true,"schema":{"type":"number","minimum":0,"maximum":360},"description":"Degrees true — a craft's COG/heading, or a fixed input. Out-of-range values are REJECTED with 400, never silently normalized (a wrapped bearing would return a plausible fan for a direction the vessel is not heading). 360 is accepted as a synonym for 0.","example":90},{"name":"arc","in":"query","required":false,"schema":{"type":"number","default":90,"minimum":0.1,"maximum":360},"description":"Full sector width in degrees, centred on the bearing. Clamped to [0.1, 360]. Note arc=0 falls back to the default 90."},{"name":"range","in":"query","required":false,"schema":{"type":"number","default":5000,"minimum":1,"maximum":50000},"description":"Sector range in metres. Clamped to [1, 50000]."},{"name":"safety_depth","in":"query","required":false,"schema":{"type":"number"},"description":"Metres. When set, feature `depth_clearance_m` is computed against it and features known to be deeper are dropped (unknown depth is always kept)."},{"name":"layer","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated S-57 layers. Defaults to the grounding-hazard set (RAPIDS, OBSTRN, UWTROC, WRECKS, WATTUR, FSHFAC, OILBAR, NEWOBJ, DEPARE, DRGARE, SOUNDG)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"minimum":1,"maximum":500}}],"responses":{"200":{"description":"Features in the sector, with a coverage envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AheadFeatureCollection"}}}},"400":{"description":"Missing/malformed point, bearing, or safety_depth. Out-of-range bearing returns \"bearing must be between 0 and 360 degrees true\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"Server fault (includes a coverage-RPC failure — this endpoint fails rather than degrading). Carries request_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryError500"}}}}}}},"/v1/query/route":{"get":{"operationId":"queryRoute","summary":"Charted features in a corridor along a route","description":"Features within a buffer of a route LineString. `coverage` (without covered_fraction), `attribution`, `disclaimer`, and `notice` are always present.","tags":["Query"],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"parameters":[{"name":"route","in":"query","required":true,"schema":{"type":"string"},"description":"A GeoJSON LineString object, or a bare [[lng,lat],…] array. 2–1000 waypoints; lng ∈ [-180,180], lat ∈ [-90,90]."},{"name":"buffer","in":"query","required":false,"schema":{"type":"number","default":500,"minimum":1,"maximum":50000},"description":"Corridor half-width in metres. Clamped to [1, 50000]."},{"name":"safety_depth","in":"query","required":false,"schema":{"type":"number"},"description":"Metres; drives depth_clearance_m."},{"name":"layer","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated S-57 layers; defaults to the grounding-hazard set."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"minimum":1,"maximum":500}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"minimum":0}}],"responses":{"200":{"description":"Features in the corridor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RouteFeatureCollection"}}}},"400":{"description":"Missing/malformed route or safety_depth.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"Server fault; carries request_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryError500"}}}}}}},"/v1/features":{"get":{"operationId":"getFeatures","summary":"Charted features in a bounding box","description":"Features inside a geographic bounding box, optionally filtered to a layer. Paginated. `attribution` and `disclaimer` are always present.","tags":["Features"],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"parameters":[{"name":"bbox","in":"query","required":true,"schema":{"type":"string"},"description":"\"west,south,east,north\".","example":"-70.95,42.30,-70.90,42.35"},{"name":"layer","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated S-57 layer acronyms."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"minimum":1,"maximum":1000}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"minimum":0}}],"responses":{"200":{"description":"Features in the box.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeaturesResponse"}}}},"400":{"description":"Missing or malformed `bbox`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Rate limit (60-second window) or monthly quota exceeded. The two are told apart by the headers: a rate-limit block carries X-RateLimit-*, a monthly-quota block carries X-Quota-* and `resets_at` in the body. The per-minute headers are NOT sent on a monthly block.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Reset":{"$ref":"#/components/headers/X-Quota-Reset"},"X-Quota-Window":{"$ref":"#/components/headers/X-Quota-Window"}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RateLimitError"},{"$ref":"#/components/schemas/MonthlyLimitError"}]}}}},"500":{"description":"Database error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/search":{"get":{"operationId":"search","summary":"CHRTsearch — find charted places by name","description":"Free text in, a small ranked list of named charted places out. This is the only CHRT endpoint addressed by NAME rather than by space (`/v1/features`, `/v1/query`) or identifier (`/v1/cells`).\n\n**Forward only.** Text to places. The reverse — \"what is the name of the water at this point\" — is `/v1/query`.\n\n**Places, not features.** No geometry beyond a point and a bbox. Follow `lnam` + `cell_id` into `/v1/features` or CHRTinteract for the feature itself.\n\n**Its own meter.** Metered on `search_called`, not `features_called` — search is a typeahead, features is a bulk read. Free 100,000/mo, Dev 250,000, Pro 1,000,000, World 2,000,000. Not gated by tier.\n\n**Ranking (documented, total, deterministic):** match tier (`exact`, `prefix`, `all_words`, `substring`, `fuzzy`) -> `rank` (`primary` before `secondary`) -> distance from `near` -> largest cell scale -> `lnam`. `near` biases ranking and never filters; `bbox` filters.\n\n**Unknown parameters are rejected with 400**, naming the offending parameter — an ignored filter returns a well-formed, plausible, wrong answer.\n\n**Fuzzy is a fallback, not a supplement**: `fuzzy` hits appear only when nothing matched at the four stricter tiers.\n\n**Normalisation** (applied identically to the stored name and to `q`): lowercase, strip diacritics, `&` to `and`, non-alphanumeric to space, then `st`->`saint`, `pt`->`point`, `mt`->`mount`, `hbr`/`harbour`->`harbor`.","tags":["Search"],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":120},"description":"Free text. Multi-word in ANY order — `cutty harbor` finds \"Cuttyhunk Harbor Channel\". Matches names and composed colloquial aliases (`red 16`).","example":"cuttyhunk"},{"name":"near","in":"query","required":false,"schema":{"type":"string"},"description":"`longitude,latitude`. **Ranking bias, not a filter** — \"Newport\" is Rhode Island, Oregon and California, and all three are returned, nearest first. Adds `distance_m` and `bearing_deg` to each hit.","example":"-71.58,41.15"},{"name":"bbox","in":"query","required":false,"schema":{"type":"string"},"description":"`west,south,east,north`. A HARD spatial filter — \"search only the chart I am looking at\".","example":"-71.0,41.4,-70.8,41.6"},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["place","object","all"],"default":"all"},"description":"`place` = the name describes water or ground you can BE IN. `object` = the name describes a THING AT a position. See the published layer table at https://chrt.co/docs/chrtsearch."},{"name":"layer","in":"query","required":false,"schema":{"type":"string"},"description":"S-57 layer acronym. Repeatable, and comma-separated values are accepted. NOTE: named lights are on `LNDMRK`, not `LIGHTS` — only 50 of 48,814 LIGHTS features in the corpus carry a name.","example":"SEAARE,LNDARE"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Clamped to 100 and the clamp is echoed in the envelope."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"minimum":0}}],"responses":{"200":{"description":"Ranked places. An empty `results` array with `total_count: 0` means NO MATCH and is never an error. A `coverage` block with `code: outside_coverage` means the supplied `near`/`bbox` is outside CHRT's coverage — it can appear with or without results, and is a different answer from \"no match\".","headers":{"ETag":{"schema":{"type":"string"},"description":"Weak ETag over the response. Send back as `If-None-Match` for a 304."},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"304":{"description":"Not modified — the `If-None-Match` ETag still matches."},"400":{"description":"Missing, malformed, or UNKNOWN parameter. The body's `parameter` field always names the offending parameter, and an unknown parameter is reported before a missing one — from outside, \"`name` is unsupported\" and \"`name` is fine, you also need something else\" are otherwise indistinguishable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchError"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Rate limit or monthly SEARCH quota exceeded. The search quota is separate from the feature quota; exhausting one does not affect the other.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Reset":{"$ref":"#/components/headers/X-Quota-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/poi":{"get":{"operationId":"listPois","summary":"CHRTpoi — charted marine facilities in a viewport or radius","description":"The charted marine facilities inside a bounding box (viewport mode, primary) or within a radius of a point (near mode). v1 serves one category — `marina` — and the taxonomy grows additively.\n\n**The data is the chart's own.** POIs are derived from the ENC corpus itself: S-57 `HRBFAC` features whose `CATHAF` includes 5 (marina / yacht harbour), issued by the hydrographic offices whose cells CHRT serves (NOAA ENC, USACE IENC today). Not OpenStreetMap, not a commercial set — the `dataset` block in every response states this provenance, and `attribution` names the issuing offices for your licensed sources. Relay both.\n\n**Every response names its coverage state** — this is the load-bearing field. `coverage.state` is always present: `covered` (the whole box is charted water/ground: an empty list is a real \"no marinas charted\"), `partial` (results speak only for the charted part), or `none` (CHRT cannot answer here — absence of POIs means NOTHING about the area). If the state cannot be verified the request fails with 503 `coverage_indeterminate` rather than returning an unqualified empty list. Do not conflate these answers.\n\n**De-duplication is server-side.** One row per real-world facility, not one per chart cell (the same marina is charted at several usage bands). `id` is the LNAM of the largest-scale charted instance — stable while that feature survives in its cell; follow it with `cell_id` into `/v1/features` for the full feature. Do not de-duplicate by LNAM yourself.\n\n**`name` can be null** — about 6% of charted marinas carry no OBJNAM. The facility is real and charted; the chart simply does not name it.\n\n**Plans and metering.** Available on EVERY plan — no tier gate. Its own meter (`poi_called`), separate from the feature and search allowances: Free 25,000/mo, Dev 100,000, Pro 500,000, World 1,000,000, Enterprise unlimited.\n\n**Unknown parameters are rejected with 400**, naming the offending parameter; an unknown `category` 400 lists the valid categories.\n\n**Ordering:** near mode by distance; bbox mode by name (unnamed last), `id` tiebreak — deterministic, so paging never shuffles.","tags":["POI"],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"parameters":[{"name":"bbox","in":"query","required":false,"schema":{"type":"string"},"description":"`west,south,east,north`. Viewport mode — the primary addressing mode. Exactly one of `bbox` or `near` must be given. A box crossing the antimeridian must be sent as two boxes.","example":"-70.7,41.4,-70.5,41.6"},{"name":"near","in":"query","required":false,"schema":{"type":"string"},"description":"`longitude,latitude`. Radius mode — \"marinas near me\". Adds `distance_m` to each POI and orders by it.","example":"-71.03,42.35"},{"name":"radius_m","in":"query","required":false,"schema":{"type":"number","default":10000,"maximum":100000,"exclusiveMinimum":0},"description":"Near-mode radius in metres. Clamped to 100,000. Rejected (400) when sent without `near` — it must never silently do nothing."},{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["marina","all"],"default":"all"},"description":"POI category. v1 serves `marina`; omitted or `all` means every category, so new categories appear to existing callers without a contract change. An unknown value is a 400 carrying the valid list."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"minimum":1,"maximum":500},"description":"Clamped to 500 and the clamp is echoed in the envelope."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"minimum":0}}],"responses":{"200":{"description":"POIs plus the coverage state for the queried area. Read `coverage.state` before interpreting an empty `pois` array: `covered` + empty = no facilities charted; `none` = CHRT cannot answer here, which says nothing about the area.","headers":{"ETag":{"schema":{"type":"string"},"description":"Weak ETag over the response. Send back as `If-None-Match` for a 304."},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PoiResponse"}}}},"304":{"description":"Not modified — the `If-None-Match` ETag still matches."},"400":{"description":"Missing, malformed, or UNKNOWN parameter. The body's `parameter` field always names the offending parameter; an unknown parameter is reported before a missing one, and an unknown `category` lists the valid categories.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchError"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Rate limit or monthly POI quota exceeded. The POI quota (`poi_called`) is separate from the feature and search quotas; exhausting one does not affect the others.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Reset":{"$ref":"#/components/headers/X-Quota-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`coverage_indeterminate` — the coverage state for the area could not be verified, so an answer could conflate \"no facilities charted\" with \"no data\". Retry; never treat this as an empty result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cells":{"get":{"operationId":"listCells","summary":"List ENC cells","description":"List cells filtered by source, status, scale band, or bounding box. Filter values are exact: `scale_band` is a case-SENSITIVE word (e.g. Harbor); `status` is case-insensitive; `chart_source` (alias `source`) is the source id like NOAA_ENC, not the agency. A wrong filter value returns an empty 200, not a 400.","tags":["Cells"],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"parameters":[{"name":"scale_band","in":"query","required":false,"schema":{"type":"string"},"description":"Exact, case-sensitive word, e.g. Harbor."},{"name":"chart_source","in":"query","required":false,"schema":{"type":"string"},"description":"Source id, e.g. NOAA_ENC."},{"name":"source","in":"query","required":false,"schema":{"type":"string"},"description":"Alias of chart_source (chart_source wins if both are set)."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Case-insensitive."},{"name":"bbox","in":"query","required":false,"schema":{"type":"string"},"description":"\"west,south,east,north\" overlap filter; cells with a null bbox never match."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"minimum":1,"maximum":1000}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"minimum":0}}],"responses":{"200":{"description":"Matching cells.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CellsList"}}}},"400":{"description":"Malformed `bbox`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"Database error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cells/{cell_id}":{"get":{"operationId":"getCell","summary":"ENC cell metadata & data currency","description":"One cell's metadata, including edition, update_number, and issue_date. Returns 404 both for a genuinely unknown cell and for a cell outside the key's licensed sources.","tags":["Cells"],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"parameters":[{"name":"cell_id","in":"path","required":true,"schema":{"type":"string"},"description":"ENC cell id, e.g. US5MA11M.","example":"US5MA11M"}],"responses":{"200":{"description":"Cell metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WireCell"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Cell not found (or outside licensed sources).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"Database error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/coverage":{"get":{"operationId":"getCoverage","summary":"Chart sources & issuing offices","description":"Which chart sources CHRT serves, their issuing hydrographic offices, and per-band cell counts. Use it to check whether an area is covered before querying.","tags":["Coverage"],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"parameters":[{"name":"country","in":"query","required":false,"schema":{"type":"string","minLength":2,"maxLength":2},"description":"ISO 3166-1 alpha-2, e.g. US."},{"name":"source","in":"query","required":false,"schema":{"type":"string"},"description":"Source id filter, alias chart_source. Exact and case-sensitive, e.g. NOAA_ENC. An id this key has no coverage from is 400 `unknown_source`, with `valid_sources` listing the ids it may use."}],"responses":{"200":{"description":"Coverage summary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverageSummary"}}}},"400":{"description":"Malformed `country` (`bad_request`), or a `source` this key has no coverage from (`unknown_source`, with `valid_sources` and a `hint`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"Database error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/coverage/route":{"get":{"operationId":"getCoverageRoute","summary":"ENC cells covering a route","description":"Which ENC cells CHRT holds for a passage corridor — answers \"what must I download?\". Returns cells (not features). `attribution`, `disclaimer`, and `notice` are always present; an empty result means no cell covers the route, NOT that the passage is clear.","tags":["Coverage"],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"parameters":[{"name":"route","in":"query","required":true,"schema":{"type":"string"},"description":"GeoJSON LineString or [[lng,lat],…]; 2–1000 waypoints."},{"name":"buffer","in":"query","required":false,"schema":{"type":"number","default":1000,"minimum":1,"maximum":50000},"description":"Corridor half-width in metres."},{"name":"scale_band","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"minimum":1,"maximum":500}}],"responses":{"200":{"description":"Cells covering the route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverageRouteResponse"}}}},"400":{"description":"Missing or malformed `route`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"Database error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/mint/tile-token":{"post":{"operationId":"mintTileToken","summary":"Mint a tile/style Bearer token","description":"Exchange an API key for a short-lived ES256 JWT used as `Authorization: Bearer` on the tiles and style endpoints. A shipped client's own backend should hold the API key and mint tokens for the client.","tags":["Mint"],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"parameters":[{"name":"ttl","in":"query","required":false,"schema":{"type":"integer","default":300,"maximum":900},"description":"Token lifetime in seconds. Values above 900 are clamped to 900."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"region":{"type":"string","description":"Defaults to the key's single licensed source, else NOAA_ENC."}}}}}},"responses":{"200":{"description":"A tile token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TileTokenResponse"}}}},"400":{"description":"Invalid JSON body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Region not licensed for this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Monthly tile quota exceeded. Body is a MonthlyLimitError whose `error` is the typed literal `tile_quota_exceeded` (the SDK switches on it). The quota window is the UTC calendar month — see `resets_at`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonthlyLimitError"}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Reset":{"$ref":"#/components/headers/X-Quota-Reset"},"X-Quota-Window":{"$ref":"#/components/headers/X-Quota-Window"}}},"500":{"description":"Token signing failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"A transient server fault — retry. `tile_builds_unavailable`: the tile build catalogue could not be read, so the mint cannot tell which build to name; this is NOT a missing build (that is the 503). Carries `Retry-After` and a matching `retry_after` in the body. `api_key_validation_failed`: the internal key check could not run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"503":{"description":"`region_not_available`: the build catalogue was read and the region has no servable build. Retrying will not help until a build is promoted. (A catalogue that could not be read is the 502 `tile_builds_unavailable`, never this.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/mint/offline-token":{"post":{"operationId":"mintOfflineToken","summary":"Mint an offline Bearer token","description":"Exchange an API key for a short-lived ES256 JWT used against the offline endpoints. The `regions` in the response are echoed verbatim from the offline catalogue, so the sizes and builds reported here match exactly what GET /v1/offline/regions and the download will serve.\n\n**Chart bundles require the Pro plan or above** and a key with offline enabled.\n\n**Basemap-only mint:** `{\"device_id\":\"…\",\"regions\":[\"CHRT_BASE\"]}` is open to ANY valid API key on any plan (a `pk_` key is enough): no CHRToffline plan, no per-key offline flag, no chart source and no storage budget. The token it returns reaches only CHRT_BASE (plus GET /v1/offline/assets); every chart bundle refuses it with 403 `region_not_licensed`.","tags":["Mint"],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"parameters":[{"name":"ttl","in":"query","required":false,"schema":{"type":"integer","default":300,"maximum":900},"description":"Token lifetime in seconds; clamped to 900."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["device_id"],"properties":{"device_id":{"type":"string","minLength":1,"maxLength":128,"description":"Stable per-install id."},"region":{"type":"string"},"regions":{"type":"array","items":{"type":"string"},"description":"Bundle ids to narrow the token to (`NOAA_ENC`, `us-gulf-of-maine`, `CHRT_LAND`, `CHRT_BASE`, …). A request naming ONLY `CHRT_BASE` is the basemap-only mint (see description). The singular `region` is accepted and ignored — the token then covers every producer the key is licensed for."}}}}}},"responses":{"200":{"description":"An offline token plus the region catalogue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflineTokenResponse"}}}},"400":{"description":"Missing device_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"`offline_requires_pro_plan` / `offline_not_enabled` / `no_allowed_sources` for a chart-bundle mint, or `region_not_licensed` naming a requested id the key is not licensed for. A basemap-only mint (`regions:[\"CHRT_BASE\"]`) is never refused on plan or licence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Offline storage budget exceeded (`offline_budget_exceeded`), or this key is minting faster than 10 per 10 s (`rate_limited`, with `Retry-After` and `X-RateLimit-*`; wait and mint again). Minting never spends the 10-per-10-s window of the `/v1/offline/*` routes.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/OfflineBudgetExceeded"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"500":{"description":"Token signing failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"No offline build for any requested region, or the offline catalogue is unavailable (a fault on CHRT's side; being rate limited is a 429, never this).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/interact/entitlement":{"post":{"operationId":"interactEntitlement","summary":"CHRTinteract entitlement check","description":"Whether the key's team is entitled to CHRTinteract (Dev plan or above). Authenticates with the `x-api-key` header ONLY — no `?key=` fallback on this endpoint.","tags":["Interact"],"security":[{"ApiKeyHeader":[]}],"responses":{"200":{"description":"Entitlement status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Plan does not include interact, or key missing the interact:read scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Key validation unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/offline/regions":{"get":{"operationId":"getOfflineRegions","summary":"Offline region catalogue","description":"The offline bundles available to this token, with canonical sizes, hashes and build tags. `regions[]` is the legacy one-row-per-producer list; `bundles[]` (ADR 0037) lists everything downloadable — producers, areas, CHRTland land bundles and CHRT_BASE, the app-embeddable world basemap — with `kind`, `group`, `area_rev`, `bbox`, `outline`, `formats`, `manifest_available` and `data_class`. Authenticates with an OfflineToken Bearer only (no x-api-key).\n\nOffline rate limit: 10 requests per 10 s per key, one window shared by every `/v1/offline/*` route (minting an offline token does not spend it). Every 200 and 429 carries `X-RateLimit-Limit` / `X-RateLimit-Remaining` / `X-RateLimit-Reset` (so do most errors after the token and entitlement checks); a spent window is 429 `rate_limited` with `Retry-After` (the real wait, at most 10 s), never a 503.","tags":["Offline"],"security":[{"OfflineToken":[]}],"responses":{"200":{"description":"The catalogue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflineRegionsResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Rate limit exceeded: this key's offline window (10 per 10 s) is spent.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}}}}},"/v1/offline/regions/{region}/outline":{"get":{"operationId":"getOfflineRegionOutline","summary":"Coverage outline of a region's offline build","description":"The GeoJSON coverage outline CHRT published with the region's CURRENT offline build — the shape a region picker may draw. Same gates as the bundle: an OfflineToken whose `allowed_sources` includes the region. `404 outline_not_published` when the build has none; there is no fallback shape. The response carries `X-CHRT-Build-Id` and an ETag equal to the document's SHA-256, so a client can refuse an outline for a build other than the one its catalogue named. Also served as `/v1/regions/{region}/outline` on offline.chrt.co.\n\nOffline rate limit: 10 requests per 10 s per key, one window shared by every `/v1/offline/*` route (minting an offline token does not spend it). Every 200 and 429 carries `X-RateLimit-Limit` / `X-RateLimit-Remaining` / `X-RateLimit-Reset` (so do most errors after the token and entitlement checks); a spent window is 429 `rate_limited` with `Retry-After` (the real wait, at most 10 s), never a 503.","tags":["Offline"],"security":[{"OfflineToken":[]}],"parameters":[{"name":"region","in":"path","required":true,"schema":{"type":"string"},"example":"NOAA_ENC"}],"responses":{"200":{"description":"The outline document.","headers":{"X-CHRT-Build-Id":{"schema":{"type":"string"},"description":"The build the outline describes."},"ETag":{"schema":{"type":"string"},"description":"Quoted SHA-256 of the document."},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/geo+json":{"schema":{"$ref":"#/components/schemas/OfflineRegionOutline"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"`region_not_available` (no offline build) or `outline_not_published` (the build carries no outline).","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string","enum":["region_not_available","outline_not_published"]},"region":{"type":"string"},"build_id":{"type":"string"}}}}}},"429":{"description":"Rate limit exceeded: this key's offline window (10 per 10 s) is spent.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}}}}},"/v1/offline/bundles/{region}":{"get":{"operationId":"getOfflineBundle","summary":"Presigned download for a bundle","description":"A presigned URL to download one bundle's artefact, plus its size and SHA-256 for verification. `{region}` is any id from `bundles[]` of GET /v1/offline/regions.\n\n**CHRT_BASE** is the world basemap for offline use: a z0–6 cut holding only public-domain geography: Natural Earth, with the US land borders from the US Census Bureau's TIGER/Line (`base_earth`, `base_water`, `base_boundary`, `country_boundary`; measured ~5.3 MB MBTiles / ~4.2 MB PMTiles). Any offline token may download it, it is exempt from the storage budget, and **you may ship it inside your application binary** with the attribution `© CHRT · Made with Natural Earth` shown wherever the map is shown (not for resale as a standalone dataset). It deliberately carries **no jurisdiction layer** — nothing in it says where CHRT has charts, so a copy compiled into an app never goes stale and never expires. Chart coverage offline comes from each chart bundle's own `M_COVR`. It is rebuilt with each CHRT_BASE build; the content changes only when Natural Earth publishes a new release or `basemap.schema` changes, so compare `build_tag` when online and replace the shipped copy at your own release cadence.\n\nOffline rate limit: 10 requests per 10 s per key, one window shared by every `/v1/offline/*` route (minting an offline token does not spend it). Every 200 and 429 carries `X-RateLimit-Limit` / `X-RateLimit-Remaining` / `X-RateLimit-Reset` (so do most errors after the token and entitlement checks); a spent window is 429 `rate_limited` with `Retry-After` (the real wait, at most 10 s), never a 503.","tags":["Offline"],"security":[{"OfflineToken":[]}],"parameters":[{"name":"region","in":"path","required":true,"schema":{"type":"string"},"example":"NOAA_ENC","description":"A bundle id from `bundles[]`, e.g. `NOAA_ENC`, `us-gulf-of-maine`, `CHRT_BASE`."},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["mbtiles","pmtiles"],"default":"mbtiles"},"description":"Which artefact to presign. `pmtiles` is what a browser reads; 409 `format_unavailable` when that build predates PMTiles in the pointer. Anything else is 400 `bad_format`."}],"responses":{"200":{"description":"A presigned download.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflineBundle"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"400":{"description":"`bad_format`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"`region_not_licensed` (the bundle's source is not on the token) or `bundle_out_of_scope` (the token was minted for other bundles). Never returned for CHRT_BASE.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`unknown_region` — no offline bundle has this id (a typo, or an id this token could never see; GET /v1/offline/regions lists the valid ones). `no_offline_build` — a known id with no published build yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`format_unavailable` — the build exists but not in the requested format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (`rate_limited`, with `Retry-After` and `X-RateLimit-*`), or storage budget exceeded (`offline_budget_exceeded`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RateLimitError"},{"$ref":"#/components/schemas/OfflineBudgetExceeded"}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"503":{"description":"Presigning not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/offline/bundles/{region}/manifest":{"get":{"operationId":"getOfflineBundleManifest","summary":"A bundle's provenance manifest","description":"Chart and area bundles: a presigned URL to the per-cell manifest (every contributing ENC cell with `edition`, `update_number`, `issue_date`, `partial`). CHRT_BASE: served inline — terms, attribution, layer contract, sizes and hashes. Gated like the bundle it describes; not budgeted or metered.\n\nOffline rate limit: 10 requests per 10 s per key, one window shared by every `/v1/offline/*` route (minting an offline token does not spend it). Every 200 and 429 carries `X-RateLimit-Limit` / `X-RateLimit-Remaining` / `X-RateLimit-Reset` (so do most errors after the token and entitlement checks); a spent window is 429 `rate_limited` with `Retry-After` (the real wait, at most 10 s), never a 503.","tags":["Offline"],"security":[{"OfflineToken":[]}],"parameters":[{"name":"region","in":"path","required":true,"schema":{"type":"string"},"example":"CHRT_BASE"}],"responses":{"200":{"description":"The manifest.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflineBundleManifest"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"`region_not_licensed` or `bundle_out_of_scope`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`unknown_region`, `no_offline_build`, or `no_manifest` (a build published before manifests).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded: this key's offline window (10 per 10 s) is spent.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}}}}},"/v1/offline/styles/{region}":{"get":{"operationId":"getOfflineStyle","summary":"Offline MapLibre style for a region","description":"A MapLibre style whose sources point at the offline bundle (mbtiles:// or file://). Its `sprite` and `glyphs` resolve through the same local protocol at {protocol}://assets/... — fetch and unzip the chart-assets pack (GET /v1/offline/assets) beside the bundle to satisfy them. s101 styles declare no sprite. Like the online style, the document names the issuing hydrographic office and carries the non-navigation disclaimer: `style.metadata[\"chrt:attribution\"]` (the chart's credit alone, for the producer the style was generated for — an area bundle's is its producer's), `style.metadata[\"chrt:disclaimer\"]`, the same credit as the chart source's `attribution` (which MapLibre's attribution control shows), and both again as the body's `attribution` and `disclaimer`. Show them wherever the chart is shown. Accepts the same `mode` render-mode parameter as the online style route, so an app's continuous ↔ chart-mode switch keeps working offshore; the response body echoes the resolved `mode` and the style metadata carries `chrt:render-mode`. Likewise `lock`, the online route's band lock: the body echoes `lock` and `lock_min_zoom`, where the client stops zoom-out; and `look`, the online route's decorative looks, drawn on the look's own sprite sheet in the chart-assets pack. The query surface is CLOSED: parameters other than `palette`, `protocol`, `symbols`, `look`, `mode`, `lock`, `base`, `placers` are rejected with 400 `unknown_param` naming the offending and valid parameters — a misspelled knob never silently serves the default document (same decision as the online style route).\n\n**`base=1` — the chart over a local CHRT_BASE bundle.** Adds a `CHRT_BASE` source pointing at `{protocol}://CHRT_BASE.mbtiles` (maxzoom 6, carrying the bundle's `attribution`) and the online style's base layers **in the online order**, minus every layer the bundle does not carry. Layer-order contract, bottom → top:\n\n1. `chrt-background` (S-52 NODTA)\n2. `chrtbase-ocean` — sea colour (geometry-free background)\n3. `chrtbase-earth`, `chrtbase-water`, `chrtbase-boundary` — geography\n4. **your raster goes here** — `map.addLayer(layer, \"chrtbase-nocoverage\")`\n5. `chrtbase-nocoverage` — the no-coverage crosshatch (geometry-free background pattern)\n6. `s52-coverage-ground` — the chart's own ground, painted from the CHART bundle's `M_COVR` (CATCOV=1): where a chart exists, the crosshatch is covered\n7. the chart (every `s52-*` class)\n8. `chrtbase-country-boundary` — land borders, hoisted above the chart; then symbols and labels\n\n**The no-coverage marker works by inversion**: nothing computes \"world minus coverage\". The crosshatch is drawn everywhere and every place a chart exists paints over it, so it is correct for any set of chart bundles on the device, with no mask to download or keep current. The trade-off: a raster placed above `chrtbase-nocoverage` would hide the marker, so place yours at step 4. **Offline, the online style's tan jurisdiction fill, state lines and rough inland water are absent by design** (they change when a chart source goes live, and a bundled copy cannot refresh) — uncharted land and water inside the countries CHRT serves therefore read as no coverage, which is the conservative statement. `base` defaults to off offline (unlike online); the response states what was served in `base`, `base_bundle` and the `X-Style-Base` header. `base=1` with `symbols=s101` is 400 `base_requires_sprite` (the crosshatch is a sprite pattern and s101 has no sprite). Requesting the style of CHRT_BASE itself is 409 `not_a_chart_bundle`.","tags":["Offline"],"security":[{"OfflineToken":[]}],"parameters":[{"name":"region","in":"path","required":true,"schema":{"type":"string"}},{"name":"palette","in":"query","required":false,"schema":{"type":"string","enum":["DAY","DUSK","NIGHT","EINK_COLOR","EINK_MONO","EINK_NIGHT"],"default":"DAY"},"description":"Case-SENSITIVE (uppercase). `EINK_COLOR` / `EINK_MONO` / `EINK_NIGHT` are the e-paper chart variants — the same document the online style route serves for `theme=eink_color` / `theme=eink_mono` / `theme=eink_night` (see that route), with sprite and glyphs pointed at the chart-assets pack."},{"name":"protocol","in":"query","required":false,"schema":{"type":"string","enum":["mbtiles","file"],"default":"mbtiles"}},{"name":"units","in":"query","required":false,"schema":{"type":"string","enum":["metric","imperial"],"default":"metric"},"description":"The unit every number in the document prints in (soundings, contour labels, hazard depths, dredged-channel and bridge notes, light heights), as the online style route's `units`: `metric` (default) is S-57's own metres; `imperial` converts every printed number to feet in the generator, depths and clearances rounded down to the whole foot. Use it rather than rewriting the document's text on the device, so a chart in feet stays wholly in feet offshore. Case-insensitive; anything else is 400 `invalid_units`. Echoed in the body's `units` and `X-Style-Units`."},{"name":"symbols","in":"query","required":false,"schema":{"type":"string","enum":["s52","s101","chrt","int1","uschart1","raster"],"default":"s52"},"description":"Case-insensitive symbol artwork family, the same values as the online style route's `symbols`. `raster` (INT-1's id before 2026-11) is accepted forever and generates `int1`; the response body's `symbols` echoes the value as sent. The style's sprite names the family's sheet in the chart-assets pack, which also carries every `raster-*` sheet for offline styles already on devices."},{"name":"look","in":"query","required":false,"schema":{"type":"string","enum":["paper","engraved","handcolored"]},"description":"A decorative look, drawn over the day palette: the same values, parse and refusals as the online style route's `look`, so a look keeps drawing offshore. `paper`: the U.S. paper chart as last printed. `engraved`: the 1860s Coast Survey engraving, in black. `handcolored`: the engraving washed in flat watercolour tints. A look changes how the chart is drawn, never what it says. Omit or leave empty for none. Case-insensitive; `-` and `_` are ignored (`hand-colored`). With any `palette` other than `DAY` it is 400 `look_requires_day`; with `symbols=s101`, which has no sprite to carry the look's images, 400 `look_requires_sprite`; anything else is 400 `invalid_look`. The style's sprite names the look's own sheet, `{family}-look_{look}`, which the chart-assets pack carries; `metadata[\"chrt:look\"]`, the body's `look` and the `X-Style-Look` header state the look drawn."},{"name":"mode","in":"query","required":false,"schema":{"type":"string","enum":["continuous","chart:Overview","chart:General","chart:Coastal","chart:Approach","chart:Harbor"],"default":"continuous"},"description":"Render mode — identical vocabulary and validation to the online style route's `mode`. Case-insensitive (canonical casing shown). Berthing has no chart-mode band configuration and is not a valid value; a bare `chart` (no band) is invalid, never defaulted."},{"name":"lock","in":"query","required":false,"schema":{"type":"string","enum":["overview","overview:only","general","general:only","coastal","coastal:only","approach","approach:only","harbor","harbor:only","berthing","berthing:only"]},"description":"Chart mode's band lock, as CHRTpaper draws a locked chart. The band's chart is drawn as at the band's floor zoom (Overview 5, General 7, Coastal 9, Approach 11, Harbor 13, Berthing 14) and, zoomed out of it, REDUCED with the land, like a paper chart under a reducing glass: every size (text, symbols, lines, halos, offsets) is its size at the floor times 2^(zoom − floor), and every filter and zoom-dependent choice decides as at the floor, down to two zoom levels out. At and past the floor the chart is drawn as usual. `{band}` keeps finer data where it exists: the continuous chart, reduced. `{band}:only` draws the band alone (the band's chart, a coarser band only where it has none, never a finer one), with the chart source's `maxzoom` held at the floor. **Stop zoom-out at `metadata[\"chrt:lock-min-zoom\"]` (the floor − 2).** A style document cannot set a map's minimum zoom, so the client sets it; further out, layers drawn only from the floor end. The document carries `chrt:lock` (the canonical value), `chrt:lock-band`, `chrt:lock-floor`, `chrt:lock-min-zoom` and `chrt:lock-band-only`; `chrt:render-mode` stays `continuous`. Case-insensitive; omit or leave empty for no lock. With `mode=chart:{band}` it is 400 `lock_conflicts_mode` (a lock chooses its own chart; `mode=continuous` is fine). Anything else is 400 `invalid_lock`. A map reads the tiles of the zoom it is at, and Berthing data starts at z13, so a Berthing lock shows no Berthing data below z13. The same vocabulary and validation as the online style route's `lock`, so a locked chart keeps working offshore; the response body echoes it in `lock` and `lock_min_zoom`."},{"name":"base","in":"query","required":false,"schema":{"type":"string","enum":["0","1","false","true"],"default":"0"},"description":"Draw the chart over a local CHRT_BASE bundle (see description). Off by default offline. Anything else is 400 `invalid_base`."},{"name":"placers","in":"query","required":false,"schema":{"type":"string","enum":["0","1","false","true"],"default":"0"},"description":"The danger depths as a pair, as the online style route's `placers`: off by default, three invisible placer layers when on. Anything else is 400 `invalid_placers`."},{"name":"edges","in":"query","required":false,"schema":{"type":"string","enum":["0","1","false","true"],"default":"0"},"description":"Cell edges, as the online style route's `edges`: off by default. Anything else is 400 `invalid_edges`."}],"responses":{"200":{"description":"Offline style.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflineStyle"}}},"headers":{"X-Style-Version":{"$ref":"#/components/headers/X-Style-Version"},"X-Style-Base":{"$ref":"#/components/headers/X-Style-Base"},"X-Style-Lock":{"$ref":"#/components/headers/X-Style-Lock"},"X-Style-Look":{"$ref":"#/components/headers/X-Style-Look"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"400":{"description":"Invalid palette, protocol, symbols, look (`invalid_look`), mode, lock (`invalid_lock`), base (`invalid_base`) or placers (`invalid_placers`), `look_requires_day` (a look with a palette other than DAY), `look_requires_sprite` (a look with symbols=s101), `base_requires_sprite` (base=1 with symbols=s101), `lock_conflicts_mode` (a lock with mode=chart:{band}), or an unknown query parameter (`unknown_param`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"`unknown_region` — no offline bundle has this id; `no_offline_build` — a known id with no published build.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`not_a_chart_bundle` — CHRT_LAND / CHRT_BASE bundles have no style of their own; fetch a chart bundle's style (with `base=1` for CHRT_BASE).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded: this key's offline window (10 per 10 s) is spent.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}}}}},"/v1/offline/heartbeat":{"post":{"operationId":"offlineHeartbeat","summary":"Refresh the offline grace period","description":"Report a device's held bundles and refresh its offline validity. A successful heartbeat buys 60 days of fully offline operation. Authenticates with an OfflineToken Bearer OR an x-api-key (Bearer wins if both are sent).\n\nOffline rate limit: 10 requests per 10 s per key, one window shared by every `/v1/offline/*` route (minting an offline token does not spend it). Every 200 and 429 carries `X-RateLimit-Limit` / `X-RateLimit-Remaining` / `X-RateLimit-Reset` (so do most errors after the token and entitlement checks); a spent window is 429 `rate_limited` with `Retry-After` (the real wait, at most 10 s), never a 503.","tags":["Offline"],"security":[{"OfflineToken":[]},{"ApiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatRequest"}}}},"responses":{"200":{"description":"Refreshed grace period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"400":{"description":"Malformed body or field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Token or key revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body larger than 4096 bytes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded: this key's offline window (10 per 10 s) is spent.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}}}}},"/v1/tiles/{region}/{z}/{x}/{y}.mvt":{"servers":[{"url":"https://tiles.chrt.co","description":"Tile delivery host"}],"get":{"operationId":"getTile","summary":"Vector tile","description":"A Mapbox Vector Tile for a region at z/x/y. Authenticate with a TileToken Bearer. An empty (out-of-data) tile returns 204 with no body. X-RateLimit-* headers are present on every outcome including 204 and 429.\n\n**Tiles are served gzipped.** They are stored gzip-compressed in the PMTiles archive and the edge negotiates per request: send `Accept-Encoding: gzip` and the response carries `content-encoding: gzip`; send `identity`, or omit the header entirely, and you get the uncompressed bytes. MapLibre GL JS, MapLibre Native, browsers and @chrtco/sdk all request gzip by default, so the compressed size is real-world wire cost — but plain `curl` sends no `Accept-Encoding`, so measuring with it overstates transfer by roughly 2-2.5x. Use `curl --compressed`. Reference: prod NOAA_ENC z11/620/757 (Boston), measured 2026-07-27, is 1,152,506 B identity vs 462,273 B gzip (2.49x). Tile size tracks feature density far more than zoom; sample a spread before sizing a cache or bundle.","tags":["Tiles"],"security":[{"TileToken":[]}],"parameters":[{"name":"region","in":"path","required":true,"schema":{"type":"string"},"example":"NOAA_ENC","description":"The tile source. Chart sources (`NOAA_ENC`, `USACE_IENC`, …) are the ones your key licenses; basemaps (`CHRT_LAND`, `CHRT_RELIEF`, `CHRT_BASE`) and the overlay **`NWS_MARINE_ZONES`** — the NWS marine forecast zone boundaries, layer `marine_zones`, whose feature `id` is `/v1/weather/marine-forecast`'s `zone.id` — ride along with the chart sources that grant them. Your tile token's `allowed_sources` is the list this token can fetch; anything else is 403 `region_not_licensed`."},{"name":"z","in":"path","required":true,"schema":{"type":"integer"}},{"name":"x","in":"path","required":true,"schema":{"type":"integer"}},{"name":"y","in":"path","required":true,"schema":{"type":"integer"}},{"name":"v","in":"query","required":false,"description":"Optional build discriminator — this region's build id from `POST /v1/mint/tile-token`'s `build_tags` map. **The server ignores it**: a tile is always served from whatever build the region's pointer currently resolves to, and a stale value is never an error. It exists so your CLIENT's caches get one namespace per build. Tiles are `private, max-age=3600` and report their build in `X-Build-Id`, which is not part of any cache key, so without this parameter a build cutover leaves already-fetched tiles coming from the old build while new ones arrive from the new. Omit it and behaviour is exactly as before.","schema":{"type":"string"},"example":"dbb69074-5f31-4a0c-9c2e-7b1d4a6e8f30"},{"name":"Accept-Encoding","in":"header","required":false,"description":"Send `gzip` to receive the tile compressed (~2.5x smaller). Omitting this header yields uncompressed bytes; most HTTP clients set it for you, plain curl does not.","schema":{"type":"string","examples":["gzip"]}}],"responses":{"200":{"description":"MVT bytes (gzip on egress). Carries `content-encoding: gzip` when the request asked for gzip.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Content-Encoding":{"$ref":"#/components/headers/Content-Encoding"}},"content":{"application/vnd.mapbox-vector-tile":{"schema":{"type":"string","format":"binary","description":"MVT bytes. gzip-compressed on the wire when the request sent `Accept-Encoding: gzip`, identity otherwise."}}}},"204":{"description":"Empty tile (no data at this z/x/y)."},"401":{"$ref":"#/components/responses/TileUnauthorized"},"403":{"description":"Region not licensed for this token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"Region not available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tiles/{region}/tiles.json":{"servers":[{"url":"https://tiles.chrt.co","description":"Tile delivery host"}],"get":{"operationId":"getTileJson","summary":"TileJSON for a region","description":"TileJSON 3.0.0 describing the region's tiles, with `disclaimer` and `attribution` always present. For `CHRT_LAND` and `CHRT_RELIEF`, `attribution` carries the Copernicus DEM GLO-30 notice (licence: https://dataspace.copernicus.eu/explore-data/data-collections/copernicus-contributing-missions/collections-description/COP-DEM) and, for `CHRT_LAND`, the OpenStreetMap notice: both are conditions of use and must stay visible wherever the tiles are shown. Builds that carry currency add `build_tag` and `data_effective_date` (the newest date in the build — for `NWS_MARINE_ZONES`, when NWS last redrew any zone). `minzoom`/`maxzoom` are the source's own (`NWS_MARINE_ZONES`: 5–12, with no tiles below z5).","tags":["Tiles"],"security":[{"TileToken":[]}],"parameters":[{"name":"region","in":"path","required":true,"schema":{"type":"string"},"description":"The tile source. Chart sources (`NOAA_ENC`, `USACE_IENC`, …) are the ones your key licenses; basemaps (`CHRT_LAND`, `CHRT_RELIEF`, `CHRT_BASE`) and the overlay **`NWS_MARINE_ZONES`** — the NWS marine forecast zone boundaries, layer `marine_zones`, whose feature `id` is `/v1/weather/marine-forecast`'s `zone.id` — ride along with the chart sources that grant them. Your tile token's `allowed_sources` is the list this token can fetch; anything else is 403 `region_not_licensed`."}],"responses":{"200":{"description":"TileJSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TileJson"}}}},"401":{"$ref":"#/components/responses/TileUnauthorized"},"403":{"description":"Region not licensed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Region not available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/styles/{region}/style.json":{"servers":[{"url":"https://tiles.chrt.co","description":"Style delivery host"}],"get":{"operationId":"getStyle","summary":"Served S-52 MapLibre style","description":"A complete MapLibre GL style for the region, filtered to the key's coverage. The style metadata always carries `chrt:attribution` and `chrt:disclaimer`. Authenticate with a TileToken Bearer. The style always contains a background layer (S-52 NODTA backdrop per palette) and, for the s52, chrt, int1 and uschart1 families, declares `sprite` pointing at /v1/sprites/{family}-{theme} (under a `look`, at /v1/sprites/{family}-look_{look}) — native renderers need no extra work beyond loading the style. s101 styles declare no sprite pending artwork licence review. Style metadata carries chrt:style-id / chrt:style-rev / chrt:style-applied when a custom style is bound — provenance that survives every cache. The `mode` parameter selects the render mode: `continuous` (default, free zoom with per-band zoom windows) or `chart:{band}` (portrayal locked to one scale band with cascade fallback to coarser bands where it has no cells) — the served twin of the first-party app's Map Mode toggle; the document echoes the resolved mode in `metadata[\"chrt:render-mode\"]` and the `X-Style-Mode` response header. The `lock` parameter is CHRTpaper's band lock for a live chart: the band's chart reduced with the land when zoomed out of it, two levels at most — see `lock` for what the client must do (stop zoom-out at `metadata[\"chrt:lock-min-zoom\"]`). A bound custom style COMPOSES with `mode`: the custom palette/visibility/label/nav settings apply to the band-locked document. The query surface is CLOSED: parameters other than `theme`, `symbols`, `look`, `mode`, `lock`, `land`, `relief`, `base`, `units`, `placers`, `seafloor` are rejected with 400 `unknown_param` naming the offending and valid parameters, rather than ignored — a misspelled knob must never silently return the default document (no-silent-degradation; the same decision closed the /v1/query catch-all). CHRTland is controlled by `land` (on by default): it adds the `CHRT_LAND` vector source and a dozen `chrtland-*` layers inserted between the background and every S-57 class, so the land base can never occlude a portrayal. Land is NOT chart data and does not come from a hydrographic office — it must not be read as charted shoreline. `relief` adds CHRTland's terrarium hillshade and is SEPARATELY opt-in; it requires `land=1` (`relief` alone is 400 `relief_requires_land`, because the raster-dem source would have no layer drawing from it). Both are authorized like any other region: the token must carry `CHRT_LAND` / `CHRT_RELIEF` in its allowed sources or the request is 403 `region_not_licensed` naming the missing region — the style never declares a source whose tiles the holder cannot fetch. `CHRT_LAND` is granted implicitly to every holder of the chart sources it follows; **`CHRT_RELIEF` is not granted by any chart source yet, so `relief=1` is refused today** and will begin working, with no API change, once that grant ships. The resolved values are echoed in `X-Style-Land` / `X-Style-Relief` and in the document's `chrt:land` / `chrt:relief` metadata. **Third-party notices are conditions of use.** CHRTland's relief shading uses Copernicus DEM GLO-30 wherever USGS 3DEP has no elevation (land beyond the US that NOAA's charts cover, and islands 3DEP has not mapped); its contours are drawn from 3DEP only. That elevation is used under the Copernicus DEM licence (https://dataspace.copernicus.eu/explore-data/data-collections/copernicus-contributing-missions/collections-description/COP-DEM), which requires its notice on adapted data, so `CHRT_RELIEF`'s attribution and `CHRT_LAND`'s (after the OpenStreetMap notice) carry it: `Elevation: USGS 3D Elevation Program · produced using Copernicus WorldDEM-30 © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved`. Keep both notices visible wherever the map is shown, and pass them on to anyone you redistribute the data or a rendering of it to; the licence binds onward users to the same notice.\n\n**CHRT_BASE — the world under the chart (`base`, on by default).** Adds the `CHRT_BASE` vector source (z0–11; attribution `© CHRT · Made with Natural Earth · © OpenStreetMap contributors` on the source) and its layers: the ocean and earth, world lakes, boundaries, the **no-coverage crosshatch** (`chrtbase-nocoverage`, a geometry-free background pattern), the tan fill over the countries whose charts CHRT carries, state lines and names inside them, rough inland water there under a lighter hatch (z9–11 from OpenStreetMap), and land borders hoisted above the chart. The crosshatch works by inversion: it is drawn everywhere, and CHRT's own knowledge paints over it — `s52-coverage-ground` from the chart's `M_COVR` (CATCOV=1), the jurisdiction fill over the countries CHRT carries, then the chart. A client raster belongs directly under the crosshatch: `map.addLayer(layer, \"chrtbase-nocoverage\")`. `base=0` removes the source and every `chrtbase-*` layer. An explicit `base=1` without `CHRT_BASE` on the token is 403 `region_not_licensed`, and with no promoted build 503 `region_not_available`; a DEFAULTED base in either condition quietly degrades to off. The resolved value is echoed in `X-Style-Base`. For offline use see GET /v1/offline/styles/{region}?base=1 and the CHRT_BASE bundle.\n\n**Version.** Every document carries the style's version in `metadata[\"chrt:style-version\"]` (`MAJOR.MINOR.PATCH`), and every 200 answers it in `X-Style-Version`. Each change to how the served chart is drawn comes with a new version and a changelog entry (https://chrt.co/docs/styles#versions).","tags":["Styles"],"security":[{"TileToken":[]}],"parameters":[{"name":"region","in":"path","required":true,"schema":{"type":"string"},"example":"NOAA_ENC"},{"name":"theme","in":"query","required":false,"schema":{"type":"string","enum":["day","dusk","night","eink_color","eink_mono","eink_night"]},"description":"Case-insensitive (`-` is accepted for `_`). Omit for the style's default (DAY, or the bound custom style's default). `day`, `dusk` and `night` are the IHO S-52 colour tables. `eink_color`, `eink_mono` and `eink_night` are CHRT's e-paper chart variants for reflective e-ink screens: `eink_color` for colour e-ink (E Ink Kaleido 3 — e.g. Boox Note Air C, Go Color 7, Tab X C), `eink_mono` for monochrome e-ink panels and monitors, and colour e-ink tablets run in black-and-white. Both draw the same features, classes and priorities as `day` on a paper-white ground with black ink, heavier lines (×1.5) and larger text (×1.15), a heavy black safety-contour line, danger symbols drawn 1.35× larger, cross-hatched danger areas, at most four depth steps (`eink_mono`: depth by fill pattern — hatched drying, stippled water shallower than the safety contour, plain paper beyond it), no translucent washes, no hillshade and no transitions. `eink_mono` paints only four greys (#000000, #555555, #aaaaaa, #ffffff). Water outside coverage stays dark under the no-coverage crosshatch so it can never read as charted water. `eink_night` is for any e-ink screen at night, front light on: the mono chart inverted onto a black page so the lit area stays small (water black; lines, labels and deeper soundings light grey; only the safety contour, dangers, lights and shoal soundings white; land dark grey; no-data and water outside coverage hatched so they never read as black safe water) — the e-ink replacement for red night, since no e-ink front light is red. Attribution and metadata are unchanged; the document carries `metadata[\"chrt:eink\"]` (`color`, `mono` or `night`). Available on every plan, and served even when a bound custom style has narrowed its own palettes. The matching sprite is `/v1/sprites/{family}-eink_color` / `-eink_mono` / `-eink_night`."},{"name":"symbols","in":"query","required":false,"schema":{"type":"string","enum":["s52","s101","chrt","int1","uschart1","raster"],"default":"s52"},"description":"Case-insensitive symbol artwork family. `s52` (default): the IHO S-52 Presentation Library. `s101`: the official S-101 Portrayal Catalogue artwork (declares no sprite pending its licence review). `chrt`: the CHRT house set. `int1`: INT-1, the IHO INT 1 symbols as paper charts draw them. `uschart1`: U.S. Chart No. 1, INT-1 with the aids as U.S. Chart No. 1 draws them (diamond buoys, filled daybeacons, magenta light discs and flares) by day and on e-ink by day; at dusk and at night it draws INT-1's artwork. `raster` is INT-1's id before 2026-11: deprecated but accepted forever, it serves exactly the `int1` document (one cache entry for both), and `X-Style-Symbols` echoes the value as sent."},{"name":"look","in":"query","required":false,"schema":{"type":"string","enum":["paper","engraved","handcolored"]},"description":"A decorative look, drawn over the day palette. `paper`: the U.S. paper chart as last printed (buff land, blue to the 18 ft curve, magenta lights and red aids). `engraved`: the 1860s Coast Survey engraving, in black (stippled shallows, hachured hills, engraved lettering). `handcolored`: the engraving in a warm ink, washed in flat watercolour tints. A look changes how the chart is drawn, never what it says. Omit for none. Case-insensitive; `-` and `_` are ignored (`hand-colored`). Day only: with any `theme` other than `day` it is 400 `look_requires_day`. With `symbols=s101`, which has no sprite to carry the look's images, it is 400 `look_requires_sprite`. Anything else is 400 `invalid_look`. Under a bound custom style the look is drawn over the day palette whatever palettes the style curated. The document declares the look's own sprite sheet, `/v1/sprites/{family}-look_{look}`, carries `metadata[\"chrt:look\"]`, and the response carries `X-Style-Look`."},{"name":"mode","in":"query","required":false,"schema":{"type":"string","enum":["continuous","chart:Overview","chart:General","chart:Coastal","chart:Approach","chart:Harbor"],"default":"continuous"},"description":"Render mode. Case-insensitive (canonical casing shown; the cache key, `X-Style-Mode`, and `chrt:render-mode` all echo the canonical form). `chart:{band}` requires the band — a bare `chart` is invalid, never defaulted. Berthing has no chart-mode band configuration and is not a valid value. Chart-mode styles ship at most 350 symbol layers (continuous: 350; add 3 for `land=1`), well under MapLibre Native's 482-layer cliff."},{"name":"lock","in":"query","required":false,"schema":{"type":"string","enum":["overview","overview:only","general","general:only","coastal","coastal:only","approach","approach:only","harbor","harbor:only","berthing","berthing:only"]},"description":"Chart mode's band lock, as CHRTpaper draws a locked chart. The band's chart is drawn as at the band's floor zoom (Overview 5, General 7, Coastal 9, Approach 11, Harbor 13, Berthing 14) and, zoomed out of it, REDUCED with the land, like a paper chart under a reducing glass: every size (text, symbols, lines, halos, offsets) is its size at the floor times 2^(zoom − floor), and every filter and zoom-dependent choice decides as at the floor, down to two zoom levels out. At and past the floor the chart is drawn as usual. `{band}` keeps finer data where it exists: the continuous chart, reduced. `{band}:only` draws the band alone (the band's chart, a coarser band only where it has none, never a finer one), with the chart source's `maxzoom` held at the floor. **Stop zoom-out at `metadata[\"chrt:lock-min-zoom\"]` (the floor − 2).** A style document cannot set a map's minimum zoom, so the client sets it; further out, layers drawn only from the floor end. The document carries `chrt:lock` (the canonical value), `chrt:lock-band`, `chrt:lock-floor`, `chrt:lock-min-zoom` and `chrt:lock-band-only`; `chrt:render-mode` stays `continuous`. Case-insensitive; omit or leave empty for no lock. With `mode=chart:{band}` it is 400 `lock_conflicts_mode` (a lock chooses its own chart; `mode=continuous` is fine). Anything else is 400 `invalid_lock`. A map reads the tiles of the zoom it is at, and Berthing data starts at z13, so a Berthing lock shows no Berthing data below z13. The response carries `X-Style-Lock`. A bound custom style composes with it: the lock goes on last, over the custom settings and any `look`."},{"name":"land","in":"query","required":false,"schema":{"type":"string","enum":["0","1","false","true"],"default":"1"},"description":"Draw CHRTland's land base under the chart. On by default; a DEFAULTED land without the grant or a promoted build quietly degrades to off, an explicit `land=1` is refused. Requires `CHRT_LAND` on the token (granted implicitly with the chart sources it follows) — otherwise 403 `region_not_licensed`. Case-insensitive on the word forms; a BARE `?land` (no value) is 400, never read as on."},{"name":"relief","in":"query","required":false,"schema":{"type":"string","enum":["0","1","false","true"],"default":"1"},"description":"CHRTland's terrarium hillshade. **On by default**, and it draws only with land: `relief=1` with `land=0` is 400 `relief_requires_land`, while a defaulted relief follows land off. `land=1&relief=0` is land without the hillshade. Requires `CHRT_RELIEF` on the token, granted with the chart sources; an explicit `relief=1` the token can't carry is 403 `region_not_licensed`, a defaulted one degrades to off. Echoed in `X-Style-Relief`. Case-insensitive on the word forms; a bare `?relief` is 400. The source's attribution carries the Copernicus DEM GLO-30 notice its licence requires; keep it visible (see the operation description)."},{"name":"base","in":"query","required":false,"schema":{"type":"string","enum":["0","1","false","true"],"default":"1"},"description":"Draw CHRT_BASE — world geography, the no-coverage crosshatch, the jurisdiction fill and rough inland water — under the chart. On by default. Explicit `base=1` without the grant is 403 `region_not_licensed`, without a promoted build 503 `region_not_available`; a defaulted base degrades to off. Echoed in `X-Style-Base`."},{"name":"units","in":"query","required":false,"schema":{"type":"string","enum":["metric","imperial"],"default":"metric"},"description":"The unit every number in the document prints in — soundings, depth-contour labels, dredged-channel notes and bridge notes. `metric` (default) is S-57's own metres; `imperial` converts every printed number to feet in the generator, so no two parts of the chart can disagree. Same vocabulary as the weather API's `units`. Case-insensitive; anything else is 400 `invalid_units`."},{"name":"placers","in":"query","required":false,"schema":{"type":"string","enum":["0","1","false","true"],"default":"0"},"description":"The danger depths as a pair: an invisible placer in 0.10.3's collision form beneath each rock, wreck and obstruction depth, which is then always drawn and displaces no sounding, and a tile draws the depths once. Off by default: the served style keeps the single always-drawn depth label until the pair is checked on MapLibre Native; CHRTweb and CHRTdesktop draw the pair. Adds three symbol layers (`s52-{UWTROC,OBSTRN,WRECKS}-placer-label`, `text-opacity` 0). Case-insensitive on the word forms; a bare `?placers` or any other value is 400 `invalid_placers`."},{"name":"edges","in":"query","required":false,"schema":{"type":"string","enum":["0","1","false","true"],"default":"0"},"description":"Cell edges: draw an area's outline where an ENC cell's copy of it closes along the cell's coverage limit, the rectangles a cell grid leaves across the water and the land (every outlined area that spans cells: restricted areas, depth and land areas, anchorages, cable and pipeline areas, regulated zones, fairways, dredged areas, lakes, rivers, built-up areas; never hazards or structures). Off by default: on tiles built with the outline split (`AREA_EDGE` layer, `_cell_limit` tag) those segments are left out and the rest of every outline draws, real limits included; on older tiles every outline draws whole, as before. Adds a twin line layer per outline when off, its id the outline's with `-pieces` before the band segment (`s52-DEPARE-outline-pieces-band5`). Case-insensitive on the word forms; a bare `?edges` or any other value is 400 `invalid_edges`."},{"name":"oneland","in":"query","required":false,"schema":{"type":"string","enum":["0","1","false","true"],"default":"0"},"description":"One land: with `land=1`, the land is drawn from CHRTland alone and the ENC's built-up area (BUAARE) tint and outline, one per cell, are left out; town names stay. Changes nothing without `land=1`. Off by default. Anything else is 400 `invalid_oneland`."},{"name":"placenames","in":"query","required":false,"schema":{"type":"string","enum":["0","1","false","true"],"default":"0"},"description":"Water names from the place-name index: each water area (sea area, lake, river, canal, dock) is named once, from the build's `PLACENAME` layer (`chrt-placename-water-major`, `-local`, `-beside`, `-anchorage`), in place of the sea-area labels' one name per ENC cell per tile piece (`s52-SEAARE-label*` and the other water classes' labels are not emitted). Each name is at least 10 px while its place matters and shrinks and fades out over the one zoom below that, under a `lock` too. Land names come from `PLACENAME` too, one per place (`chrt-placename-land`, `-land-beside`, `-land-islands`, `-land-islands-beside`), in place of the land classes' labels; island names are placed before the depth field from zoom 12, as before. Absent, it follows the serving build: on when the build was promoted to draw its water names from `PLACENAME`, else off (the sea-area labels). Send `1` only on a build that carries `PLACENAME` (the tile-token mint's `build.place_names`): on tiles without the layer these names draw nothing. `0` keeps the sea-area labels on any build. Anything else is 400 `invalid_placenames`."},{"name":"seafloor","in":"query","required":false,"schema":{"type":"string","enum":["0","1","false","true"],"default":"1"},"description":"CHRTseafloor seabed shading (ADR 0048): one colour with the shade amount in alpha, masked to charted water, drawn directly above the depth-area fills. Shape only — it carries no depth. Defaults ON, and draws in land mode only: `seafloor=1` with `land=0` is 400 `seafloor_requires_land`, while a defaulted seafloor follows land off. Same grant discipline as `land`: an explicit ask the token cannot carry is 403 `region_not_licensed`, an explicit ask with no promoted build is 503 `region_not_available`, and a default degrades to off in both cases. `X-Style-Seafloor` reports what was drawn. Anything else is 400 `invalid_seafloor`."},{"name":"If-None-Match","in":"header","required":false,"schema":{"type":"string"},"description":"An `ETag` from an earlier response. A match is a 304."}],"responses":{"200":{"description":"MapLibre style JSON.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Style-Version":{"$ref":"#/components/headers/X-Style-Version"},"X-Style-Base":{"$ref":"#/components/headers/X-Style-Base"},"X-Style-Symbols":{"$ref":"#/components/headers/X-Style-Symbols"},"X-Style-Look":{"$ref":"#/components/headers/X-Style-Look"},"X-Style-Lock":{"$ref":"#/components/headers/X-Style-Lock"},"ETag":{"schema":{"type":"string"},"description":"Weak validator: a hash of the document apart from `chrt:generated-at`. Send it back as `If-None-Match` to revalidate."}},"content":{"application/json":{"schema":{"type":"object","description":"A MapLibre GL style document with chrt:* metadata."}}}},"304":{"description":"Not Modified: the `If-None-Match` matched this document's `ETag`. No body; same `ETag`, `Cache-Control` and CORS headers as the 200. Only after auth and the coverage check."},"400":{"description":"Invalid theme, symbols, look, mode, lock (`invalid_lock`), land, relief, base, units, placers or seafloor — an unknown query parameter (`unknown_param`), `relief=1` without `land=1` (`relief_requires_land`), `seafloor=1` with `land=0` (`seafloor_requires_land`), a `look` with a theme other than day (`look_requires_day`) or with `symbols=s101` (`look_requires_sprite`), a `lock` with `mode=chart:{band}` (`lock_conflicts_mode`). The error body names the offending value(s) in `requested` and the valid vocabulary in `valid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/TileUnauthorized"},"403":{"description":"Region not licensed — the path region, or a basemap region the request asked the style to declare (`CHRT_LAND` for `land=1`, `CHRT_RELIEF` for `relief=1`). The body's `requested` names which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"Region not available — the path region has no current build pointer, or a basemap region the request asked the style to declare does not (`CHRT_LAND` for `land=1`, `CHRT_RELIEF` for `relief=1`). The body's `requested` names which. Refused rather than degraded: a style declaring an unbuilt source paints as blank ground, not as an error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sprites/{sheet}.json":{"servers":[{"url":"https://tiles.chrt.co","description":"Tile delivery host"}],"get":{"tags":["Sprites"],"security":[],"parameters":[{"name":"sheet","in":"path","required":true,"description":"Sprite sheet. `{family}-{theme}`: a family's artwork in one palette (family `s52`, `chrt`, `int1` or `uschart1`; theme `day`, `dusk`, `night`, `eink_color`, `eink_mono` or `eink_night`). `{family}-look_{look}`: the sheet a decorative look's style declares, its family's day sheet (`paper`) or black & white sheet (`engraved`, `handcolored`) with the look's own patterns and symbols. `raster-{theme}` is INT-1's sheet under its id before 2026-11, served forever as `int1-{theme}` (`X-Sprite-Sheet` names the sheet served). An @2x variant of every file exists at {sheet}@2x.json / {sheet}@2x.png. A style's `sprite` value is the extensionless base URL — GL renderers expand it themselves. The s101 family ships no sheets (artwork licence review pending) and s101 styles declare no sprite.","schema":{"type":"string","enum":["s52-day","s52-dusk","s52-night","s52-eink_color","s52-eink_mono","s52-eink_night","chrt-day","chrt-dusk","chrt-night","chrt-eink_color","chrt-eink_mono","chrt-eink_night","int1-day","int1-dusk","int1-night","int1-eink_color","int1-eink_mono","int1-eink_night","uschart1-day","uschart1-dusk","uschart1-night","uschart1-eink_color","uschart1-eink_mono","uschart1-eink_night","s52-look_paper","s52-look_engraved","s52-look_handcolored","chrt-look_paper","chrt-look_engraved","chrt-look_handcolored","int1-look_paper","int1-look_engraved","int1-look_handcolored","uschart1-look_paper","uschart1-look_engraved","uschart1-look_handcolored","raster-day","raster-dusk","raster-night","raster-eink_color","raster-eink_mono","raster-eink_night"]}}],"operationId":"getSpriteIndex","summary":"Sprite index (GL sprite JSON) — public","description":"The image-name → coordinates index for one sprite sheet. PUBLIC, unauthenticated: symbology artwork is not HO-licensed chart data, and the SDK's transformRequest deliberately passes sprite URLs through untouched. Generated from the same atlas registries the style generator reads, so every image name a served style can emit resolves here.","responses":{"200":{"description":"Sprite index.","headers":{"X-Sprite-Manifest-Hash":{"$ref":"#/components/headers/X-Sprite-Manifest-Hash"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpriteIndex"}}}},"404":{"description":"Unknown sheet — the body lists valid sheets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpriteError"}}}},"503":{"description":"Sheet exists but storage is missing the object (deploy fault on CHRT's side — retry).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpriteError"}}}}}}},"/v1/sprites/{sheet}.png":{"servers":[{"url":"https://tiles.chrt.co","description":"Tile delivery host"}],"get":{"tags":["Sprites"],"security":[],"parameters":[{"name":"sheet","in":"path","required":true,"description":"Sprite sheet. `{family}-{theme}`: a family's artwork in one palette (family `s52`, `chrt`, `int1` or `uschart1`; theme `day`, `dusk`, `night`, `eink_color`, `eink_mono` or `eink_night`). `{family}-look_{look}`: the sheet a decorative look's style declares, its family's day sheet (`paper`) or black & white sheet (`engraved`, `handcolored`) with the look's own patterns and symbols. `raster-{theme}` is INT-1's sheet under its id before 2026-11, served forever as `int1-{theme}` (`X-Sprite-Sheet` names the sheet served). An @2x variant of every file exists at {sheet}@2x.json / {sheet}@2x.png. A style's `sprite` value is the extensionless base URL — GL renderers expand it themselves. The s101 family ships no sheets (artwork licence review pending) and s101 styles declare no sprite.","schema":{"type":"string","enum":["s52-day","s52-dusk","s52-night","s52-eink_color","s52-eink_mono","s52-eink_night","chrt-day","chrt-dusk","chrt-night","chrt-eink_color","chrt-eink_mono","chrt-eink_night","int1-day","int1-dusk","int1-night","int1-eink_color","int1-eink_mono","int1-eink_night","uschart1-day","uschart1-dusk","uschart1-night","uschart1-eink_color","uschart1-eink_mono","uschart1-eink_night","s52-look_paper","s52-look_engraved","s52-look_handcolored","chrt-look_paper","chrt-look_engraved","chrt-look_handcolored","int1-look_paper","int1-look_engraved","int1-look_handcolored","uschart1-look_paper","uschart1-look_engraved","uschart1-look_handcolored","raster-day","raster-dusk","raster-night","raster-eink_color","raster-eink_mono","raster-eink_night"]}}],"operationId":"getSpriteSheet","summary":"Sprite sheet (PNG) — public","description":"The packed PNG for one sprite sheet. See the .json twin for semantics.","responses":{"200":{"description":"Sprite sheet image.","headers":{"X-Sprite-Manifest-Hash":{"$ref":"#/components/headers/X-Sprite-Manifest-Hash"}},"content":{"image/png":{"schema":{"type":"string","contentMediaType":"image/png","contentEncoding":"binary"}}}},"404":{"description":"Unknown sheet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpriteError"}}}},"503":{"description":"Not yet uploaded to storage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpriteError"}}}}}}},"/v1/glyphs/{fontstack}/{range}.pbf":{"servers":[{"url":"https://tiles.chrt.co","description":"Tile delivery host"}],"get":{"tags":["Sprites"],"security":[],"parameters":[{"name":"fontstack","in":"path","required":true,"description":"Font stack, percent-encoded (spaces included). A comma-joined stack resolves to the first face served. A style's `glyphs` value is the URL template with {fontstack} and {range} placeholders — GL renderers expand it themselves.","schema":{"type":"string","enum":["Open Sans Regular","Open Sans Italic","Open Sans Semibold"]}},{"name":"range","in":"path","required":true,"description":"256-codepoint block. Only the blocks the served styles' text layers can request are hosted, derived from the full NOAA OBJNAM/NOBJNM corpus.","schema":{"type":"string","enum":["0-255","256-511","512-767","768-1023","7680-7935","8192-8447"]}}],"operationId":"getGlyphRange","summary":"SDF glyph range (PBF) — public","description":"One SDF glyph range for one font stack. Self-hosted rather than proxied from a public font CDN: the usual upstream Open Sans build has no glyph for six codepoints that occur in official NOAA place names, above all U+02BB ʻOKINA — a consonant in Hawaiian, not an accent. A renderer draws a missing glyph as nothing, so those names rendered with a hole. Ranges keep every upstream glyph byte-identical and composite only the missing six in from Noto Sans. Public and unauthenticated for the same reason as the sprite sheets: letterforms are typography, not HO-licensed chart data.","responses":{"200":{"description":"Glyph range protobuf.","content":{"application/x-protobuf":{"schema":{"type":"string","contentMediaType":"application/x-protobuf","contentEncoding":"binary"}}}},"404":{"description":"Unknown font stack or range.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpriteError"}}}},"503":{"description":"Not yet uploaded to storage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpriteError"}}}}}}},"/v1/offline/assets":{"get":{"operationId":"getOfflineAssets","summary":"Chart-assets pack (sprites + glyphs) for offline rendering","tags":["Offline"],"security":[{"OfflineToken":[]}],"description":"Region-independent and byte-budget-exempt: symbology, not chart data. The offline style (GET /v1/offline/styles/{region}) references this pack's contents via {protocol}://assets/... URLs.\n\nOffline rate limit: 10 requests per 10 s per key, one window shared by every `/v1/offline/*` route (minting an offline token does not spend it). Every 200 and 429 carries `X-RateLimit-Limit` / `X-RateLimit-Remaining` / `X-RateLimit-Reset` (so do most errors after the token and entitlement checks); a spent window is 429 `rate_limited` with `Retry-After` (the real wait, at most 10 s), never a 503.","responses":{"200":{"description":"Presigned pack download.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflineAssets"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"description":"Rate limit exceeded: this key's offline window (10 per 10 s) is spent.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"503":{"description":"Presigning not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage":{"get":{"operationId":"getUsage","summary":"Your current quota usage","description":"The calling key's own meter: units used, the binding cap, and the instant the window resets.\n\nAuthenticates with the `x-api-key` header ONLY — no `?key=` fallback, because a usage URL is likely to be pasted into a ticket or a shell history.\n\n**Never quota-blocked and never metered.** A blocked caller is exactly who needs this, so it answers at 100% of quota; and checking a meter does not move it — this call is not written to your usage and cannot consume quota. It is still subject to the per-minute rate limit.\n\nNo scope is required: a narrowly-scoped key still has a meter.","tags":["Meta"],"security":[{"ApiKeyHeader":[]}],"responses":{"200":{"description":"Current quota state for the calling key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"Key validation unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/weather/conditions":{"get":{"operationId":"getMarineConditions","summary":"Observed conditions at sea","description":"Latest **observation** from the nearest reporting NOAA NDBC station. This is a measurement, not a forecast, and it is not live — most buoys report hourly and the median observation is ~40 minutes old. `observed.ageMinutes` is on every response and must be displayed.\n\nA field a station is not reporting is **absent**, never zero: NDBC's `MM` missing-value sentinel rendered as `0` would put a false calm on a sailing display. `unavailable` names every field the station did not report.\n\nAdd `hours` for the station's recent **history** as `series`: every observation in the last `hours` hours, oldest first, each in exactly the shape of the top-level reading. NDBC's own readings at NDBC's own instants — never interpolated, smoothed, resampled or gap-filled; `cadenceMinutes` says the station's normal spacing so a client can tell a dropped report from ordinary spacing. Without `hours` the response is unchanged.\n\nU.S. waters only.\n\n**Rate limit:** 60 requests per 10 s **per client IP**, across all three `/v1/weather/*` routes — not your key's per-minute `rate_limit`. Every response carries `X-RateLimit-Limit` / `X-RateLimit-Remaining` / `X-RateLimit-Reset` for that window; a `429` carries `code: rate_limited` and `Retry-After`.","tags":["Weather"],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number","minimum":-90,"maximum":90},"description":"Decimal degrees."},{"name":"lon","in":"query","required":true,"schema":{"type":"number","minimum":-180,"maximum":180},"description":"Decimal degrees."},{"name":"units","in":"query","required":false,"schema":{"type":"string","enum":["imperial","metric"],"default":"imperial"},"description":"Wind is reported in knots under both systems — nautical convention wins."},{"name":"station","in":"query","required":false,"schema":{"type":"string"},"description":"Pin a specific NDBC station id. If it is not reporting in range the request fails with `station_out_of_range` rather than silently substituting another buoy."},{"name":"hours","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1080},"description":"Add the chosen station's last `hours` hours of readings as `series`. 1–1080 (45 days — all NDBC's per-station file holds). Omit for the current reading alone; the response is then unchanged."}],"responses":{"200":{"description":"Observed conditions from the nearest reporting station.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarineConditionsResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Edge-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Edge-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Edge-RateLimit-Reset"}}},"400":{"description":"Missing or invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the `weather:read` scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Outside U.S. waters (`out_of_coverage`), no station reporting within 250 nm (`no_station_in_range`), a pinned station not reporting (`station_out_of_range`), or — with `hours` — no published history for the chosen station (`history_unavailable`). **None of these means conditions are calm.**","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/WeatherRateLimited"},"503":{"description":"NOAA upstream unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/weather/marine-alerts":{"get":{"operationId":"getMarineAlerts","summary":"Active NWS marine warnings","description":"Active CAP warnings — Small Craft Advisory, Gale, Storm, Hurricane Force Wind, Special Marine Warning — for the marine zone containing a position.\n\n**An empty `alerts` array is not an all-clear.** It means no warning is currently in force for the zone; it is not a statement that conditions are safe, calm, or suitable for a vessel. The response deliberately carries no `safe`, `clear` or `status` field.\n\n`expires` (the bulletin lapsing) and `ends` (the hazard passing) are different and routinely hours apart. Describe the hazard with `ends`.\n\n**Rate limit:** 60 requests per 10 s **per client IP**, across all three `/v1/weather/*` routes — not your key's per-minute `rate_limit`. Every response carries `X-RateLimit-Limit` / `X-RateLimit-Remaining` / `X-RateLimit-Reset` for that window; a `429` carries `code: rate_limited` and `Retry-After`.","tags":["Weather"],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"parameters":[{"name":"lat","in":"query","required":false,"schema":{"type":"number","minimum":-90,"maximum":90},"description":"Decimal degrees."},{"name":"lon","in":"query","required":false,"schema":{"type":"number","minimum":-180,"maximum":180},"description":"Decimal degrees."},{"name":"zone","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}[0-9]{3}$"},"description":"A UGC marine zone id, e.g. ANZ250. Supply this OR lat/lon."}],"responses":{"200":{"description":"Active warnings for the zone, most severe first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarineAlertsResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Edge-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Edge-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Edge-RateLimit-Reset"}}},"400":{"description":"Missing or invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the `weather:read` scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Outside U.S. waters, outside any NWS marine zone, or nothing reporting. **None of these means conditions are calm.**","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/WeatherRateLimited"},"503":{"description":"NOAA upstream unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/weather/marine-forecast":{"get":{"operationId":"getMarineForecast","summary":"NWS marine zone forecast","description":"The NWS zone forecast for U.S. coastal and Great Lakes waters, from the issuing office's own bulletin (CWF, NSH or GLF — `source.productType` says which).\n\n**`text` on every period is authoritative; the structured fields are parsed from it.** Where they disagree the text wins, and some content — the weather sentence, for instance — exists only in the text. A field we could not parse is absent, never guessed.\n\nPeriods are NWS's own, and are neither hourly nor uniform: a single period may span days. `expires` is the forecast's own stated validity, not a TTL we invented.\n\nOffshore zones are not yet supported and return 501.\n\n**Rate limit:** 60 requests per 10 s **per client IP**, across all three `/v1/weather/*` routes — not your key's per-minute `rate_limit`. Every response carries `X-RateLimit-Limit` / `X-RateLimit-Remaining` / `X-RateLimit-Reset` for that window; a `429` carries `code: rate_limited` and `Retry-After`.","tags":["Weather"],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"parameters":[{"name":"lat","in":"query","required":false,"schema":{"type":"number","minimum":-90,"maximum":90},"description":"Decimal degrees."},{"name":"lon","in":"query","required":false,"schema":{"type":"number","minimum":-180,"maximum":180},"description":"Decimal degrees."},{"name":"zone","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}[0-9]{3}$"},"description":"A UGC marine zone id, e.g. ANZ250. Supply this OR lat/lon."}],"responses":{"200":{"description":"The zone forecast, period by period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarineForecastResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/Edge-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Edge-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Edge-RateLimit-Reset"}}},"400":{"description":"Missing or invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the `weather:read` scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Outside U.S. waters, outside any NWS marine zone, or nothing reporting. **None of these means conditions are calm.**","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/WeatherRateLimited"},"501":{"description":"Offshore zone — not yet supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"NOAA upstream unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key","description":"A CHRT API key. Format `chrt_{pk|sk}_{live|test}_{team}_{secret}`. Both `pk` and `sk` keys carry identical API power — treat any key embedded in a shipped client as public. A key with an IP allowlist (IPv4/IPv6 addresses or CIDR ranges) works only through https://api.chrt.co: CHRT's edge attests the caller's address. A request from an unlisted address is refused with 403 `ip_not_allowed`, and one that reaches CHRT any other way, including straight to the backend functions URL, with 403 `ip_allowlist_requires_gateway`. Refusals use the body `{ error, code, message }`. Tokens minted from an allowed address work from anywhere until they expire."},"ApiKeyQuery":{"type":"apiKey","in":"query","name":"key","description":"Alternative to the `x-api-key` header. Accepted on all REST data endpoints EXCEPT `POST /v1/interact/entitlement` (header only). Avoid on shared/logged URLs."},"TileToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A short-lived ES256 JWT (`aud: tiles.chrt.co`) minted by `POST /v1/mint/tile-token`. Default TTL 300s, max 900s."},"OfflineToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A short-lived ES256 JWT (`aud: offline.chrt.co`) minted by `POST /v1/mint/offline-token`."}},"headers":{"X-RateLimit-Limit":{"description":"Requests permitted in the current 60-second window. NOT sent on a monthly-quota 429 — that block is governed by the X-Quota-* set instead.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current 60-second window. NOT sent on a monthly-quota 429: it describes a different window from the one doing the blocking, and reporting headroom beside that 429 is how an integrator concludes the block is spurious.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix epoch seconds when the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-Sprite-Manifest-Hash":{"description":"Content hash of the sprite manifest this sheet was generated from.","schema":{"type":"string"}},"X-Quota-Limit":{"description":"Monthly quota for the metric. Omitted entirely when the plan is uncapped (enterprise).","schema":{"type":"integer"}},"X-Quota-Remaining":{"description":"Units left in the monthly quota. Floored at 0 — concurrent requests can each pass the check before any of them logs, so `used` may exceed `limit`.","schema":{"type":"integer"}},"X-Quota-Reset":{"description":"Unix epoch seconds when the monthly quota resets (00:00:00 UTC on the 1st of the next month).","schema":{"type":"integer"}},"X-Quota-Window":{"description":"The quota window. Always `calendar-month-utc` — the reset is the UTC calendar month boundary, NOT the team's billing-cycle anniversary.","schema":{"type":"string","enum":["calendar-month-utc"]}},"Content-Encoding":{"description":"`gzip` when the client sent `Accept-Encoding: gzip` (tiles are stored gzip-compressed); absent for identity responses.","schema":{"type":"string","enum":["gzip"]}},"X-Style-Version":{"description":"The served style's version, `MAJOR.MINOR.PATCH`: the same as the document's `metadata[\"chrt:style-version\"]` (offline: the body's `style_version`). Each change to how the served chart is drawn comes with a new version and an entry in the changelog at https://chrt.co/docs/styles#versions. A client that keeps a style compares the version it saved with the one served to know the drawing changed.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$","examples":["1.0.0"]}},"X-Style-Base":{"description":"Whether the document draws CHRT_BASE (the world basemap and the no-coverage crosshatch): `true` or `false`. Online: the resolved `base` (default on; a defaulted base with no promoted build or no grant quietly reads `false`). Offline: `true` only when `base=1` was asked for.","schema":{"type":"string","enum":["true","false"]}},"Edge-RateLimit-Limit":{"description":"Requests permitted per 10-second window **per client IP** on `/v1/weather/*` (60). Not your key's per-minute `rate_limit`: weather is not counted against it.","schema":{"type":"integer"}},"Edge-RateLimit-Remaining":{"description":"Requests remaining in this client IP's 10-second weather window. Counted at the edge location serving you, so it can differ between edge locations.","schema":{"type":"integer"}},"Edge-RateLimit-Reset":{"description":"Unix epoch seconds when the oldest request in the window ages out — when a slot frees.","schema":{"type":"integer"}},"X-Style-Symbols":{"description":"The symbol family as the request named it (lowercased; `s52` when absent). `raster` is answered as `raster`, though the document is INT-1's (`metadata[\"chrt:symbol-set\"]` is `int1`).","schema":{"type":"string","enum":["s52","s101","chrt","int1","uschart1","raster"]}},"X-Style-Look":{"description":"The look the document is drawn in. Absent when no look was requested.","schema":{"type":"string","enum":["paper","engraved","handcolored"]}},"X-Style-Lock":{"description":"The band lock the document is drawn under, canonical (`harbor`, `harbor:only`). Absent when no lock was requested.","schema":{"type":"string","enum":["overview","overview:only","general","general:only","coastal","coastal:only","approach","approach:only","harbor","harbor:only","berthing","berthing:only"]}}},"schemas":{"Error":{"type":"object","description":"Standard error envelope. `hint`, when present, states what to do next — machine consumers should surface it to the user rather than only the status code.","required":["error"],"properties":{"error":{"type":"string","description":"Stable machine-readable error code."},"message":{"type":"string","description":"Human-readable explanation."},"hint":{"type":"string","description":"What to do next."},"detail":{"type":"string","description":"A finer, stable code for what was seen, beside `error` (e.g. `api_key_not_accepted` under `missing_auth`)."}},"examples":[{"error":"bad_request","message":"point parameter is required. Format: longitude,latitude"}]},"QueryError500":{"type":"object","description":"Server-fault error from the /v1/query family. Carries a `request_id` to quote to support — the fault is on CHRT's side, so retrying the same request is reasonable.","required":["error","message","request_id"],"properties":{"error":{"type":"string","const":"internal_error"},"message":{"type":"string"},"hint":{"type":"string"},"request_id":{"type":"string","format":"uuid"}}},"MonthlyLimitError":{"type":"object","description":"Monthly plan quota exhausted (features or tiles). Distinct from the short-window rate limit: the window is the **UTC calendar month**, not the billing cycle, and it is reported by the X-Quota-* headers rather than X-RateLimit-*. Note that `used` STOPS ADVANCING once you are blocked — a rejected request is not metered — so an unchanging `used` across days is the system working, not a stuck meter. Retry at `resets_at`.","required":["error","used","resets_at","retry_after","hint"],"properties":{"error":{"type":"string","examples":["Monthly feature limit exceeded","tile_quota_exceeded"],"description":"Prose on /v1/features and /v1/query; the typed literal `tile_quota_exceeded` on /v1/mint/tile-token. Match on the status and `resets_at`, not on this string."},"limit":{"type":["integer","null"],"description":"The cap that applied — the plan quota, or this key's own lower limit. Null when uncapped."},"used":{"type":"integer","description":"Units consumed in the current calendar month. Frozen at the point of blocking; see the schema description."},"resets_at":{"type":"string","format":"date-time","description":"ISO 8601 instant the quota resets: 00:00:00 UTC on the 1st of the next month.","examples":["2026-08-01T00:00:00.000Z"]},"retry_after":{"type":"integer","description":"Seconds until `resets_at`. Mirrors the Retry-After header. Never 0."},"hint":{"type":"string","description":"Human-readable sentence naming the reset instant, why `used` is frozen, and the remedy — which differs by whether the plan quota or this key's own limit was the binding cap.","examples":["Monthly feature quota exhausted. It resets at 2026-08-01T00:00:00.000Z (the quota window is the UTC calendar month, not your billing cycle). `used` stops advancing once you are blocked, because a rejected request is not metered — a value that does not change is expected, not a stuck counter. To lift the cap before then, upgrade the plan at https://platform.chrt.co/plans, or enable overage billing in the dashboard at https://platform.chrt.co/app to keep serving past the quota."]}}},"RateLimitError":{"type":"object","description":"Short-window rate limit exceeded. Honour the `Retry-After` header.","required":["error"],"properties":{"error":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds until the window resets."},"limit":{"type":"integer","description":"Requests permitted per window."},"period_seconds":{"type":"integer","description":"The window length, in seconds."},"code":{"type":"string","description":"`rate_limited` on a gateway 429."},"hint":{"type":"string","description":"What to do next."}}},"OfflineBudgetExceeded":{"type":"object","description":"The offline storage budget (per-key or per-team) would be exceeded by this mint or download. NOTE: the discriminator key is `code`, not `error`, and the status is 429.","required":["code"],"properties":{"code":{"type":"string","const":"offline_budget_exceeded"},"level":{"type":"string","enum":["key","team"],"description":"On mint: which cap was hit."},"budget_bytes":{"type":["integer","null"]},"required_bytes":{"type":"integer"},"over_by_bytes":{"type":"integer","description":"Present on the mint variant."},"team_used_bytes":{"type":"integer","description":"Present on the mint team variant."},"remaining_bytes":{"type":"integer","description":"Present on the bundle-download variant."}}},"Feature":{"type":"object","description":"A GeoJSON Feature. `properties` carries the S-57 attributes plus CHRT breadcrumbs (`layer`, `cell_id`).","required":["type","geometry","properties"],"properties":{"type":{"type":"string","const":"Feature"},"geometry":{"type":"object","description":"GeoJSON geometry (Point/LineString/Polygon/…)."},"properties":{"type":"object","description":"S-57 attributes plus `layer` (S-57 acronym), `cell_id`, and `distance_m` on proximity queries.","additionalProperties":true}}},"FeaturesResponse":{"type":"object","description":"GET /v1/features result. `attribution` and `disclaimer` are always present.","required":["type","features","total_count","limit","offset","attribution","disclaimer"],"properties":{"type":{"type":"string","const":"FeatureCollection"},"features":{"type":"array","items":{"$ref":"#/components/schemas/Feature"}},"total_count":{"type":"integer","description":"Total matching features, not the size of this page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"attribution":{"type":"string"},"disclaimer":{"type":"string"}}},"QueryFeatureCollection":{"type":"object","description":"GET /v1/query (point-radius) result. `attribution` and `disclaimer` are always present.","required":["type","query","features","total_count","limit","attribution","disclaimer"],"properties":{"type":{"type":"string","const":"FeatureCollection"},"query":{"type":"object","properties":{"point":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"radius_m":{"type":"number"}}},"features":{"type":"array","items":{"$ref":"#/components/schemas/Feature"}},"total_count":{"type":"integer"},"limit":{"type":"integer"},"attribution":{"type":"string"},"disclaimer":{"type":"string"}}},"CoverageCell":{"type":"object","description":"One ENC cell contributing coverage, with its data currency.","required":["cell_id"],"properties":{"cell_id":{"type":"string"},"title":{"type":["string","null"]},"chart_source":{"type":["string","null"]},"scale":{"type":["integer","null"]},"scale_band":{"type":["string","null"]},"edition":{"type":["integer","null"],"description":"S-57 edition of the release CHRT holds and serves for this cell — not necessarily the newest the issuing office has published."},"update_number":{"type":["integer","null"],"description":"Incremental update within the edition CHRT holds."},"issue_date":{"type":["string","null"],"description":"Publication date of the release named by edition/update_number. Null when the date for that release is unknown; never the date of an earlier edition."}}},"CoverageBlock":{"type":"object","description":"Coverage envelope carried by the ahead and route queries. `covered: false` with an empty `features` array means the area is UNCHARTED in CHRT — it does NOT mean clear water. Never present an empty result as an all-clear.","required":["covered","cells"],"properties":{"covered":{"type":"boolean","description":"True when at least one ENC cell covers the queried area."},"covered_fraction":{"type":"number","description":"Fraction of the queried sector under CHRT coverage (ahead query only)."},"cells":{"type":"array","items":{"$ref":"#/components/schemas/CoverageCell"}}}},"AheadFeature":{"type":"object","required":["type","geometry","properties"],"properties":{"type":{"type":"string","const":"Feature"},"geometry":{"type":"object","description":"GeoJSON geometry."},"properties":{"type":"object","additionalProperties":true,"description":"S-57 attributes plus `layer`, `cell_id`, `distance_m`, `bearing_deg`, `least_depth_m`, `depth_clearance_m`. `bearing_deg`/`distance_m` are measured to the feature's NEAREST POINT, not its centroid; for polygons the nearest point can lie outside the queried arc.","properties":{"distance_m":{"type":["number","null"]},"bearing_deg":{"type":["number","null"]},"least_depth_m":{"type":["number","null"]},"depth_clearance_m":{"type":["number","null"],"description":"least_depth_m minus the caller's safety_depth. Negative = shallower than requested. Null when depth is unknown (which is treated as a hazard, not a clearance)."}}}}},"AheadFeatureCollection":{"type":"object","description":"GET /v1/query/ahead result. Returns facts that sort (distance, bearing, least depth, clearance) — never a verdict or severity. `coverage`, `attribution`, `disclaimer`, and `notice` are always present.","required":["type","query","features","total_count","limit","coverage","attribution","disclaimer","notice"],"properties":{"type":{"type":"string","const":"FeatureCollection"},"query":{"type":"object","properties":{"point":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"bearing_deg":{"type":"number"},"arc_deg":{"type":"number"},"range_m":{"type":"number"},"safety_depth_m":{"type":["number","null"]},"layers":{"type":"array","items":{"type":"string"}}}},"features":{"type":"array","items":{"$ref":"#/components/schemas/AheadFeature"}},"total_count":{"type":"integer"},"limit":{"type":"integer"},"coverage":{"$ref":"#/components/schemas/CoverageBlock"},"attribution":{"type":"string"},"disclaimer":{"type":"string"},"notice":{"type":"string"}}},"RouteFeature":{"type":"object","required":["type","geometry","properties"],"properties":{"type":{"type":"string","const":"Feature"},"geometry":{"type":"object"},"properties":{"type":"object","additionalProperties":true,"description":"S-57 attributes plus `layer`, `cell_id`, `distance_m`, `along_m` (distance along the route to the nearest approach), `least_depth_m`, `depth_clearance_m`."}}},"RouteFeatureCollection":{"type":"object","description":"GET /v1/query/route result. `coverage` (without covered_fraction), `attribution`, `disclaimer`, and `notice` are always present.","required":["type","query","features","total_count","limit","offset","coverage","attribution","disclaimer","notice"],"properties":{"type":{"type":"string","const":"FeatureCollection"},"query":{"type":"object","properties":{"route_points":{"type":"integer"},"route_length_m":{"type":["number","null"]},"buffer_m":{"type":"number"},"safety_depth_m":{"type":["number","null"]},"layers":{"type":"array","items":{"type":"string"}}}},"features":{"type":"array","items":{"$ref":"#/components/schemas/RouteFeature"}},"total_count":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"},"coverage":{"$ref":"#/components/schemas/CoverageBlock"},"attribution":{"type":"string"},"disclaimer":{"type":"string"},"notice":{"type":"string"}}},"WireCell":{"type":"object","description":"ENC cell metadata. Cell bounds are FLAT `bbox_*` fields (never nested). Every key is always present; unset values are null.","required":["cell_id","title","chart_source","scale","scale_band","edition","update_number","issue_date","status","bbox_north","bbox_south","bbox_east","bbox_west","last_checked_at"],"properties":{"cell_id":{"type":"string"},"title":{"type":["string","null"]},"chart_source":{"type":"string","description":"Source id, e.g. NOAA_ENC (not the agency name)."},"scale":{"type":["integer","null"]},"scale_band":{"type":["string","null"],"description":"Word value, e.g. Harbor (case-sensitive as a filter)."},"edition":{"type":["integer","null"],"description":"S-57 edition of the release CHRT holds and serves for this cell — not necessarily the newest the issuing office has published."},"update_number":{"type":["integer","null"],"description":"Incremental update within the edition CHRT holds."},"issue_date":{"type":["string","null"],"description":"Publication date of the release named by edition/update_number. Null when the date for that release is unknown; never the date of an earlier edition."},"status":{"type":"string"},"bbox_north":{"type":["number","null"]},"bbox_south":{"type":["number","null"]},"bbox_east":{"type":["number","null"]},"bbox_west":{"type":["number","null"]},"last_checked_at":{"type":["string","null"],"description":"A LOWER BOUND on when CHRT last checked the issuing office for this cell, not the exact time. It advances when a check produces a new release; a check that finds no change leaves no per-cell record. Read as \"no older than\", never as \"not since\". Freshness of the check, not of the chart."}}},"CellsList":{"type":"object","required":["cells","total_count","limit","offset"],"properties":{"cells":{"type":"array","items":{"$ref":"#/components/schemas/WireCell"}},"total_count":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}}},"CoverageSource":{"type":"object","required":["source","country","agency","cell_count","scale_bands"],"properties":{"source":{"type":"string","description":"Source id, e.g. NOAA_ENC."},"country":{"type":"string","description":"ISO 3166-1 alpha-2."},"agency":{"type":"string","description":"Issuing hydrographic office, e.g. NOAA."},"cell_count":{"type":"integer"},"scale_bands":{"type":"object","additionalProperties":{"type":"integer"},"description":"Band name → cell count."}}},"CoverageSummary":{"type":"object","required":["sources","total_cells","disclaimer"],"properties":{"sources":{"type":"array","items":{"$ref":"#/components/schemas/CoverageSource"}},"total_cells":{"type":"integer"},"disclaimer":{"type":"string"}}},"CoverageRouteResponse":{"type":"object","description":"GET /v1/coverage/route result — the ENC cells covering a passage. `attribution`, `disclaimer`, and `notice` are always present.","required":["cells","query","total_count","limit","attribution","disclaimer","notice"],"properties":{"cells":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/CoverageCell"},{"type":"object","properties":{"bbox_north":{"type":["number","null"]},"bbox_south":{"type":["number","null"]},"bbox_east":{"type":["number","null"]},"bbox_west":{"type":["number","null"]},"distance_m":{"type":"number"}}}]}},"query":{"type":"object","properties":{"route_points":{"type":"integer"},"buffer_m":{"type":"number"},"scale_band":{"type":["string","null"]},"cell_count":{"type":"integer"}}},"total_count":{"type":"integer","description":"Equal to cells.length (this endpoint does not paginate beyond limit)."},"limit":{"type":"integer"},"attribution":{"type":"string"},"disclaimer":{"type":"string"},"notice":{"type":"string"}}},"TileTokenResponse":{"type":"object","required":["token","expires_at","kid","build_tag","region"],"properties":{"token":{"type":"string","description":"ES256 JWT for the Authorization: Bearer header on tiles/styles."},"expires_at":{"type":"integer","description":"Unix epoch seconds."},"kid":{"type":"string"},"build_tag":{"type":"string","description":"Build id of the REQUESTED region. Names the chart only - see build_tags before keying a cache on it."},"build_tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Build id per region this token can fetch, build_tag included. CHRT_LAND and CHRT_RELIEF ride a chart token and are promoted on their own schedule, so a cache keyed on build_tag alone is blind to a land-only cutover and serves the previous land build indefinitely. Key per-region caches on build_tags[region]; a region absent from the map has no servable build and must not be cached. Always non-empty."},"region":{"type":"string"},"style_id":{"type":"string","description":"Present only when the key has a bound custom style."},"style_applied":{"type":"boolean"},"style_reason":{"type":"string","enum":["plan_gated","style_not_found","style_not_owned","resolution_failed"],"description":"Present only when style_applied is false."}}},"OfflineRegion":{"type":"object","description":"One offline region. Shared by the mint response and GET /v1/offline/regions — mint echoes the catalogue verbatim, so the two can never disagree. `mbtiles_bytes` is the canonical download size; `total_bytes` is a deprecated alias of the same value.","required":["region","build_id","build_tag","mbtiles_bytes"],"properties":{"region":{"type":"string"},"build_id":{"type":"string"},"build_tag":{"type":"string"},"mbtiles_bytes":{"type":["integer","null"],"description":"Byte size of the MBTiles bundle the client will download."},"total_bytes":{"type":["integer","null"],"deprecated":true,"description":"Legacy alias of mbtiles_bytes."},"sha256":{"type":["string","null"],"description":"Lowercase hex SHA-256 of the bundle."},"issued_at":{"type":["integer","null"],"description":"Unix epoch seconds."},"outline":{"oneOf":[{"$ref":"#/components/schemas/OfflineRegionOutlineRef"},{"type":"null"}],"description":"The build's published coverage outline. `null` — or absent, on a response from before outlines shipped — means NOT PUBLISHED: the build predates outlines, or its document did not validate. It is never an empty or whole-world extent; a client must not draw a stand-in. The geometry is at `outline.href`."}}},"OfflineTokenResponse":{"type":"object","required":["token","expires_at","kid","offline_until","regions","grace_period_days"],"properties":{"token":{"type":"string"},"expires_at":{"type":"integer","description":"Unix epoch seconds (token expiry)."},"kid":{"type":"string"},"offline_until":{"type":"integer","description":"Unix epoch seconds — bundles remain valid offline until this time."},"regions":{"type":"array","items":{"$ref":"#/components/schemas/OfflineRegion"}},"grace_period_days":{"type":"integer","const":60}}},"OfflineRegionsResponse":{"type":"object","required":["regions","unavailable","offline_until","heartbeat_after","server_time"],"properties":{"regions":{"type":"array","items":{"$ref":"#/components/schemas/OfflineRegion"}},"unavailable":{"type":"array","items":{"type":"string"},"description":"Licensed chart producers with no current offline build. Never lists area, land or basemap bundles — an unbuilt one of those is simply absent from `bundles[]`."},"offline_until":{"type":"integer"},"heartbeat_after":{"type":"integer","description":"When you SHOULD next heartbeat if online. Not a deadline — missing it does nothing on its own."},"server_time":{"type":"integer"},"bundles":{"type":"array","items":{"$ref":"#/components/schemas/OfflineBundleEntry"},"description":"Every bundle this token can download (ADR 0037) — read this instead of `regions[]` in new clients. Includes CHRT_BASE for EVERY token, once, whenever a build is published. `regions[]` keeps its one-row-per-producer shape for shipped clients and never lists area, land or basemap bundles."}}},"OfflineBundle":{"type":"object","required":["region","build_id","build_tag","signed_url","expires_at","mbtiles_bytes","sha256","offline_until","heartbeat_after","server_time"],"properties":{"region":{"type":"string"},"build_id":{"type":"string"},"build_tag":{"type":"string"},"signed_url":{"type":"string","format":"uri","description":"Presigned R2 GET at host https://{account}.r2.cloudflarestorage.com — a THIRD-PARTY domain a native client must allowlist (e.g. iOS ATS). Supports HTTP Range (206) for resume. Verify the download against `sha256`. Re-request this endpoint for a fresh URL after `expires_at`."},"expires_at":{"type":"integer","description":"Unix epoch seconds; the signed_url TTL is 900 seconds."},"mbtiles_bytes":{"type":"integer","description":"Size of the artefact `signed_url` points at. Named for MBTiles because shipped SDKs read it; under `format=pmtiles` it is the PMTiles size. Prefer `bytes` + `format`."},"bytes":{"type":"integer","description":"Size of the artefact `signed_url` points at (the format in `format`). Same value as `mbtiles_bytes`."},"sha256":{"type":["string","null"],"description":"Lowercase hex SHA-256 of the artefact in `format`. Verify the download against it."},"offline_until":{"type":"integer"},"heartbeat_after":{"type":"integer"},"server_time":{"type":"integer"},"format":{"type":"string","enum":["mbtiles","pmtiles"],"description":"Which artefact `signed_url` points at."},"source":{"type":"string"},"kind":{"type":"string","enum":["producer","area","basemap"]},"issued_at":{"type":["integer","null"]},"minzoom":{"type":["integer","null"]},"maxzoom":{"type":["integer","null"]},"basemap":{"oneOf":[{"$ref":"#/components/schemas/OfflineBasemap"},{"type":"null"}],"description":"CHRT_BASE only: terms, credit and layer contract."}}},"OfflineStyle":{"type":"object","required":["region","palette","protocol","symbols","build_id","build_tag","attribution","disclaimer","style_version","style","offline_until","heartbeat_after","server_time"],"properties":{"region":{"type":"string"},"palette":{"type":"string","enum":["DAY","DUSK","NIGHT","EINK_COLOR","EINK_MONO","EINK_NIGHT"]},"protocol":{"type":"string","enum":["mbtiles","file"]},"symbols":{"type":"string","enum":["s52","s101","chrt","int1","uschart1","raster"]},"look":{"type":["string","null"],"enum":["paper","engraved","handcolored",null],"description":"The look the style is drawn in (canonical id), or null for the plain chart."},"build_id":{"type":"string"},"build_tag":{"type":"string"},"attribution":{"type":"string","description":"The issuing hydrographic office's credit for the chart, the same string as `style.metadata[\"chrt:attribution\"]` and the chart source's `attribution`. Show it wherever the chart is shown."},"disclaimer":{"type":"string","description":"The non-navigation disclaimer, the same string as `style.metadata[\"chrt:disclaimer\"]`. CHRT is for situational awareness only, not for primary navigation."},"style":{"type":"object","description":"A MapLibre GL style whose sources point at mbtiles:// or file:// URLs for offline use."},"offline_until":{"type":"integer"},"heartbeat_after":{"type":"integer"},"server_time":{"type":"integer"},"source":{"type":"string","description":"The producer the style was generated for (an area's style is its producer's)."},"kind":{"type":"string","enum":["producer","area"]},"style_version":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$","description":"The style's version, the same as `style.metadata[\"chrt:style-version\"]` and the `X-Style-Version` header. Compare it with the version you saved to know the drawing changed."},"mode":{"type":"string"},"lock":{"type":["string","null"],"enum":["overview","overview:only","general","general:only","coastal","coastal:only","approach","approach:only","harbor","harbor:only","berthing","berthing:only",null],"description":"The band lock the style is drawn under (canonical), or null."},"lock_min_zoom":{"type":["number","null"],"description":"Where the client stops zoom-out under a lock (the band's floor − 2), or null with no lock. A style document cannot set a map's minimum zoom."},"base":{"type":"boolean","description":"Whether the style draws a local CHRT_BASE bundle."},"base_bundle":{"oneOf":[{"type":"object","required":["bundle","schema","tiles","layers","minzoom","maxzoom","attribution","raster_before_id"],"properties":{"bundle":{"type":"string","const":"CHRT_BASE"},"schema":{"type":"string","const":"chrt.basemap-bundle/1"},"tiles":{"type":"string","description":"The URL the style's CHRT_BASE source reads, e.g. `mbtiles://CHRT_BASE.mbtiles`. Serve your local bundle there."},"layers":{"type":"array","items":{"type":"string"}},"minzoom":{"type":"integer"},"maxzoom":{"type":"integer"},"attribution":{"type":"string"},"raster_before_id":{"type":"string"}}},{"type":"null"}],"description":"When `base` is true: what the style expects on the device. Null otherwise."}}},"HeartbeatRequest":{"type":"object","required":["device_id","regions","total_bytes"],"properties":{"device_id":{"type":"string","minLength":1,"maxLength":128,"description":"Stable per-install id. snake_case on the wire; the SDK's `deviceId` config maps to it."},"regions":{"type":"array","items":{"type":"string"},"description":"Regions currently held on the device. May be empty."},"total_bytes":{"type":"integer","minimum":0},"last_sync":{"type":["string","null"]},"sdk_version":{"type":["string","null"]},"platform":{"type":["string","null"]}}},"HeartbeatResponse":{"type":"object","required":["offline_until","heartbeat_after","server_time","grace_period_days"],"properties":{"offline_until":{"type":"integer","description":"Unix epoch seconds — a successful heartbeat buys 60 days of fully offline validity from now."},"heartbeat_after":{"type":"integer"},"server_time":{"type":"integer"},"grace_period_days":{"type":"integer","const":60}}},"EntitlementResponse":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"},"plan":{"type":["string","null"]}}},"StatusResponse":{"type":"object","required":["aggregate","components","page_url","source","updated_at"],"properties":{"aggregate":{"type":"string","enum":["operational","degraded","incident","updating","maintenance","unknown"]},"components":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string"}}}},"page_url":{"type":"string"},"source":{"type":"string"},"updated_at":{"type":"string"}}},"HealthResponse":{"type":"object","required":["status","timestamp"],"properties":{"status":{"type":"string","const":"ok"},"timestamp":{"type":"string","format":"date-time"}}},"RootIndex":{"type":"object","description":"The self-describing API index. `additionalProperties` is true; the load-bearing keys are typed here.","additionalProperties":true,"properties":{"name":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"disclaimer":{"type":"string"},"attribution":{"type":"string"},"documentation":{"type":"string"},"openapi":{"type":"string"},"endpoints":{"type":"object"},"links":{"type":"object"}}},"TileJson":{"type":"object","description":"TileJSON 3.0.0 for a region. `disclaimer` and `attribution` are always present.","required":["tilejson","tiles","disclaimer","attribution"],"properties":{"tilejson":{"type":"string","const":"3.0.0"},"name":{"type":"string"},"description":{"type":"string"},"disclaimer":{"type":"string"},"attribution":{"type":"string"},"scheme":{"type":"string","const":"xyz"},"tiles":{"type":"array","items":{"type":"string"}},"minzoom":{"type":"integer"},"maxzoom":{"type":"integer"},"bounds":{"type":"array","items":{"type":"number"}},"build_tag":{"type":"string"},"vector_layers":{"type":"array","description":"Vector archives only: every source-layer in the tiles and its attributes, from the archive's own metadata (TileJSON 3.0.0). `fields` maps attribute name to type (`Number`, `String`, `Boolean`, `Mixed`). Absent on raster archives, and on the rare request where the archive's metadata couldn't be read.","items":{"type":"object","required":["id","fields"],"properties":{"id":{"type":"string","description":"Source-layer name, e.g. `DEPARE`."},"fields":{"type":"object","additionalProperties":{"type":"string"}},"description":{"type":"string"},"minzoom":{"type":"integer"},"maxzoom":{"type":"integer"}}}}}},"SpriteIndex":{"type":"object","description":"Standard GL sprite index: image name to sheet coordinates. Entries with sdf:true are signed-distance-style alpha images the renderer tints via icon-color (the chrt family's colour-true bodies).","additionalProperties":{"type":"object","required":["x","y","width","height","pixelRatio"],"properties":{"x":{"type":"integer"},"y":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"},"pixelRatio":{"type":"integer"},"sdf":{"type":"boolean"}}}},"SpriteError":{"type":"object","required":["error"],"properties":{"error":{"type":"string","enum":["sprite_not_found","sprite_not_deployed"]},"requested":{"type":"string"},"valid":{"type":"array","items":{"type":"string"}},"hint":{"type":"string"}}},"OfflineAssets":{"type":"object","description":"Presigned download for the chart-assets pack: everything an offline chart needs to render symbols and text with zero network. Zip layout: sprite/{sheet}(@2x).(json|png) and glyphs/{fontstack}/{range}.pbf (fontstacks \"Open Sans Regular\", \"Open Sans Italic\" and \"Open Sans Semibold\", ranges 0-255, 256-511, 512-767, 768-1023, 7680-7935 and 8192-8447 — every range the served styles' text layers request, derived from the full NOAA name corpus; 512-767 carries U+02BB ʻOKINA) — download, verify sha256, unzip beside the MBTiles bundle, and serve entries through the same local protocol handler as the tiles (the offline style's sprite and glyphs URLs point at {protocol}://assets/...).","required":["signed_url","expires_at","bytes","sha256","entries","manifest_hash","offline_until","heartbeat_after","server_time"],"properties":{"signed_url":{"type":"string","description":"Presigned R2 GET at https://{account}.r2.cloudflarestorage.com — a third-party host native clients must allowlist (iOS ATS). TTL 900 s; re-request on expiry. Supports HTTP Range (206) for resume."},"expires_at":{"type":"integer","description":"Unix seconds when signed_url stops working."},"bytes":{"type":"integer"},"sha256":{"type":"string"},"entries":{"type":"integer"},"manifest_hash":{"type":"string","description":"Matches X-Sprite-Manifest-Hash on the online sprite endpoints."},"offline_until":{"type":"integer"},"heartbeat_after":{"type":"integer"},"server_time":{"type":"integer"}}},"UsageQuota":{"type":"object","required":["used","limit","remaining","blocked"],"description":"One meter. `limit`/`remaining`/`percent_used` are null when the plan is uncapped (enterprise) — null means no cap, NOT nothing left.","properties":{"used":{"type":"integer","description":"Units consumed in the current window. Stops advancing once `blocked` is true, because a refused request is not metered."},"limit":{"type":["integer","null"],"description":"The binding cap — the more restrictive of the key's own limit and the plan quota. Null = uncapped."},"remaining":{"type":["integer","null"]},"percent_used":{"type":["number","null"]},"blocked":{"type":"boolean","description":"True when this meter is currently refusing requests."},"source":{"type":["string","null"],"description":"Which cap `limit` came from: `key_limit` or `plan_quota`. A `plan_quota` block is lifted by upgrading; a `key_limit` block is NOT — raise that key's own limit instead."}}},"UsageResponse":{"type":"object","required":["key_id","window","quotas","enforcement"],"properties":{"key_id":{"type":"string","format":"uuid"},"plan":{"type":["string","null"]},"window":{"type":"object","required":["start","resets_at","type"],"properties":{"start":{"type":"string","format":"date-time"},"resets_at":{"type":"string","format":"date-time","description":"Instant the counters return to zero."},"type":{"type":"string","enum":["calendar-month-utc"],"description":"The quota window is the UTC calendar month — NOT the billing cycle."}}},"quotas":{"type":"object","required":["tiles","features"],"properties":{"tiles":{"$ref":"#/components/schemas/UsageQuota"},"features":{"$ref":"#/components/schemas/UsageQuota"}}},"enforcement":{"type":"string","enum":["hard_block","soft_overage"]},"overage_active":{"type":"boolean"},"notice":{"type":"string"}}},"WeatherReading":{"type":"object","description":"A measured value with its unit. Absent entirely when the station is not reporting it.","required":["value","unit"],"properties":{"value":{"type":"number"},"unit":{"type":"string"}}},"MarineConditionsResponse":{"type":"object","description":"GET /v1/weather/conditions result. `attribution` and `disclaimer` are always present.","required":["query","station","observed","conditions","unavailable","units","dataQuality","attribution","disclaimer"],"properties":{"query":{"type":"object","properties":{"lat":{"type":"number"},"lon":{"type":"number"}}},"station":{"type":"object","required":["id","lat","lon","distanceNm","bearingDeg"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"owner":{"type":"string","description":"Operating organisation, when it differs from NDBC."},"type":{"type":"string"},"lat":{"type":"number"},"lon":{"type":"number"},"distanceNm":{"type":"number"},"bearingDeg":{"type":"integer","minimum":0,"maximum":360}}},"observed":{"type":"object","required":["time","ageMinutes"],"properties":{"time":{"type":"string","format":"date-time"},"ageMinutes":{"type":"integer","minimum":0,"description":"**Display this.** A readout that looks live but is 90 minutes stale is worse than one that says so."}}},"conditions":{"type":"object","description":"Only what the station actually reported. A missing key means not reported — never zero.","additionalProperties":{"$ref":"#/components/schemas/WeatherReading"}},"unavailable":{"type":"array","items":{"type":"string"},"description":"Every field this station did not report, named explicitly rather than left to be inferred."},"nearby":{"type":"array","description":"Alternative stations, nearest first. Never includes the chosen station.","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"distanceNm":{"type":"number"},"bearingDeg":{"type":"integer"},"reports":{"type":"array","items":{"type":"string"}},"ageMinutes":{"type":"integer"}}}},"units":{"type":"string","enum":["imperial","metric"]},"dataQuality":{"type":"string","enum":["live","degraded"],"description":"`degraded` when the reading is over 2 hours old. Still returned — a real old reading beats nothing offshore — but present it as stale."},"series":{"$ref":"#/components/schemas/ConditionsSeries"},"attribution":{"type":"string","description":"Credit for the data, assembled from the source. **Display it. Do not hardcode it** — it varies per station and product."},"disclaimer":{"type":"string","description":"Safety and provenance text. Display it verbatim."}}},"MarineAlert":{"type":"object","required":["id","event","severity","urgency","certainty","vtec"],"properties":{"id":{"type":"string"},"event":{"type":"string","description":"NWS's own product name, verbatim — 'Small Craft Advisory', 'Gale Warning'. A display string, not an enum."},"severity":{"type":"string","enum":["extreme","severe","moderate","minor","unknown"],"description":"CAP `severity`, lower-cased (`Severe` → `severe`)."},"urgency":{"type":"string","enum":["immediate","expected","future","past","unknown"]},"certainty":{"type":"string","enum":["observed","likely","possible","unlikely","unknown"]},"messageType":{"type":"string"},"onset":{"type":"string","format":"date-time","description":"When the hazard begins."},"effective":{"type":"string","format":"date-time","description":"When the alert was issued."},"expires":{"type":"string","format":"date-time","description":"When the **bulletin** lapses. Use only to decide when to re-fetch."},"ends":{"type":"string","format":"date-time","description":"When the **hazard** is expected to be over. Use this to describe the hazard."},"headline":{"type":"string"},"description":{"type":"string"},"instruction":{"type":"string","description":"NWS's own advice to mariners. Display verbatim; do not paraphrase."},"senderName":{"type":"string"},"areaDesc":{"type":"string"},"sent":{"type":"string","format":"date-time","description":"When NWS sent this message (CAP `sent`). A `CON` re-issue gets a new `id`, so order messages about one event by this."},"status":{"type":"string","description":"CAP message status in CAP's own case: `Actual`, `Exercise`, `System`, `Test`, `Draft`. Anything but `Actual` is not a warning in force. Not a verdict on conditions."},"vtec":{"type":"array","items":{"type":"string"},"description":"P-VTEC strings, verbatim (CAP `parameters.VTEC`), e.g. `/O.CON.KBOX.SC.Y.0123.000000T0000Z-261121T1100Z/`. The action code (`NEW`, `CON`, `EXT`, `UPG`, `CAN`, `EXP`, …) is the only field that says whether the event is still in force; `EXP` means \"expires at the stated end\", not \"already over\". `[]` when NWS sends none."}}},"MarineAlertsResponse":{"type":"object","description":"GET /v1/weather/marine-alerts result. `attribution` and `disclaimer` are always present.","required":["query","zone","alerts","checkedAt","attribution","disclaimer"],"properties":{"query":{"type":"object","properties":{"lat":{"type":"number"},"lon":{"type":"number"},"zone":{"type":"string"}}},"zone":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["coastal","offshore"]},"office":{"type":"string"}}},"alerts":{"type":"array","items":{"$ref":"#/components/schemas/MarineAlert"},"description":"Most severe first. **Empty is not an all-clear** — see the endpoint description."},"checkedAt":{"type":"string","format":"date-time","description":"When CHRT last asked NWS. Judge staleness from this rather than assuming the response is instantaneous."},"attribution":{"type":"string","description":"Credit for the data, assembled from the source. **Display it. Do not hardcode it** — it varies per station and product."},"disclaimer":{"type":"string","description":"Safety and provenance text. Display it verbatim."}}},"MarineForecastPeriod":{"type":"object","required":["label","text"],"properties":{"label":{"type":"string","description":"NWS's own period label, verbatim — `OVERNIGHT`, `TUE NIGHT`, `WED NIGHT THROUGH THU NIGHT`. Not hourly and not uniform."},"text":{"type":"string","description":"**Authoritative.** NWS's own sentence for this period. Where the parsed fields below disagree with it, this wins."},"wind":{"type":"object","properties":{"from":{"type":"string","description":"Compass abbreviation, e.g. SW."},"minKn":{"type":"number","description":"Absent when NWS stated only an upper bound ('less than 10 knots'). Absent means unknown — never render it as 0."},"maxKn":{"type":"number"},"gustKn":{"type":"number"},"shift":{"type":"string","description":"A stated mid-period change, e.g. 'becoming SW'."},"variable":{"type":"boolean","description":"True for 'light and variable', where direction is not meaningful."}}},"seas":{"type":"object","properties":{"minFt":{"type":"number","description":"**Significant** wave height — mean of the highest 1/3."},"maxFt":{"type":"number","description":"**Significant** wave height — mean of the highest 1/3."},"occasionalFt":{"type":"number","description":"**Occasional** wave height — mean of the highest **1/10**. Great Lakes products only. A DIFFERENT quantity from the range above and never to be averaged into it: in 'Waves 2 to 4 ft … occasionally to 8 ft', the 8 ft wave is the one that knocks a small boat down."}}},"swell":{"type":"array","description":"Individual swell trains, where the product publishes them.","items":{"type":"object","required":["from","heightFt","periodS"],"properties":{"from":{"type":"string"},"heightFt":{"type":"number"},"periodS":{"type":"number"}}}}}},"MarineForecastResponse":{"type":"object","description":"GET /v1/weather/marine-forecast result. `attribution` and `disclaimer` are always present.","required":["query","zone","dataQuality","headlines","periods","source","attribution","disclaimer","sections","raw"],"properties":{"query":{"type":"object","properties":{"lat":{"type":"number"},"lon":{"type":"number"},"zone":{"type":"string"}}},"zone":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"office":{"type":"string"},"alsoCovers":{"type":"array","items":{"type":"string"},"description":"Other zones this same bulletin forecasts for. The text was written for that whole area, not for one position."},"bbox":{"type":"array","items":{"type":"number"},"minItems":4,"maxItems":4,"description":"`[west, south, east, north]` of the zone in WGS84 degrees, from the same build the `NWS_MARINE_ZONES` tile source draws. **A camera hint — fit the map to it; never draw it as the zone**: a coastal zone's box encloses land and water the forecast does not cover. `west > east` means the box crosses 180° (RFC 7946 §5.2). Absent for a zone the current build does not contain.","example":[-70.5814,42.0071,-69.6243,42.8683]}}},"issued":{"type":"string","format":"date-time"},"expires":{"type":"string","format":"date-time","description":"The forecast's OWN stated validity, from the bulletin's UGC line — not a TTL CHRT invented."},"dataQuality":{"type":"string","enum":["live","degraded"],"description":"`degraded` past `expires`, computed when you read rather than when CHRT fetched."},"headlines":{"type":"array","items":{"type":"string"},"description":"Hazard headline text from before the first period (`SMALL CRAFT ADVISORY IN EFFECT…`), reproduced as **narrative only**. No severity, no timing, and may lag. Warnings come from /v1/weather/marine-alerts. A section heading (a bar forecast's) is never filed here; see `sections`."},"periods":{"type":"array","items":{"$ref":"#/components/schemas/MarineForecastPeriod"}},"sections":{"type":"array","description":"Prose the office wrote after the periods, verbatim: a bar forecast (`SAN FRANCISCO BAR/FOURFATHOM BANK FORECAST` → \"ACROSS THE BAR…\"), a Great Lakes pointer to the open-lakes forecast (`heading: null`). `[]` when there is none.","items":{"type":"object","required":["heading","paragraphs"],"properties":{"heading":{"type":["string","null"],"description":"The heading as written, dots stripped; null for prose with no heading."},"paragraphs":{"type":"array","items":{"type":"string"},"description":"Paragraphs as written, each rejoined across NWS's line wraps."}}}},"raw":{"type":"string","description":"This zone's block of the NWS bulletin, verbatim, from its UGC line to the end of the block. Everything else on the response is parsed from it; where they disagree, this wins."},"source":{"type":"object","required":["productId","productType","office"],"properties":{"productId":{"type":"string","description":"The upstream NWS product. Use it to verify CHRT against NOAA directly."},"productType":{"type":"string","enum":["CWF","NSH","GLF","OFF"]},"office":{"type":"string"},"wmoId":{"type":"string"}}},"attribution":{"type":"string","description":"Credit for the data, assembled from the source. **Display it. Do not hardcode it** — it varies per station and product."},"disclaimer":{"type":"string","description":"Safety and provenance text. Display it verbatim."}}},"SearchHit":{"type":"object","required":["name","lon","lat","bbox","layer","kind","class","rank","lnam","cell_id","chart_source","match"],"properties":{"name":{"type":"string","description":"The OBJNAM verbatim, exactly as the hydrographic office charted it. Never folded, never title-cased.","example":"Cuttyhunk Harbor Channel"},"lon":{"type":"number","description":"Longitude of a point GUARANTEED to lie inside real charted geometry carrying this name — never a bbox centroid, which can land outside a concave area or on land."},"lat":{"type":"number"},"bbox":{"type":"array","items":{"type":"number"},"minItems":4,"maxItems":4,"description":"[west, south, east, north] — the union of every charted instance of this place, so a camera fit covers the whole thing rather than one cell's slice of it. DEGENERATE (west==east, south==north) for a point feature. Never null."},"layer":{"type":"string","description":"S-57 layer acronym.","example":"FAIRWY"},"kind":{"type":"string","enum":["place","object"],"description":"`place` = water or ground you can BE IN. `object` = a thing AT a position. Getting this wrong is how a consumer tells a skipper they are \"in Boston South Channel Buoy 11\"."},"class":{"type":"string","description":"Short human label to render next to the name.","example":"Fairway"},"rank":{"type":"string","enum":["primary","secondary"],"description":"`secondary` marks survey and utility descriptors — dredged-area names like \"51-Foot Outer Harbor Confluence RIQ\", pipelines, cables, recommended tracks. Always searchable, never sorted above a `primary` hit in the same match tier."},"aliases":{"type":"array","items":{"type":"string"},"description":"Composed colloquial names for buoys and beacons — what a skipper says out loud, which is never the charted name. \"South River Buoy 16\" carries [\"red 16\",\"r16\",\"red nun 16\"]. Empty for everything else. These are matched by `q` at the same tiers as the name.","example":["red 16","r16","red nun 16"]},"lnam":{"type":"string","description":"S-57 long name of the largest-scale instance — a stable handle for re-resolving this hit against /v1/features or CHRTinteract. NOT a de-duplication key: the same place carries a different LNAM in every cell that charts it (measured: 25 instances of \"Vineyard Sound\", 25 distinct LNAMs).","example":"0226B2C1423E20C5"},"cell_id":{"type":"string","example":"US5MA1EJ"},"chart_source":{"type":"string","example":"NOAA_ENC"},"edition":{"type":["integer","null"],"description":"Data currency of the source cell, inline — so a result row can be rendered without a per-hit /v1/cells call."},"update_number":{"type":["integer","null"]},"issue_date":{"type":["string","null"],"format":"date"},"scale":{"type":["integer","null"],"description":"Compilation scale denominator of the source cell."},"scamin":{"type":["integer","null"],"description":"S-57 minimum display scale, where the feature carries one."},"distance_m":{"type":"integer","description":"Metres from `near`. ABSENT (not null) when `near` was not supplied, so a client can tell \"no origin\" from \"zero distance\"."},"bearing_deg":{"type":"number","description":"True bearing from `near`, degrees. Geodesic, not planar. Absent when `near` was not supplied."},"match":{"type":"string","enum":["exact","prefix","all_words","substring","fuzzy"],"description":"Which tier matched, so the on-screen order can be explained. `fuzzy` appears only when nothing matched at the four stricter tiers."}}},"SearchResponse":{"type":"object","required":["results","total_count","limit","offset","attribution","disclaimer"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"total_count":{"type":"integer","description":"EXACT count of all matches, not an estimate and not the returned page."},"limit":{"type":"integer"},"offset":{"type":"integer"},"coverage":{"type":"object","description":"Present whenever a supplied `near`/`bbox` falls OUTSIDE CHRT's coverage for the caller's licensed sources — with or without results. The notice is about the POSITION, not about the result set being empty: a query can match places by name thousands of kilometres away while CHRT holds nothing where the caller actually is, and that combination is the most misleading one to return silently. When results accompany it they matched by NAME only and their `distance_m` is measured from a position CHRT cannot chart. Absent means the position is inside coverage, or no position was given — so an empty `results` with no `coverage` block is a genuine in-coverage miss. Never a statement that a place does not exist, and never a statement that the water is clear.","required":["covered","code","message"],"properties":{"covered":{"type":"boolean","enum":[false]},"code":{"type":"string","enum":["outside_coverage"]},"message":{"type":"string"},"chart_sources":{"type":["array","null"],"items":{"type":"string"}}}},"attribution":{"type":"string"},"disclaimer":{"type":"string"}}},"SearchError":{"type":"object","required":["error","code","parameter","message"],"properties":{"error":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["unknown_parameter","missing_parameter","invalid_parameter"]},"parameter":{"type":"string","description":"The parameter at fault. ALWAYS present — naming it is the whole point.","example":"colour"},"message":{"type":"string"},"hint":{"type":"string"}},"description":"The 400 shape for /v1/search and /v1/poi: the offending parameter is always named."},"Poi":{"type":"object","required":["id","name","category","lon","lat","bbox","layer","cell_id","chart_source","members"],"properties":{"id":{"type":"string","description":"LNAM of the largest-scale charted instance of this facility — the instance you meet following it into /v1/features. Stable while that feature survives in its cell; a re-issued cell can retire it. Never use for cross-cell grouping (that is done server-side)."},"name":{"type":["string","null"],"description":"OBJNAM verbatim from the chart, or null — ~6% of charted marinas carry no name. Null is honest absence, never invented."},"category":{"type":"string","enum":["marina"],"description":"CHRT's category axis. v1: marina (HRBFAC with CATHAF including 5)."},"lon":{"type":"number"},"lat":{"type":"number"},"bbox":{"type":"array","items":{"type":"number"},"minItems":4,"maxItems":4,"description":"[west,south,east,north] — union of every charted instance's envelope. Degenerate (west === east) for a point feature, never null."},"layer":{"type":"string","description":"Source S-57 layer (HRBFAC in v1)."},"cell_id":{"type":"string","description":"Source cell of the representative instance."},"chart_source":{"type":"string","description":"Issuing authority's source id (e.g. NOAA_ENC, USACE_IENC). Per-POI, because one viewport can span authorities."},"edition":{"type":["integer","null"],"description":"Source cell currency, inline — no per-row /v1/cells call needed."},"update_number":{"type":["integer","null"]},"issue_date":{"type":["string","null"],"format":"date"},"members":{"type":"integer","minimum":1,"description":"Charted instances merged into this row by the server-side de-duplication."},"distance_m":{"type":"integer","description":"Metres from `near`. Present only in near mode — absent, not null, in bbox mode."}}},"PoiResponse":{"type":"object","required":["pois","total_count","limit","offset","coverage","dataset","attribution","disclaimer"],"properties":{"pois":{"type":"array","items":{"$ref":"#/components/schemas/Poi"}},"total_count":{"type":"integer","description":"Exact count of all matches — not an estimate, not the page length."},"limit":{"type":"integer","description":"The limit that actually ran (clamps are echoed)."},"offset":{"type":"integer"},"coverage":{"type":"object","required":["state","message"],"description":"ALWAYS present. Names what an empty result means for THIS request. covered: the whole queried area is charted — empty = no facilities charted. partial: results speak only for the charted part. none: CHRT cannot answer here — says nothing about the area.","properties":{"state":{"type":"string","enum":["covered","partial","none"]},"message":{"type":"string","description":"Relay-ready sentence for the state. Written so a client can show it unedited."},"chart_sources":{"type":["array","null"],"items":{"type":"string"},"description":"The licence gate the state was computed under; null = no source gate (world coverage)."}}},"dataset":{"type":"object","description":"What this data IS — in the payload, not only the docs, because clients must not hardcode a source.","properties":{"source":{"type":"string","enum":["ENC"]},"derived_from":{"type":"string"},"categories":{"type":"array","items":{"type":"string"},"description":"Every category the dataset currently serves."},"updated_at":{"type":["string","null"],"format":"date-time","description":"When the POI table was last rebuilt against the ENC corpus (daily). Per-POI currency is the source cell's edition/update_number/issue_date."}}},"attribution":{"type":"string","description":"Issuing hydrographic offices for your licensed sources. Display it."},"disclaimer":{"type":"string"}}},"OfflineRegionOutlineRef":{"type":"object","description":"Summary of a build's coverage outline, as the catalogue carries it. The same block describes any offline bundle — a whole producer dataset today, a smaller regional bundle later.","required":["schema","href","bytes","sha256","bbox","cell_count","cells_without_coverage"],"properties":{"schema":{"type":"string","const":"chrt.offline-outline/1","description":"Document schema. Refuse any other value."},"href":{"type":"string","description":"Path of the GeoJSON on the offline worker, e.g. `/v1/regions/NOAA_ENC/outline` on offline.chrt.co (also reachable as `/v1/offline/regions/{region}/outline` on api.chrt.co).","example":"/v1/regions/NOAA_ENC/outline"},"bytes":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Lowercase hex SHA-256 of the GeoJSON document; also its ETag."},"bbox":{"type":["array","null"],"items":{"type":"number"},"minItems":4,"maxItems":4,"description":"`[west, south, east, north]` of the outline geometry. `null` when no cell in the build publishes an M_COVR coverage polygon (the outline then draws nothing)."},"cell_count":{"type":"integer","minimum":0,"description":"ENC cells in this build."},"cells_without_coverage":{"type":"integer","minimum":0,"description":"Cells in this build that publish no M_COVR CATCOV=1 polygon and are therefore NOT drawn by the outline. Say how many; never draw a stand-in."}}},"OfflineRegionOutline":{"type":"object","description":"A GeoJSON Feature: the union of the M_COVR (CATCOV=1) coverage polygons of every ENC cell in one offline build, simplified for display. It shows where the build HAS DATA and says nothing about the water inside it. It describes the build's bytes — not today's cell registry — so a cell discovered after the build (`enc_cells.status = NEW`) is not in it until a build ingests it. For situational awareness only; not for navigation.","required":["type","geometry","properties"],"properties":{"type":{"type":"string","const":"Feature"},"geometry":{"description":"A GeoJSON MultiPolygon, or `null` when no cell in the build publishes a coverage polygon.","oneOf":[{"type":"object","required":["type","coordinates"],"properties":{"type":{"type":"string","const":"MultiPolygon"},"coordinates":{"type":"array"}}},{"type":"null"}]},"bbox":{"type":"array","items":{"type":"number"},"minItems":4,"maxItems":4,"description":"Present iff geometry is."},"properties":{"type":"object","required":["schema","region","build_id","chart_source","derivation","simplify_tolerance_deg","generated_at","cell_count","cells","cells_without_coverage"],"properties":{"schema":{"type":"string","const":"chrt.offline-outline/1"},"region":{"type":"string","example":"NOAA_ENC"},"build_id":{"type":"string","description":"The build this outline describes. Refuse it if it differs from the catalogue's `build_id`."},"chart_source":{"type":"string","example":"NOAA_ENC"},"derivation":{"type":"string"},"simplify_tolerance_deg":{"type":"number","description":"Display simplification in degrees; an edge may sit up to this far from the cells' own coverage boundary.","example":0.005},"generated_at":{"type":"string","format":"date-time"},"cell_count":{"type":"integer","minimum":0},"cells":{"type":"array","description":"Every ENC cell in the build, with the edition and update its features carry (null when they disagree).","items":{"type":"object","required":["cell_id","edition","update_number"],"properties":{"cell_id":{"type":"string"},"edition":{"type":["integer","null"]},"update_number":{"type":["integer","null"]}}}},"cells_without_coverage":{"type":"array","items":{"type":"string"},"description":"Cell ids in the build that contribute nothing to the geometry because they publish no M_COVR CATCOV=1 polygon."}}}}},"OfflineBasemap":{"type":"object","description":"The CHRT_BASE bundle's terms, credit and layer contract — present on every CHRT_BASE row, bundle response and manifest; `null` on every other bundle. The same statement is stamped into the MBTiles/PMTiles metadata (`attribution`, `chrt:schema`, `chrt:provenance`).","required":["data_class","chart_data","coverage","source_data","attribution","licence","embed_in_app","terms","expires","notice","schema","layers","minzoom","maxzoom","raster_before_id"],"properties":{"data_class":{"type":"string","const":"world-basemap"},"chart_data":{"type":"boolean","const":false,"description":"Not chart data."},"coverage":{"type":"boolean","const":false,"description":"Asserts no chart coverage — nothing in the bundle says where CHRT has charts."},"source_data":{"type":"string","example":"Natural Earth 10m (public domain); US land borders from US Census Bureau TIGER/Line 2026 (public domain)"},"attribution":{"type":"string","const":"© CHRT · Made with Natural Earth","description":"Show this wherever the map is shown. The style's CHRT_BASE source carries it as `attribution`, so MapLibre's attribution control shows it without extra work."},"attribution_url":{"type":"string","format":"uri"},"licence":{"type":"string","const":"chrt-basemap-embed-1"},"embed_in_app":{"type":"boolean","const":true,"description":"You may ship this file inside your application binary."},"terms":{"type":"string","description":"Any CHRT account may download the bundle and ship it inside an application, unmodified or restyled, with the attribution shown wherever the map is shown. It may not be resold or redistributed as a standalone dataset."},"expires":{"type":"boolean","const":false,"description":"A bundled copy does not expire: it holds only geography and claims nothing that can go stale. `offline_until` elsewhere in a response is the TOKEN's grace window, not the basemap's."},"notice":{"type":"string"},"schema":{"type":"string","const":"chrt.basemap-bundle/1","description":"Layer-contract version. Changes only when the set of layers or their meaning changes — never per build. A `base=1` offline style renders any bundle of the same schema."},"layers":{"type":"array","items":{"type":"string"},"description":"Exactly: base_earth, base_water, base_boundary, country_boundary."},"minzoom":{"type":"integer","const":0},"maxzoom":{"type":"integer","const":6,"description":"Tiles exist z0–6; MapLibre overzooms above."},"raster_before_id":{"type":"string","const":"chrtbase-nocoverage","description":"Insert your own raster layer before this id in a `base=1` style: above the base geography, below the no-coverage crosshatch, and below the chart's coverage ground and the chart."}}},"OfflineFormats":{"type":"object","required":["mbtiles","pmtiles"],"description":"Per-format size and hash. `pmtiles` is null when that build predates PMTiles in the offline pointer.","properties":{"mbtiles":{"type":"object","required":["bytes","sha256"],"properties":{"bytes":{"type":"integer"},"sha256":{"type":["string","null"]}}},"pmtiles":{"oneOf":[{"type":"object","required":["bytes","sha256"],"properties":{"bytes":{"type":"integer"},"sha256":{"type":["string","null"]}}},{"type":"null"}]}}},"OfflineBundleEntry":{"type":"object","description":"One row of `bundles[]` (ADR 0037): every bundle this token can download — whole producers (`NOAA_ENC`), areas cut from them (`us-gulf-of-maine`), CHRTland land bundles, and CHRT_BASE, the app-embeddable world basemap. Branch on `kind` and `data_class`, never on the id's spelling.","required":["bundle","region","build_id","build_tag","issued_at","formats","source","kind","data_class","manifest_available"],"properties":{"bundle":{"type":"string","description":"The id to pass to /v1/offline/bundles/{region}, /manifest and /styles."},"region":{"type":"string","description":"The same id, repeated for clients that key packs by `region`."},"build_id":{"type":"string"},"build_tag":{"type":"string"},"issued_at":{"type":["integer","null"],"description":"Unix epoch seconds the build was issued."},"formats":{"$ref":"#/components/schemas/OfflineFormats"},"source":{"type":"string","description":"The producer this bundle is cut from — what entitlement is checked against. Equal to the id for a producer, for CHRT_LAND and for CHRT_BASE."},"kind":{"type":"string","enum":["producer","area","basemap"],"description":"`producer` — a whole source (or the whole CHRTland archive); `area` — a cut of one; `basemap` — CHRT_BASE."},"name":{"type":["string","null"],"description":"Display name. Never invent one."},"group":{"type":["string","null"],"description":"The coast an area folds under in a picker; null for producers and basemaps."},"area_rev":{"type":["integer","null"],"description":"Area polygon revision the bundle was cut at; null for non-areas."},"bbox":{"oneOf":[{"type":"array","items":{"type":"number"},"minItems":4,"maxItems":4},{"type":"null"}],"description":"[west, south, east, north] of the ARTEFACT's tile grid. Frame a picker on `outline`, budget a download on this."},"outline":{"oneOf":[{"$ref":"#/components/schemas/OfflineRegionOutlineRef"},{"type":"null"}],"description":"Coverage outline of the chart cells in the bundle; `null` = not published (and always null for land and basemap bundles, which claim no coverage)."},"minzoom":{"type":["integer","null"]},"maxzoom":{"type":["integer","null"]},"cells":{"oneOf":[{"type":"object","required":["total","partial"],"properties":{"total":{"type":"integer"},"partial":{"type":"integer","description":"Cells straddling the area boundary."}}},{"type":"null"}]},"manifest_available":{"type":"boolean","description":"Whether GET /v1/offline/bundles/{region}/manifest will answer 200."},"data_class":{"type":"string","enum":["chart","derived-basemap","world-basemap"],"description":"Derived from `source`: `chart` — hydrographic-office ENC data; `derived-basemap` — CHRTland (OSM-derived land, ODbL); `world-basemap` — CHRT_BASE (Natural Earth geography)."},"land":{"type":["object","null"],"description":"CHRTland rows only: ODbL provenance `{data_class, chart_data, licence, attribution, attribution_url, derivation, derivation_page, notice, companion}`."},"basemap":{"oneOf":[{"$ref":"#/components/schemas/OfflineBasemap"},{"type":"null"}],"description":"CHRT_BASE rows only."}}},"OfflineBundleManifest":{"type":"object","description":"A bundle's provenance. For chart and area bundles: a presigned `signed_url` to the per-cell manifest JSON (`cell_id, edition, update_number, issue_date, partial`). For CHRT_BASE: served inline — `cells` is null, `basemap` carries the terms and layer contract, `formats` the sizes and hashes.","required":["region","source","kind","build_id","build_tag","server_time"],"properties":{"region":{"type":"string"},"source":{"type":"string"},"kind":{"type":"string","enum":["producer","area","basemap"]},"build_id":{"type":"string"},"build_tag":{"type":"string"},"area_rev":{"type":["integer","null"]},"issued_at":{"type":["integer","null"]},"bbox":{"oneOf":[{"type":"array","items":{"type":"number"},"minItems":4,"maxItems":4},{"type":"null"}]},"minzoom":{"type":["integer","null"]},"maxzoom":{"type":["integer","null"]},"formats":{"$ref":"#/components/schemas/OfflineFormats"},"cells":{"oneOf":[{"type":"object","properties":{"total":{"type":"integer"},"partial":{"type":"integer"}}},{"type":"null"}]},"signed_url":{"type":"string","format":"uri","description":"Chart/area bundles only."},"expires_at":{"type":"integer"},"basemap":{"oneOf":[{"$ref":"#/components/schemas/OfflineBasemap"},{"type":"null"}]},"server_time":{"type":"integer"}}},"ConditionsSeries":{"type":"object","description":"Present only when the request carried `hours`. The chosen station's readings, from NDBC's per-station file. **Never interpolated, smoothed, resampled or gap-filled** — if you draw a line between two observations, it is yours; label it as drawn. **Never runs ahead of the top-level reading**: every observation is at or before `observed.time`.","required":["from","to","order","cadenceMinutes","observations"],"properties":{"from":{"type":"string","format":"date-time","description":"Start of the window asked for: request time minus `hours`."},"to":{"type":"string","format":"date-time","description":"End of the window asked for: request time."},"order":{"type":"string","enum":["oldest-first"]},"cadenceMinutes":{"type":["integer","null"],"minimum":1,"description":"The most common interval between consecutive observations in the window, in minutes (ties to the shorter). `null` below two observations. Per-station — NDBC buoys report every 10, 30 or 60 minutes."},"observations":{"type":"array","items":{"$ref":"#/components/schemas/ConditionsSeriesObservation"}}}},"ConditionsSeriesObservation":{"type":"object","description":"One reading, in exactly the shape of the top-level `conditions`/`unavailable`: units per `units=`, wind in knots under both systems, a field the buoy did not report absent from `conditions` and named in `unavailable`.","required":["time","conditions","unavailable"],"properties":{"time":{"type":"string","format":"date-time"},"conditions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WeatherReading"}},"unavailable":{"type":"array","items":{"type":"string"}}}}},"responses":{"Unauthorized":{"description":"Missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"Authenticated but not permitted (scope, coverage, plan, or key state).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"WeatherRateLimited":{"description":"This client IP sent more than 60 weather requests in 10 seconds. Wait `Retry-After` seconds (computed from when a slot frees, at most 10), then resume. The window is per client IP, shared by every device behind that address, and separate from your key's per-minute `rate_limit` and from the chart routes' window. Beyond it, the host-wide edge backstop (>100 requests / 10 s per IP across all REST routes) answers with a plain 429 that has no JSON body.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Limit":{"$ref":"#/components/headers/Edge-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Edge-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/Edge-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"},"example":{"error":"Too many requests","code":"rate_limited","hint":"This route allows 60 requests per 10 s per client IP. Wait Retry-After seconds, then resume.","limit":60,"period_seconds":10,"retry_after":7}}}},"TileUnauthorized":{"description":"No usable tile token. tiles.chrt.co takes only `Authorization: Bearer <tile token>` (mint at POST /v1/mint/tile-token with your API key), never an API key or a URL parameter. Carries `WWW-Authenticate: Bearer realm=\"tiles.chrt.co\"`. `error` is `missing_auth` (`detail`: `no_credential`, `api_key_not_accepted`, `token_in_query`), `bad_shape` (`detail`: `api_key_as_bearer`, `not_a_jwt`), `expired`, `bad_signature`, `unknown_kid`, `bad_claims` or `revoked`; `hint` says what to do.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"`Bearer realm=\"tiles.chrt.co\"`, with `error=\"invalid_token\"` when a token was presented."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_key":{"value":{"error":"missing_auth","detail":"api_key_not_accepted","hint":"An API key is not accepted here. tiles.chrt.co needs a tile token as Authorization: Bearer <token>. Mint one with your API key: POST https://api.chrt.co/v1/mint/tile-token with the key in x-api-key."}},"api_key_as_bearer":{"value":{"error":"bad_shape","detail":"api_key_as_bearer","hint":"An API key is not accepted here. tiles.chrt.co needs a tile token as Authorization: Bearer <token>. Mint one with your API key: POST https://api.chrt.co/v1/mint/tile-token with the key in x-api-key."}}}}}}}}}