Insurance API - Supported Countries
Eligibility: Saudi Arabia citizens and residents only. Insurance packages may only be sold to travellers who are citizens or residents of Saudi Arabia, regardless of which countries this endpoint returns.
Table of Contents
Get Insurance Countries
To get a list of countries covered by the insurance catalog, you need to send a GET request to the /api/insurance/countries endpoint.
There are no required parameters for this endpoint.
Optional query parameters:
geography: Filter countries by geography scope. This is an optional field of typestring. Matching is case-insensitive. Accepted values:localregionalglobal
Use the returned name and code from this endpoint when querying /api/insurance/packages.
For package filters:
countrymust usenamecountryCodemust usecodeArbitrary country strings are not accepted, and a value that does not match exactly returns an emptypackagesarray rather than an error.
Only countries that have at least one activated insurance product are returned. Results are deduplicated by code and sorted alphabetically by name.
Usage - fetch a list of insurance supported countries
Here is an example of how you can get a list of countries using Roamify Insurance API.
curl
curl --request GET \
--url 'https://api-dev.getroamify.com/api/insurance/countries' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'Usage - fetch countries by geography (optional)
curl
curl --request GET \
--url 'https://api-dev.getroamify.com/api/insurance/countries?geography=local' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'Response fields
Each entry in countries contains:
code: The ISO country code. Use this ascountryCodeon/api/insurance/packages.name: The full country name. Use this ascountryon/api/insurance/packages.slug: The URL-friendly form of the country name.geography: The geography scope of the country. One oflocal,regional, orglobal.
Sample Response
{
"status": "success",
"data": {
"countries": [
{
"code": "SA",
"name": "Saudi Arabia",
"slug": "saudi-arabia",
"geography": "local"
}
]
}
}