Apart from the handful of foreign destinations for which API is a requirement (such as Spain, USA, Canada, Australia, Mexico, etc.) it is also meant to be a mandatory requirement of all flights to and from the UK as per the e-Borders policy implemented by the UK Border Agency.
http://www.ukba.homeo...dvanceinfopassengers/
UK requested API only becomes mandatory for transmission when all passengers are aboard the plane so it could be thought of as PI (i.e. not needed in advance of travel) as it may be collected at check-in, whereas foreign countries may need API to be transmitted many hours before the plane is boarded (e.g. USA - 72 hours before departure).