BETA This is a new service.

Overview

This endpoint returns the metadata for documents filed on the Companies House register.

Request

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

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

Request body

This method does not take any request body parameters.

Response

Response headers

This method does not return specific response headers.

Response body

If successful, this method returns a documentMetaData resource in the body.

Status codes

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

Status codeDescriptionResponse Resource
400 Invalid parameter

CURL example

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

Examples

Fetch a document's metadata

GET /document/gh438fghd09euthg829/metadata HTTP/1.1
Host: document-api.companieshouse.gov.uk
Accept: application/json
Authorization: Basic bXlfYXBpX2tleTo=

HTTP/1.1 200 Found
Access-Control-Allow-Origin: *
Connection: close
Content-Type: application/json; charset=utf-8

{
    "transaction_id": "",
    "company_number": "01234567",
    "barcode": "X1234567",
    "significant_date": "2012-02-29T00:00:00Z",
    "significant_date_type": "made-up-date",
    "category": "accounts",
    "created_at": "2014-07-17T15:18:35.604259447Z",
    "etag": "",
    "links": {
        "self": "/document/gh438fghd09euthg829",
        "document": "/document/gh438fghd09euthg829/content",
    }
    "resources" : {
        "application/pdf" : {
            "content_length" : 442176,
        },
        "application/xhtml+xml" : {
            "content_length" : 234122,
        }
    }
}

Explore this API

id The unique identifier for the document
Authorization This header parameter contains the token_type and the access_token.

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.