Integrating Travel Risk Data Without Replacing Your Existing Systems
Egor KarpovichCEO & Founder, Travel Code ·
A travel advisory API gives developers a programmatic feed of country risk scoring, security events, and government advisory changes without a separate dashboard. The three practical integration shapes are: enrich at booking, sweep itineraries on a schedule, and subscribe to webhooks for new events. Each shape fits a different system of record and a different latency budget, and none of them require replacing the systems you already run.
Why integrate rather than replace
Travel-risk data is a reference-data problem, not a workflow problem. The systems that already own the workflow — the online booking tool, the human resource information system (HRIS), the security operations platform — do not need to be rebuilt to acquire a risk signal. They need an answer to one of two questions: what is the current risk level for a destination? and has anything changed for a traveler already on the road? An API answers both without displacing any of the systems that act on the answer.
The International Organization for Standardization published ISO 31030, Travel Risk Management — Guidance for Organizations, in September 2021. According to ISO's own description of the standard, it provides guidance for organizations on identifying, assessing, treating, and reviewing travel-related risks to employees and others traveling on behalf of the organization. ISO 31030 is a guidance document, not a certification standard, and no system — including this API — can be certified against it. The standard applies to the organization and its program; a risk data feed is one input into that program. Treating ISO 31030 as the frame for how your travel risk work is organized is appropriate; expecting an API to carry the standard on its behalf is a category error. What the API supplies is reference data; what the organization still owns is policy, approval workflow, and traveler communication, which the standard describes.
The three integration shapes
1. Enrich at booking
At the point a trip is confirmed, call the API with the destination and travel dates. Store the returned risk level alongside the trip record. This is a synchronous call on a user-facing path, so the timeout budget is tight — typically 300 to 800 milliseconds — and failure must degrade gracefully.
GET /v1/countries/{code}
Authorization: Bearer {token}
Representative response:
{
"country": "FR",
"risk_level": "low",
"updated_at": "2026-10-14T08:00:00Z"
}
The authoritative schema, including the full field set and error codes, lives in the public documentation. The integration pattern is the same regardless of which fields a given deployment exposes: store the level and the timestamp. The level drives downstream policy (approval tiers, pre-travel briefings); the timestamp drives cache invalidation on the next sweep.
2. Periodic itinerary sweep
Once a day, iterate every traveler currently on a trip and re-query their destination. If the risk level has changed since the last sweep, flag the itinerary for review. This is the right shape when the booking tool cannot be modified at the trip-confirmation hook, or when the risk feed updates faster than the booking cadence. It is also what you fall back on when the enrich-at-booking call fails — the sweep is where unknown or stale values get reconciled the next morning.
3. Webhook on event
Subscribe to an event endpoint and receive a push when a new advisory is issued or an incident is added to the feed. This is the lowest-latency shape and the correct one for a security operations platform that pages an on-call analyst. The payload identifies the event, the countries affected, and a severity classification; the receiving system filters against its own traveler list rather than relying on upstream filtering, because the traveler list changes faster than any subscription config.
Request and response patterns
The two most-used endpoints follow familiar REST conventions: a country lookup for the current assessment, and a cursor-paginated event feed with a since parameter for incremental reads. Full schemas are in the risk endpoint reference; the shape below is illustrative.
GET /v1/events?since=2026-10-01&country=DE
Authorization: Bearer {token}
Representative response:
{
"events": [
{
"id": "evt_01HK...",
"country": "DE",
"category": "civil_unrest",
"severity": 2,
"published_at": "2026-10-10T14:22:00Z"
}
],
"next_cursor": null
}
Treat id as the resume key. Store the last processed id so a restart does not re-emit the same event into your downstream workflow, and so a backfill from an older since value is idempotent.
What to cache and for how long
Different fields have different lifetimes. Caching the whole response under one TTL loses information on both ends: country scoring is stable enough that a 60-second TTL burns call budget, and the event stream moves faster than a 24-hour TTL would surface.
Country assessments. These change on the order of days or weeks. A cache lifetime of 6 to 24 hours is appropriate. Store the full response and the retrieval timestamp; invalidate on the next sweep rather than on a wall clock, so a tightening of policy propagates immediately on the next cycle.
Event feeds. Events can appear at any time. Poll every 5 to 15 minutes, or subscribe to the webhook and treat the webhook as the primary signal with poll as the backstop. Cache the last processed event id to resume cleanly.
Government foreign ministries publish travel advisories on their own schedules and with their own scales. The U.S. State Department publishes a four-level travel advisory for every country at travel.state.gov, with each advisory reviewed on a schedule tied to conditions in that country. The United Kingdom's Foreign, Commonwealth & Development Office and other national ministries publish parallel but differently structured guidance. Developers writing against a single ministry directly face three problems: schedule differences between ministries, scale differences (four-level versus narrative), and the need to parse HTML or PDF rather than a stable API contract. A travel advisory API resolves these by presenting one normalized scale and one update cadence. The responsibility that remains on the integrator is deciding how your organization's internal policy maps to the normalized levels — a decision that belongs to the risk team, not the API, because it codifies risk appetite rather than data accuracy.
Failure handling: a timeout must not block a booking
The booking tool is a revenue path. If the risk API is slow or unreachable, a booking should still succeed; the risk field attached to that booking should be marked unknown or stale, and the itinerary sweep the following morning should fill it in. Three rules follow from this:
- Short timeouts on the synchronous path. 500 to 800 milliseconds for enrich-at-booking; longer timeouts in the batch sweep where no user is waiting.
- Serve stale on failure. If the last-known country assessment is 48 hours old and a live call times out, return the cached value with a staleness flag. Approval policy can require fresh data above a given severity.
- Circuit breaker on repeated failures. If the API returns errors on ten consecutive calls, trip the breaker and skip remote calls for 60 seconds. This keeps a transient upstream outage from queuing booking requests at the gateway.
According to the Global Business Travel Association's 2024 Business Travel Index, global business travel spending reached $1.48 trillion in 2024, surpassing the pre-pandemic 2019 peak for the first time, with further growth projected through 2028. For an API integration decision, two implications follow. First, programs are managing larger traveler populations than at any prior point, which changes the arithmetic on batch sweeps — a daily reconciliation of five thousand active trips is a different engineering problem than five hundred. Second, the booking critical path cannot acquire a hard synchronous dependency on a third-party API without a degradation plan; at that call volume, even a brief upstream outage would otherwise translate directly into blocked bookings. The failure handling pattern above — short timeouts, serve-stale on cache miss, circuit breaker — follows from the scale GBTA documents, not from the specifics of any one vendor.
Mapping into HR and travel systems
Which system you integrate with first depends on where traveler identity and itinerary data already live. The pattern repeats across vendor categories, so it is more useful to describe by system type than by product name.
Human resource information systems (HRIS)
The HRIS owns the traveler identity and emergency contact. Integrate at the identity layer — pull a stable employee id and the home-country assignment, and store the risk fields on your side keyed to that id. Do not push risk data back into the HRIS; it is not a system of record for operational security data and will not surface it to the right people in time.
Online booking tool and travel management
The booking tool owns the itinerary. Integrate at the trip-confirmation event — the hook most online booking tools expose runs post-ticketing. Attach the enrichment call to that hook, with the failure handling above. For legacy booking tools that do not expose a hook, run the sweep against the trip export the tool already produces to finance.
Security operations and incident management
The security platform owns response. Integrate at the event layer — subscribe to the webhook and filter incoming events against the traveler list you maintain from the HRIS and booking feeds. On-call paging, mass notification, and incident ticketing already live in that platform; do not duplicate them.
Scenario, call frequency, and local storage
| Scenario | Call frequency | What to store locally |
|---|---|---|
| Enrich at booking | Once per confirmed trip | Country code, risk level, retrieval timestamp |
| Daily itinerary sweep | Once per day, per active destination | Current level, previous level, diff since last sweep |
| Pre-departure brief | 72 hours before departure | Full advisory text, last 30 days of events |
| Webhook on event | Push-driven, 10-minute poll as backstop | Event id, affected countries, severity, received_at |
| Weekly program report | Once per week, aggregated | Risk-weighted traveler-days by country |
What this API does not do
It supplies risk reference data. It is not a travel risk management program on its own and does not replace the work your organization does to meet its duty-of-care obligations. For a broader picture of what a program contains and where an API fits inside it, see travel risk management: how it works. For questions about data residency, access controls, authentication posture, or the controls behind them, see the Travel Code Trust Center, which holds the current documentation.
Frequently Asked Questions
Does this API conform to ISO 31030?
No. ISO 31030 is a guidance standard for an organization's travel risk management program; it does not define an API specification, and no API can be certified against it. The API supplies reference data your program can use — current country risk levels, government advisory status, and an event feed — while your organization owns the policy, approval, and response steps the standard describes.
How current is the country risk data?
Country-level assessments are refreshed when the underlying advisory sources update, typically within hours of a change at an issuing ministry. Every response includes an updated_at timestamp so your cache can decide whether to serve the stored value or fetch again. The cache lifetimes recommended above assume the retrieval timestamp is the authority, not a wall-clock TTL.
What happens if the API is unreachable during a booking?
Keep timeouts short on the booking path (500 to 800 milliseconds) and serve the last cached value with a staleness flag. The daily itinerary sweep reconciles the trip the next morning. Trip approval policy decides whether a stale value is acceptable at a given severity level; most teams require fresh data only above a configured threshold.
Where do the risk assessments come from?
Country assessments are a composite of multiple government foreign-ministry advisories and international incident feeds, re-expressed on a single scoring scale so you do not have to reconcile differently structured sources yourself. The response names the scale, not the upstream feed, so a change in sources on our side does not break your contract.
Can I subscribe to events for a subset of countries?
Yes. Webhook subscriptions accept a country filter and a minimum severity. For most security teams, filtering by countries where we have active travelers at the receiving end is a better fit than filtering at subscription time, because the traveler list changes faster than the subscription configuration.
Where is the full API reference?
At /docs, with the risk-specific endpoints at /docs/risk. Both contain the authoritative schemas, rate-limit headers, and error codes referenced throughout this article.
travel riskduty of careapi
Try the data behind this article
Risk and aviation data in one API. Free plan, no card.
Get a free API key