BeMyPlan API

Data API

Reference data for travel: what it covers and how it behaves.

The Data API serves reference data for travel: airlines, aircraft types, airports, cities, countries and place suggestions. Its base path is /data/v1 and it needs a key with the scope data:read. It is read only: every operation is a GET.

ResourceListBy idId looks like
Airports/data/v1/airports/data/v1/airports/{airportId}arp_ + 16 characters
Cities/data/v1/cities/data/v1/cities/{cityId}cit_ + 16 characters
Countries/data/v1/countries/data/v1/countries/{countryId}ISO 3166-1 alpha-2 code
Airlines/data/v1/airlines/data/v1/airlines/{airlineId}arl_ + 16 characters
Aircraft/data/v1/aircraft/data/v1/aircraft/{aircraftId}arc_ + 16 characters
Places/data/v1/places/suggestionsnonenone

How the data behaves

  • Ids are stable. They are identical in the sandbox and in production, so it is safe to store them. An id changes only if the underlying code is reassigned, for example an IATA code given to another airport.
  • Lists return active records only. Fetching a record by id also returns a deactivated one, with active: false, so the ids you stored keep resolving. Records are never deleted.
  • Codes are upper case (IATA, ICAO and ISO), and every response returns them that way. The API trims and upper-cases a code you send before it checks it, so ?iataCode=ams and ?iataCode=AMS give the same result. The pattern in the OpenAPI document accepts both cases. Ids (arp_...) are different: they are lower case and are not normalised, so an upper-case id answers 400.
  • Unknown query parameters are refused with 400, naming the parameter, so a typo such as ?iatacode=AMS is caught instead of returning the unfiltered list. An empty value counts as not sent, for every parameter. See Errors.
  • name filters match the start of the name, ignoring case and accents.
  • Time zones are IANA names, for example Europe/Amsterdam.
  • Coordinates are WGS 84 decimal degrees.
  • Lists are paginated with cursors or pages: see Pagination.
  • Responses are cacheable with ETags: see Caching.
  • Price: Data API operations cost 0 credits unless your contract sets a price: see Credits.

Fields and parameters in full: the API reference.

On this page