{ "produces": [ "application/json; version=DEV", "application/json; version=QA", "application/json; version=STG", "application/json; version=2", "application/json" ], "schemes": [ "https" ], "swagger": "2.0", "info": { "title": "Risk Ratings", "description": "Access International SOS risk ratings\nTo use this page, paste your key into the `API Key` field above and click\nthe `Explore` button. There will be no notification, but the key will not\nbe set until you click the button.\n\nExample of accessing the API with curl:\n\n
\n curl -s -H \"Accept:application/json; version=2\" \\\n -H Authorization:AUTHORIZATION_KEY \\\n https://api.internationalsos.com/risk/definitions\n\n\nExample source code for accessing the API:\n\n
\n package main\n //\n import (\n \"fmt\"\n \"io/ioutil\"\n \"net/http\"\n \"os\"\n )\n //\n func main() {\n req, _ := http.NewRequest(\"GET\", \"https://api.internationalsos.com/risk/definitions\", nil)\n // International SOS authorization tokens are passed via HTTP header. Note this is NOT\n // a BASIC authentication header.\n req.Header.Set(\"Authorization\", os.Getenv(\"KEY\"))\n // This is a required header. We recommend using the versioned form to prevent breakages in API changes.\n req.Header.Set(\"Accept\", \"application/json; version=2\")\n client := http.Client{}\n resp, _ := client.Do(req)\n defer resp.Body.Close()\n data, _ := ioutil.ReadAll(resp.Body)\n fmt.Println(string(data))\n }\n\n \nNote that you can download the raw Swagger YAML and import it into the\n[Swagger Editor](https://editor.swagger.io), which can generate language\nbinding libraries 44 different programming languages. \n", "termsOfService": "Please see your license for TOS details.", "version": "2.0.0" }, "host": "api.internationalsos.com", "basePath": "/risk", "parameters": { "language": { "name": "Accept-Language", "in": "header", "description": "RFC 1766 country code(s). This is as defined in section 14 of RFC 2616.\nAn example specifying that French is most preferred, followed by US\nEnglish, followed by any available regional English is:\n\n`Accept-Language: en;q=0.7, en-US;q=0.8, fr`\n\nNot all content is available in all languages. Availability is\nnormally gated by the client contract with International SOS.\nCurrently supported languages are: \n\n* zh\n* en\n* es\n* fr\n* ja\n* ko\n* de\n", "required": false, "type": "string", "default": "en" } }, "paths": { "/ratings": { "get": { "summary": "Risk Ratings (Comprehensive)", "description": "Retrieves International SOS destination risk ratings by region", "parameters": [ { "$ref": "#/parameters/language" } ], "operationId": "listAll", "responses": { "200": { "description": "success", "schema": { "$ref": "#/definitions/risks" } } } } }, "/definitions": { "get": { "summary": "Risk definitions (ALL)", "description": "Provides definitions for the medical and travel security risk rating levels", "parameters": [ { "$ref": "#/parameters/language" } ], "operationId": "listDefinitions", "responses": { "200": { "description": "success", "schema": { "$ref": "#/definitions/RiskDefinitions" } } } } }, "/security": { "get": { "summary": "Security risk ratings (Security)", "description": "Retrieves International SOS security risk ratings", "parameters": [ { "$ref": "#/parameters/language" } ], "operationId": "listSecurity", "responses": { "200": { "description": "success", "schema": { "$ref": "#/definitions/risks" } } } } }, "/city": { "get": { "summary": "City risk ratings (Security)", "description": "Retrieves International SOS city risk ratings", "parameters": [ { "$ref": "#/parameters/language" } ], "responses": { "200": { "description": "success", "schema": { "$ref": "#/definitions/risks" } } } } }, "/medical": { "get": { "summary": "Medical risk ratings (Medical)", "description": "Retrieves International SOS medical risk ratings", "parameters": [ { "$ref": "#/parameters/language" } ], "operationId": "listMedical", "responses": { "200": { "description": "success", "schema": { "$ref": "#/definitions/risks" } } } } }, "/version": { "get": { "summary": "Retrieves the deployed verison of this service", "description": "This service allows querying the application directly to\nidentify which version is deployed. http://semver.org/ is followed,\nand only the major revision is identified in the content negotiation.\n", "produces": [ "text/plain; version=DEV", "text/plain; version=QA", "text/plain; version=STG", "text/plain; version=2", "text/plain" ], "responses": { "200": { "description": "success", "schema": { "type": "string", "description": "Major, minor and patch version", "example": "1.4.0" } } } } } }, "definitions": { "destination": { "description": "A destination is a city or country, and can include medical and travel risk ratings", "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Country or city numeric idenitifier", "example": 196 }, "href": { "type": "string", "description": "A link to the country or city page in Travel Security Online", "example": "http://www.travelsecurity.com/Country.aspx?cn=196" }, "name": { "type": "string", "description": "The name of the destination", "example": "United States" }, "type": { "type": "string", "description": "The type of destination i.e country or city", "example": "country" }, "isocode": { "type": "string", "description": "The 2 letter country iso code", "example": "us" }, "risks": { "properties": { "medicalrisk": { "type": "integer", "format": "int64", "description": "The medical risk rating numeric idenitifier", "example": 7 }, "traveladvisory": { "type": "integer", "format": "int64", "description": "The travel advisory numeric idenitifier", "example": 3 }, "travelrisk": { "type": "integer", "format": "int64", "description": "The travel risk numeric idenitifier", "example": 2 } } }, "riskzones": { "type": "array", "description": "An array of risk zone ratings for the destination", "items": { "$ref": "#/definitions/RiskZone" } } } }, "region": { "description": "Region groups destinations into a region", "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "The regions unique identifier", "example": 9 }, "href": { "type": "string", "description": "A link to the regions page in Travel Security Online Website", "example": "http://www.travelsecurity.com/Region.aspx?rg=9" }, "name": { "type": "string", "example": "Americas", "description": "The name of the geographic region" }, "destinations": { "type": "array", "description": "A list of destinations belonging to the region", "items": { "$ref": "#/definitions/destination" } } } }, "RiskDefinition": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "example": 7 }, "href": { "type": "string", "description": "A link to the risk defintions page in Travel Security Online Website", "example": "http://www.travelsecurity.com/Page.aspx?pg=4" }, "name": { "type": "string", "description": "The risk definition name", "example": "LOW MEDICAL RISK" }, "text": { "type": "string", "description": "Explanatory text of the risk definition", "example": "
International SOS assigns a low medical risk rating where quality medical care is available throughout the country.
" } } }, "RiskDefinitions": { "type": "array", "items": { "$ref": "#/definitions/RiskDefinition" } }, "RiskZone": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Numeric identifier for the risk zone", "example": 324 }, "href": { "type": "string", "example": "Link to the risk zone in Travel Security Online" }, "name": { "type": "string", "description": "The name of the risk zone that details the impact areas", "example": "Trouble spots in urban areas" }, "travelrisk": { "type": "integer", "description": "The travel risk rating level identifier for this risk zone", "format": "int64", "example": 3 } } }, "risks": { "description": "Risk ratings for a set of destinations", "type": "object", "properties": { "regions": { "description": "In: body", "type": "array", "minItems": 0, "items": { "$ref": "#/definitions/region" } } } } }, "securityDefinitions": { "clientKey": { "type": "apiKey", "name": "Authorization", "in": "header" } }, "security": [ { "clientKey": [] } ] }