UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 15.4 kB
{"openapi":"3.0.0","info":{"description":"\nBefore using this API, we recommend you read our **[Authorization Guide](https://developers.amadeus.com/self-service/apis-docs/guides/authorization-262)** for more information on how to generate an access token. \n \nPlease also be aware that our test environment is based on a subset of the production, this API in test only returns a few selected cities. You can find the list in our **[data collection](https://github.com/amadeus4dev/data-collection)**.","title":"Safe Place","version":"1.0.0","x-logo":{"url":"https://amadeus.com/images/en/technology/mobile-tablet/mobile-woman-office-city.jpg.transform/medium/img.jpg"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/amadeus4dev/amadeus-open-api-specification/main/spec/json/SafePlaceAPI_v1_swagger_specification.json","version":"2.0"}],"x-providerName":"amadeus.com","x-release-note":{"1.0":["Initial Version"]},"x-serviceName":"amadeus-safe-place-","x-status":"validated","x-tags":["#ama-for-dev"]},"paths":{"/safety/safety-rated-locations":{"get":{"description":"","operationId":"getSafetyRanking","parameters":[{"description":"Latitude (decimal coordinates)","in":"query","name":"latitude","required":true,"example":41.397158,"schema":{"type":"number","format":"double"}},{"description":"Longitude (decimal coordinates)","in":"query","name":"longitude","required":true,"example":2.160873,"schema":{"type":"number","format":"double"}},{"description":"radius of the search in Kilometer. Can be from 0 to 20, default value is 1 Km.","in":"query","name":"radius","required":false,"schema":{"type":"integer","minimum":0,"maximum":20,"default":1}},{"$ref":"#/components/parameters/pageLimit"},{"$ref":"#/components/parameters/pageOffset"}],"responses":{"200":{"$ref":"#/components/responses/safety-rated-locations"},"400":{"$ref":"#/components/responses/400"},"default":{"$ref":"#/components/responses/500"}},"summary":"Returns safety rating for a given location and radius.","tags":["Search"]}},"/safety/safety-rated-locations/by-square":{"get":{"description":"","operationId":"getSafetyRankBySquare","parameters":[{"description":"Latitude north of bounding box (decimal coordinates)","in":"query","name":"north","required":true,"example":41.397158,"schema":{"type":"number","format":"double"}},{"description":"Longitude west of bounding box (decimal coordinates)","in":"query","name":"west","required":true,"example":2.160873,"schema":{"type":"number","format":"double"}},{"description":"Latitude south of bounding box (decimal coordinates)","in":"query","name":"south","required":true,"example":41.394582,"schema":{"type":"number","format":"double"}},{"description":"Longitude east of bounding box (decimal coordinates)","in":"query","name":"east","required":true,"example":2.177181,"schema":{"type":"number","format":"double"}},{"$ref":"#/components/parameters/pageLimit"},{"$ref":"#/components/parameters/pageOffset"}],"responses":{"200":{"$ref":"#/components/responses/safety-rated-locations"},"400":{"$ref":"#/components/responses/400"},"default":{"$ref":"#/components/responses/500"}},"summary":"Returns the safety rating of a given area","tags":["Search"]}},"/safety/safety-rated-locations/{safety-rated-locationId}":{"get":{"description":"","operationId":"getLocationSafetyRanking","responses":{"200":{"$ref":"#/components/responses/safety-rated-location"},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"default":{"$ref":"#/components/responses/500"}},"summary":"Retieve safety information of a location by its Id.","tags":["Retrieve"]},"parameters":[{"$ref":"#/components/parameters/safety-rated-locationId"}]}},"x-generatedAt":"2025-06-15T13:47:10.190Z","servers":[{"url":"https://test.api.amadeus.com/v1"}],"components":{"parameters":{"pageLimit":{"description":"maximum items in one page","in":"query","name":"page[limit]","required":false,"schema":{"type":"integer","default":10}},"pageOffset":{"description":"start index of the requested page","in":"query","name":"page[offset]","required":false,"schema":{"type":"integer","default":0}},"safety-rated-locationId":{"description":"identifier of the location","in":"path","name":"safety-rated-locationId","required":true,"example":"Q930402719","schema":{"type":"string"}}},"responses":{"400":{"description":"code | title \n------- | ------------------------------------- \n477 | INVALID FORMAT\n572 | INVALID OPTION\n4926 | INVALID DATA RECEIVED \n32171 | MANDATORY DATA MISSING \t \n","content":{"application/vnd.amadeus+json":{"schema":{"$ref":"#/components/schemas/Error_400"}}}},"404":{"description":"Not Found","content":{"application/vnd.amadeus+json":{"schema":{"$ref":"#/components/schemas/Error_404"}}}},"500":{"description":"Unexpected Error","content":{"application/vnd.amadeus+json":{"schema":{"$ref":"#/components/schemas/Error_500"}}}},"safety-rated-location":{"description":"Successful Operation","content":{"application/vnd.amadeus+json":{"schema":{"example":{"data":[{"geoCode":{"latitude":41.385064,"longitude":2.173404},"id":"Q930402719","name":"Barcelona","safetyScores":{"lgbtq":39,"medical":0,"overall":45,"physicalHarm":36,"politicalFreedom":50,"theft":44,"women":34},"self":{"methods":["GET"],"type":"https://test.api.amadeus.com/v1/safety/safety-rated-locations/Q930402719"},"subType":"CITY","type":"safety-rated-location"}],"meta":{"links":{"self":"https://test.api.amadeus.com/v1/safety/safety-rated-locations/Q930402719"}}},"properties":{"data":{"$ref":"#/components/schemas/SafetyRatedLocation"},"meta":{"$ref":"#/components/schemas/Collection_Meta"},"warnings":{"items":{"$ref":"#/components/schemas/Issue"},"type":"array"}},"required":["data"],"title":"Success"}}}},"safety-rated-locations":{"description":"Successful Operation","content":{"application/vnd.amadeus+json":{"schema":{"example":{"data":[{"geoCode":{"latitude":41.385064,"longitude":2.173404},"id":"Q930402719","name":"Barcelona","safetyScores":{"lgbtq":39,"medical":0,"overall":45,"physicalHarm":36,"politicalFreedom":50,"theft":44,"women":34},"self":{"methods":["GET"],"type":"https://test.api.amadeus.com/v1/safety/safety-rated-locations/Q930402719"},"subType":"CITY","type":"safety-rated-location"},{"geoCode":{"latitude":41.3885573,"longitude":2.1573033},"id":"Q930402720","name":"Antiga Esquerra de l'Eixample (Barcelona)","safetyScores":{"lgbtq":37,"medical":0,"overall":44,"physicalHarm":34,"politicalFreedom":50,"theft":42,"women":33},"self":{"methods":["GET"],"type":"https://test.api.amadeus.com/v1/safety/safety-rated-locations/Q930402720"},"subType":"DISTRICT","type":"safety-rated-location"},{"geoCode":{"latitude":41.412131,"longitude":2.1683571},"id":"Q930402721","name":"Baix Guinardó (Barcelona)","safetyScores":{"lgbtq":37,"medical":0,"overall":44,"physicalHarm":34,"politicalFreedom":50,"theft":42,"women":33},"self":{"methods":["GET"],"type":"https://test.api.amadeus.com/v1/safety/safety-rated-locations/Q930402721"},"subType":"DISTRICT","type":"safety-rated-location"},{"geoCode":{"latitude":41.380894,"longitude":2.189385},"id":"Q930402722","name":"Barceloneta (Barcelona)","safetyScores":{"lgbtq":42,"medical":0,"overall":47,"physicalHarm":39,"politicalFreedom":50,"theft":49,"women":34},"self":{"methods":["GET"],"type":"https://test.api.amadeus.com/v1/safety/safety-rated-locations/Q930402722"},"subType":"DISTRICT","type":"safety-rated-location"},{"geoCode":{"latitude":41.4172284,"longitude":2.163444},"id":"Q930402724","name":"Can Baró (Barcelona)","safetyScores":{"lgbtq":37,"medical":0,"overall":44,"physicalHarm":34,"politicalFreedom":50,"theft":42,"women":33},"self":{"methods":["GET"],"type":"https://test.api.amadeus.com/v1/safety/safety-rated-locations/Q930402724"},"subType":"DISTRICT","type":"safety-rated-location"},{"geoCode":{"latitude":41.384728,"longitude":2.18286},"id":"Q930402731","name":"El Born (Barcelona)","safetyScores":{"lgbtq":42,"medical":0,"overall":47,"physicalHarm":39,"politicalFreedom":50,"theft":49,"women":34},"self":{"methods":["GET"],"type":"https://test.api.amadeus.com/v1/safety/safety-rated-locations/Q930402731"},"subType":"DISTRICT","type":"safety-rated-location"},{"geoCode":{"latitude":41.4118532,"longitude":2.1830997},"id":"Q930402732","name":"El Camp de l'Arpa del Clot (Barcelona)","safetyScores":{"lgbtq":37,"medical":0,"overall":45,"physicalHarm":35,"politicalFreedom":50,"theft":43,"women":33},"self":{"methods":["GET"],"type":"https://test.api.amadeus.com/v1/safety/safety-rated-locations/Q930402732"},"subType":"DISTRICT","type":"safety-rated-location"},{"geoCode":{"latitude":41.4046685,"longitude":2.1659005},"id":"Q930402733","name":"El Camp d'en Grassot i Gràcia Nova (Barcelona)","safetyScores":{"lgbtq":37,"medical":0,"overall":44,"physicalHarm":34,"politicalFreedom":50,"theft":42,"women":33},"self":{"methods":["GET"],"type":"https://test.api.amadeus.com/v1/safety/safety-rated-locations/Q930402733"},"subType":"DISTRICT","type":"safety-rated-location"},{"geoCode":{"latitude":41.422371,"longitude":2.1560753},"id":"Q930402734","name":"El Carmel (Barcelona)","safetyScores":{"lgbtq":37,"medical":0,"overall":44,"physicalHarm":34,"politicalFreedom":50,"theft":42,"women":33},"self":{"methods":["GET"],"type":"https://test.api.amadeus.com/v1/safety/safety-rated-locations/Q930402734"},"subType":"DISTRICT","type":"safety-rated-location"},{"geoCode":{"latitude":41.4097037,"longitude":2.1892366},"id":"Q930402735","name":"El Clot (Barcelona)","safetyScores":{"lgbtq":37,"medical":0,"overall":45,"physicalHarm":35,"politicalFreedom":50,"theft":43,"women":33},"self":{"methods":["GET"],"type":"https://test.api.amadeus.com/v1/safety/safety-rated-locations/Q930402735"},"subType":"DISTRICT","type":"safety-rated-location"}],"meta":{"count":43,"links":{"first":"https://test.api.amadeus.com/v1/safety/safety-rated-locations?latitude=41.397158&longitude=2.160873&page%5Boffset%5D=0&radius=2","last":"https://test.api.amadeus.com/v1/safety/safety-rated-locations?latitude=41.397158&longitude=2.160873&page%5Boffset%5D=4&radius=2","next":"https://test.api.amadeus.com/v1/safety/safety-rated-locations?latitude=41.397158&longitude=2.160873&page%5Boffset%5D=1&radius=2","self":"https://test.api.amadeus.com/v1/safety/safety-rated-locations?latitude=41.397158&longitude=2.160873&radius=2"}}},"properties":{"data":{"items":{"$ref":"#/components/schemas/SafetyRatedLocation"},"type":"array"},"meta":{"$ref":"#/components/schemas/Collection_Meta"},"warnings":{"items":{"$ref":"#/components/schemas/Issue"},"type":"array"}},"required":["data"],"title":"Success"}}}}},"schemas":{"Collection_Meta":{"properties":{"count":{"example":1,"type":"integer"},"links":{"example":{"self":"https://test.api.amadeus.com/v1/area/resources?param=value"},"properties":{"first":{"example":"https://test.api.amadeus.com/v1/area/resources?...","format":"uri","type":"string"},"last":{"example":"https://test.api.amadeus.com/v1/area/resources?...","format":"uri","type":"string"},"next":{"example":"https://test.api.amadeus.com/v1/area/resources?...","format":"uri","type":"string"},"previous":{"example":"https://test.api.amadeus.com/v1/area/resources?...","format":"uri","type":"string"},"self":{"example":"https://test.api.amadeus.com/v1/area/resources?...","format":"uri","type":"string"},"up":{"example":"https://test.api.amadeus.com/v1/area/resources?...","format":"uri","type":"string"}},"title":"CollectionLinks"}},"title":"Collection_Meta"},"Error_400":{"example":{"errors":[{"code":477,"detail":"invalid query parameter format","source":{"example":"CDG","parameter":"airport"},"status":400,"title":"INVALID FORMAT"}]},"properties":{"errors":{"items":{"$ref":"#/components/schemas/Issue"},"type":"array"}},"required":["errors"]},"Error_404":{"example":{"errors":[{"code":1797,"detail":"no response found for this query parameter","source":{"parameter":"airport"},"status":404,"title":"NOT FOUND"}]},"properties":{"errors":{"items":{"$ref":"#/components/schemas/Issue"},"type":"array"}},"required":["errors"]},"Error_500":{"example":{"errors":[{"code":141,"status":500,"title":"SYSTEM ERROR HAS OCCURRED"}]},"properties":{"errors":{"items":{"$ref":"#/components/schemas/Issue"},"type":"array"}},"required":["errors"]},"GeoCode":{"properties":{"latitude":{"description":"latitude of the location","example":43.580418,"format":"double","type":"number"},"longitude":{"description":"longitude of the location","example":7.125102,"format":"double","type":"number"}}},"Issue":{"properties":{"code":{"description":"an application-specific error code","format":"int64","type":"integer"},"detail":{"description":"explanation of the error","type":"string"},"source":{"description":"an object containing references to the source of the error","maxProperties":1,"properties":{"example":{"description":"a string indicating an example of the right value","type":"string"},"parameter":{"description":"a string indicating which URI query parameter caused the issue","type":"string"},"pointer":{"description":"a JSON Pointer [RFC6901] to the associated entity in the request document","type":"string"}},"title":"Issue_Source","type":"object"},"status":{"description":"the HTTP status code applicable to this error","type":"integer"},"title":{"description":"a short summary of the error","type":"string"}}},"Links":{"example":{"href":"string"},"properties":{"count":{"type":"integer"},"href":{"format":"uri","type":"string"},"methods":{"items":{"enum":["GET","PUT","DELETE","POST","PATCH"],"type":"string"},"type":"array"}},"required":["href"]},"Location":{"properties":{"geoCode":{"$ref":"#/components/schemas/GeoCode"},"id":{"description":"id of the ressource","type":"string"},"name":{"description":"short name of the location","example":"Paris CDG","type":"string"},"self":{"$ref":"#/components/schemas/Links"},"subType":{"description":"location sub type","enum":["AIRPORT","CITY","POINT_OF_INTEREST","DISTRICT"],"example":"AIRPORT","type":"string"},"type":{"description":"the resource name","example":"location","type":"string"}}},"SafetyRatedLocation":{"allOf":[{"properties":{"safetyScore":{"$ref":"#/components/schemas/SafetyScore"}},"type":"object"},{"$ref":"#/components/schemas/Location"}],"title":"SafetyRatedLocation","type":"object"},"SafetyScore":{"properties":{"lgbtq":{"description":"Likelihood of harm or discrimination against LGBTQ persons or groups and level of caution required at location. Score go from 1 (not likely) to 100 (very likely).","type":"integer"},"medical":{"description":"Likelihood of illness or disease, assessment of water and air quality, and access to reliable medical care. Score go from 1 (not likely) to 100 (very likely).","type":"integer"},"overall":{"description":"An average of the 6 “sub”-categories. Score go from 1 (very safe) to 100 (very dangerous).","type":"integer"},"physicalHarm":{"description":"Likelihood of injury due to harmful intent. Score go from 1 (not likely) to 100 (very likely).","type":"integer"},"politicalFreedom":{"description":"Potential for infringement of political rights or political unrest. Score go from 1 (not likely) to 100 (very likely).","type":"integer"},"theft":{"description":"Likelihood of theft. Score go from 1 (not likely) to 100 (very likely).","type":"integer"},"women":{"description":"Likelihood of inappropriate behavior against females. Score go from 1 (not likely) to 100 (very likely).","type":"integer"}}}}}}