• Register

Rest API V1

This is the most recent version of the British Airways REST API. Get access to the public keys here.

Format of a URI

A resource is accessed using a URI in the following format:

https://api.ba.com/rest-v1/{resourceVersion}/{resourceName};{filters}

The API makes use of Matrix Parameters to filter resource requests. Matrix parameters are specified using name=value pairs separated by a semicolon e.g. 

flights;departureLocation=LHR;startTime=06:00;endTime=11:00

would result in details of all today's flights departing from LHR between 6am and 11am local time.

Versioning 

Versioning allows us to deliver new and enhanced functionality without affecting our existing customers. We version both the API as a whole as well as individual resources.

Versioning the API

Changes that affect all resources will result in an increment of the version number of the REST API e.g. rest-v1 would become rest-v2

Versioning of individual resources

A resource has an associated URI and resource representation. These are versioned together by specifying a version number before the (parent) resource type in the URI. For example:

/v1/flights refers to version 1 of the flights resource. We may choose to make non-backward compatible changes such as removing a matrix parameter or changing the name of a returned element in which case we will create /v2/flights

Clients must ignore unexpected response fields to allow us to evolve the representation without always requiring a version increment.

Supported MIME types

We mostly support both JSON and XML by appending .json or .xml to the end of the URI or setting the Mime type application/json or application/xml in the Accept header. Only the IFE service does not support both, it returns only xml payloads.