Including additional resources

In order to reduce the number of requests that applications need to make, additional resources can be requested for a company in a single request. This can be achieved by appending the '?include=' GET parameter to the call followed by the list of resources separated by a comma.

For example, to retrieve the the directorships and addresses in addition to its standard company information in a single call, the following URL can be requested:

https://api2.redflagalert.net/v4/companies/01777777/?include=directorships,addresses

The directorships and addresses returned will be the same as those returned in the following endpoints:

https://api2.redflagalert.net/v4/companies/01777777/directorships/

https://api2.redflagalert.net/v4/companies/01777777/addresses/

In addition, a special β€˜all’ parameter can be added to return all of the above information. For example:

https://api2.redflagalert.net/v4/companies/01777777/?include=all

All requested resources will be listed in the 'included' section of the return that is on the same level as 'data' for the parent company resource. Each will contain a 'type' and 'ID' key along with an 'attributes' key listing the actual data.

Inside the company resource's 'data' section, the appropriate 'relationships' elements will also be extended with the ID and the type of the included resources following the JSON API format.

If an invalid resource name is requested or the company does not have the appropriate data, it will be ignored. If a resource name is requested multiple times, it will still only be returned once.

Please note, that due to the nature of some of the queries such as filing-history, not all endpoints can be included.

Those included in the '?include=all' parameter are:

Last updated