Covid-19

Riskline provides two types of integrations for its Covid APIs.

  1. Push API - where Riskline pushes the data out to a third party server
  2. Pull API - where third parties fetch data from Riskllne

Both API include country-level, region-level and city-level information.

Push API

There is one request per country that contains the country information, as well as regions and cities data.

Report is sent via a POST request.

POST https://example.com/api/covid (example)

This information is updated as soon as there are changes done to the report.

Format

There are two data formats available: plain json and jsonapi spec.

JSON https://gist.github.com/riskline/8259946909cfbb5876ee81fcec0f8d3b

JSONAPI https://gist.github.com/riskline/41bb81a8675aba8ae039de7fcb4b753b

More details are available and ready for testing in our Developer Portal.

Pull API

There are two available API calls, one for the list of countries and one for the data of specific countries.

The request needs an authorisation token received from Riskline.

List of countries

GET https://api.riskline.com/covid/countries

You can override the defaults in the service configuration and select the version (v1 or v2) and content type (json or jsonapi).

GET https://api.riskline.com/covid/countries.json

GET https://api.riskline.com/covid/countries.jsonapi

GET https://api.riskline.com/covid/countries.json?version=v1

GET https://api.riskline.com/covid/countries.json?version=v2

Country data

Fetch data from only specific countries, by iso codes

GET https://api.riskline.com/covid/countries?country_codes=ro,us

Format

There are two data formats: plain json and jsonapi spec.

Explanation of possible field values

country_name: string, country name

country_code: string, upper case, country iso code 2 letters

local_text: string, text summarizing the situation in a given country

infection_risk_level: string (“Low”, “Moderate”, “Medium”, “High”, “Extreme”)

cases_per_100k_last_14days: number value, float

as_of_day: string, "day month year" format

covid_risk_level: string (“Low”, “Moderate”, “Medium”, “High”, “Extreme”)

hotspots: string (optional text, not all countries will have this)

control: string ("Curfew", "None", "Distancing", "Reopening/Partial Measures", "Lockdown")

control_end: string (year-month-day)

comment: string, optional text

flight_ban: string ("No", "Yes", "Partial")

flight_ban_end: string ("indef", "year-month-day")

entry_ban: string ("No", "Yes", "Partial")

entry_ban_end: string ("indef", "year-month-day")

quarantine: string ("Some Travellers", "All Travellers", "None")

quarantine_days: string

city_name: string, city name

city_code: string, upper case, city iso code 3 letters

covid_risk_level: string (“Low”, “Moderate”, “Medium”, “High”, “Extreme”)

summary: string, text optional

lat: "",

lng: ""

Regions: USA

region_name: string, state name

region_code: string, upper case state 2 letter ("US-XX")

travel_risk_level: string (“Low”, “Moderate”, “Medium”, “High”, “Extreme”)

comment: string, text summary

order_end_date: string ("indef", "year-month-day")

travel: string ("All travel allowed", "only essential travel", "limited non-essential travel", "non-essential travel with precautions")

gatherings: string ("10 persons or less", "50 persons or less", "large venues open with distancing", "no distancing")

business: string ("only essential business", "some non-essential", "non-essential with distancing", "no distancing")

quarantine: string ("all travellers", "some travellers", "only those in contact with Covid cases", "none")

policy: string, ("lockdown", "stay at home", "opening", "open", "closing")

infection_risk_level: string (“Low”, “Moderate”, “Medium”, “High”, “Extreme”)

cases_per_100k_last_7days: number value, float

as_of_day: string ("day month year")

Region: Canada

region_name: string, province name

region_code: string, upper case province 2 letter ("CA-XX")

travel_risk_level: string (“Low”, “Moderate”, “Medium”, “High”, “Extreme”)

comment: string, text summary

order_end_date: string ("indef", "year-month-day")

travel: string ("All travel allowed", "only essential travel", "limited non-essential travel", "non-essential travel with precautions")

gatherings: string ("10 persons or less", "50 persons or less", "large venues open with distancing", "no distancing")

business: string ("only essential business", "some non-essential", "non-essential with distancing", "no distancing")

quarantine: string ("all travellers", "some travellers", "only those in contact with Covid cases", "none")

infection_risk_level: string (“Low”, “Moderate”, “Medium”, “High”, “Extreme”)

cases_per_100k_last_7days: number value, float

as_of_day: string ("day month year")

Region: France

region_name: string, name of region

region_code: string, iso code ("FR-XX")

travel_risk_level: string (“Low”, “Moderate”, “Medium”, “High”, “Extreme”)

government_rating: string ("Green", "Orange", "Red")

infection_risk_level: string (“Low”, “Moderate”, “Medium”, “High”, “Extreme”)

cases_per_100k_last_7days: number value, float

as_of_day": string ("day month year")

Region: Spain

region_name: string, name of region

region_code: string, iso code ("ES-XX")

parent_subdivision: string ("ES-XX")

travel_risk_level: string (“Low”, “Moderate”, “Medium”, “High”, “Extreme”)

government_phase: string ("Phase 0", "Phase 1","Phase 2", "Phase 3", "New Normal")

comment: string, text summary

infection_risk_level: string (“Low”, “Moderate”, “Medium”, “High”, “Extreme”)

cases_per_100k_last_7days: number value, float

as_of_day": string ("day month year")

Region: Australia

region_name: string, name of state

region_code: string, iso code ("AU-XXX")

travel_risk_level: string (“Low”, “Moderate”, “Medium”, “High”, “Extreme”)

government_step: string ("Step 1", "Step 2", "Step 3")

timeline: string, text including date

intrastate_travel_allowed: string ("Yes", "No", "Partial")

intrastate_travel_details: string, text summary

interstate_travel_allowed: string ("Yes", "No", "Partial")

interstate_travel_details: string, text summary

infection_risk_level: string (“Low”, “Moderate”, “Medium”, “High”, “Extreme”)

cases_per_100k_last_7days: number value, float

as_of_day": string ("day month year")

More details are available and ready for testing in our Developer Portal.

UPDATES

13 July 2020: Additional filds were added for US:

"infection_risk_level": "Medium",

"cases_per_100k_last_7days": 40,

"as_of_day": "11 July 2020"

Did this answer your question?