Getting started
Getting started
You need two values from your Stationworks contact: your district's id
(a UUID) and a key (starts with pk_live_). The key identifies your
site; it grants nothing and is safe in page source. The district's console
will show both on its API card.
One request
Code
Code
Three fields
Code
verdict answers "can I have a fire today?" for the whole district.
fireDanger is null when the district has not set a level. agency.url
is the district's own site, where the full rules live.
What comes back
The response also carries statuses (one row per thing you might burn),
permits (what the district sells, with prices), season, airQuality and
fireWeather. The reference documents every field. Two rules keep
your page working as the API grows: ignore fields you do not recognise, and
treat an enum value you do not recognise as "unknown". The
contract explains why.
Responses you will see
| Status | Meaning |
|---|---|
200 | The district's status. |
401 | No key, or a key we do not recognise. Check ?key=. |
404 | Not a UUID, or a district that is not active. |
429 | Too many requests. Wait for Retry-After seconds. |
500 | Our fault. Show your last good response. |
Errors are JSON: { "error": { "code": "invalid_api_key", "message": "…" } }.