---
title: "POST /api/rpc/queryWeatherWarnings"
method: POST
path: "/api/rpc/queryWeatherWarnings"
tags: ["insurance"]
---

# POST /api/rpc/queryWeatherWarnings

`POST /api/rpc/queryWeatherWarnings`

## Request

- Base URL: `https://21risk.com`
- URL: `https://21risk.com/api/rpc/queryWeatherWarnings`
- Auth: OAuth 2 (client credentials, token URL `/api/v1/oauth/token`)

Read the official severe weather warnings in force, the way the Insurance map shows them: from MeteoAlarm (Europe's national weather services), the US National Weather Service, Environment and Climate Change Canada and GDACS (tropical cyclones), refreshed every two minutes. Each warning has its level (yellow, orange or red), hazard, the text as published, when it starts and ends, a link to the publisher, and the user's sites on the Insurance board inside its areas. Use scope sites for which sites are under a warning now, and all for everything in force. Credit the publisher wherever a warning is shown, as each one's credit says.

## Request body

- object
  - `tenant` unknown, required
  - `scope` 'sites' | 'all', required: sites: the warnings in force at the user's active sites on the Insurance board. all: every warning in force from every source, worldwide; often thousands.
  - `outlines` boolean: Also return the outlines of the warnings' areas as GeoJSON, simplified to about a kilometre, to draw them on a map. Large: up to a megabyte for all.

## Response `200`

Successful response

- object
  - `scope` 'sites' | 'all', required
  - `warnings` object[], required: Most severe first, then by the number of sites.
    - `id` string, required
    - `level` 'yellow' | 'orange' | 'red', required: MeteoAlarm's colours, which the other publishers' levels are mapped to.
    - `hazard` 'wind' | 'snowIce' | 'thunderstorm' | 'fog' | 'highTemperature' | 'lowTemperature' | 'coastalEvent' | 'forestFire' | 'avalanche' | 'rain' | 'flooding' | 'rainFlood' | 'tropicalCyclone' | 'tornado' | 'other', required
    - `event` string, required: The publisher's name for it, in English where given.
    - `text` object, required: The warning exactly as published, in English where the publisher gives it. Show it unmodified alongside any summary of yours.
      - `language` string, required: The publisher's language tag, e.g. en-GB.
      - `event` string, required
      - `headline` string, nullable, required
      - `description` string, nullable, required
      - `instruction` string, nullable, required: What to do.
    - `onset` string, date-time, nullable, required
    - `expires` string, date-time, nullable, required
    - `credit` object, required: Show the credit, the time of issue and the disclaimer wherever the warning is shown.
      - `credit` string, required: e.g. "Met Éireann, via EUMETNET – MeteoAlarm".
      - `issuedAt` string, date-time, required
      - `url` string, nullable, required: The publisher's page closest to the warning.
      - `sourceUrl` string, required
      - `licenceUrl` string, required
      - `disclaimer` string, nullable, required: Shown word for word.
    - `areaNames` string[], required: The publisher's names for its areas.
    - `siteIds` string[], required: The user's active sites on the Insurance board inside its areas.
  - `areas` object[]: Only with outlines: each outline once, however many warnings cover it.
    - `name` string, required
    - `level` 'yellow' | 'orange' | 'red', required: The highest level of its warnings.
    - `warningIds` string[], required
    - `geometry` union, required
      - object
        - `type` 'Polygon', required
        - `coordinates` array[], required
          - array[]
            - number[]
      - object
        - `type` 'MultiPolygon', required
        - `coordinates` array[], required
          - array[]
            - array[]
              - …
  - `outlinesCredit` string: Only with outlines: show it wherever the outlines are drawn.
  - `total` integer, required: Every warning in force, worldwide.
  - `outOfDate` object[], required: Sources not checked recently enough: their warnings are left out rather than shown stale.
    - `name` string, required
    - `lastCheckedAt` string, date-time, nullable, required
  - `awarenessNote` string, required: Show it with the warnings.

---

[API](https://skmtc.dev/21risk/apis/21risk-api.md) · [All operations](https://skmtc.dev/21risk/apis/21risk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/21risk/apis/21risk-api/revisions/273a727dfd49?raw)
