BETA This is a new service.

Overview

This endpoint returns a document filed on the Companies House register in the requested format. The URI for the document to be requested is returned, where available, by the Companies House company filing history endpoint. The formats available for a document, and other meta data, may be requested through the meta data endpoint.

Request

GET http://document-api.companieshouse.gov.uk/document/{id}/content

Query parameters

Parameter nameValueDescriptionAdditional
id string The unique identifier for the document

Request headers

Parameter nameValueDescriptionAdditional
Authorization This header parameter contains the token_type and the access_token. See example
Accept Gives the Content-Type that the document will be returned as. If the Content-Type is unsupported, a 406 error will be generated. The Content-Types that the document is available as can be found by requesting the metadata for the document.

Request body

This method does not take any request body parameters.

Response

Response headers

This method does not return specific response headers.

Response body

None.

Status codes

The following HTTP status codes may be returned, optionally with a response resource:

Status codeDescriptionResponse Resource
200 The resource is returned as the requested Content-Type
302 A redirect is being made to the resource to be returned
400 Invalid parameter
406 Not acceptable

CURL example

curl -uYOUR_APIKEY_FOLLOWED_BY_A_COLON: http://document-api.companieshouse.gov.uk/document/{id}/content

Examples

Fetch a document

GET /document/gh438fghd09euthg8294ughehwieugh397 HTTP/1.1
Host: document-api.companieshouse.gov.uk
Accept: application/pdf
Authorization: Basic bXlfYXBpX2tleTo=

HTTP/1.1 200 Found
Access-Control-Allow-Origin: *
Connection: close
Content-Type: application/pdf
Content-Transfer-Encoding: binary
Content-Length: 442176

%PDF-1.5
%
4 0 obj
<<
/Type /Page
...
...
%

Explore this API

id The unique identifier for the document
Authorization This header parameter contains the token_type and the access_token.
Accept Gives the Content-Type that the document will be returned as. If the Content-Type is unsupported, a 406 error will be generated.

To explore this api, you must be signed in and have registered for at least one API key. Registration takes a few seconds, and allows you to explore the API from right here in the web page!

You can create an API key through Your Applications page.