These calls should be working, though our documentation may be a bit unclear.
The process to retrieve an image is:
- Fetch the filing history resource for the company you want - e.g. https://api.companieshouse.gov.uk/company/00002065/filing-history
- Get the
links.document_metadata
URL from a filing history resource, which is a fully qualified URL pointing to a specific image on the Document API - Request the Document metadata using the provided document_metadata URL - e.g. https://document-api.companieshouse.gov.uk/document/AnDp9GA5JHgybR-BeUMb4n4D9QhDP4_4N25uPi4aB5M
- From the metadata, get an available resource type, e.g.
application/pdf
- Request the content by appending
/content
, e.g. https://document-api.companieshouse.gov.uk/document/AnDp9GA5JHgybR-BeUMb4n4D9QhDP4_4N25uPi4aB5M/content
application/pdf
is returned as the default resource. If other resource types are returned in the metadata, these can be requested from the same /content
URL by setting the Accept
header, e.g. Accept: application/xhtml+xml
.
The API key you use for https://api.companieshouse.gov.uk should also work for https://document-api.companieshouse.gov.uk, and will be rate limited independently.
‘Explore this API’ for Document API on the Developer site doesn’t currently work as expected, but the API endpoints and returned content should match the documentation.