Examples (live system). Note that using curl on command line you provide your (plaintext) API key as part of a user:password
string with the -u
switch. The detail is that the API key is the user part and the password is empty. With curl you can switch on verbose mode and see all the traffic to and from the server if needed ( -v
).
curl -u YOUR_APIKEY: "https://api.company-information.service.gov.uk/company/NF004299"
{"accounts":{"last_accounts":{"made_up_to":"2010-03-31","period_end_on":"2010-03-31","type":"full"},"next_accounts":{"overdue":false,"period_end_on":"2011-03-31"},"next_made_up_to":"2011-03-31","overdue":false},"can_file":false,"company_name":"PDV CONSULTANTS LIMITED","company_number":"NF004299","company_status":"active","date_of_creation":"2008-11-18","etag":"c05ae969e2038b1c81ffe73c11025025d2c6acca","external_registration_number":"488683","foreign_company_details":{"accounting_requirement":{"foreign_account_type":"accounting-requirements-of-originating-country-apply","terms_of_account_publication":"accounting-publication-date-does-not-need-to-be-supplied-by-company"},"is_a_credit_financial_institution":false,"originating_registry":{"country":"NEW ZEALAND"},"registration_number":"488683"},"has_been_liquidated":false,"has_charges":false,"has_insolvency_history":false,"jurisdiction":"united-kingdom","links":{"self":"/company/NF004299","filing_history":"/company/NF004299/filing-history","officers":"/company/NF004299/officers","uk_establishments":"/company/NF004299/uk-establishments"},"previous_company_names":[{"ceased_on":"2022-03-07","effective_from":"2008-11-18","name":"PLATTS DRIEVAP ENGINEERING LIMITED"}],"registered_office_address":{"address_line_1":"Pricewaterhousecoopers 3rd Level Pricewaterhousecoopers Centre","address_line_2":"Cnr Bryce And Anglesea Streets","country":"New Zealand","locality":"Hamilton"},"registered_office_is_in_dispute":false,"type":"oversea-company","undeliverable_registered_office_address":false,"has_super_secure_pscs":false}
curl -u YOUR_APIKEY: "https://api.company-information.service.gov.uk/company/05656883"
{"accounts":{"accounting_reference_date":{"day":"31","month":"12"},"last_accounts":{"made_up_to":"2023-12-31","period_end_on":"2023-12-31","period_start_on":"2023-01-01","type":"micro-entity"},"next_accounts":{"due_on":"2025-09-30","overdue":false,"period_end_on":"2024-12-31","period_start_on":"2024-01-01"},"next_due":"2025-09-30","next_made_up_to":"2024-12-31","overdue":false},"can_file":true,"company_name":"BLOCK 4 PORTERS WOOD MANAGEMENT COMPANY LIMITED","company_number":"05656883","company_status":"active","confirmation_statement":{"last_made_up_to":"2024-12-16","next_due":"2025-12-30","next_made_up_to":"2025-12-16","overdue":false},"date_of_creation":"2005-12-16","etag":"fd54c4079c5bcced3f4cc873f80aed3b30fdea11","has_been_liquidated":false,"has_charges":false,"has_insolvency_history":false,"jurisdiction":"england-wales","last_full_members_list_date":"2015-12-16","links":{"persons_with_significant_control":"/company/05656883/persons-with-significant-control","self":"/company/05656883","filing_history":"/company/05656883/filing-history","officers":"/company/05656883/officers"},"registered_office_address":{"address_line_1":"1 Doolittle Yard","address_line_2":"Froghall Road","country":"England","locality":"Ampthill","postal_code":"MK45 2NW","region":"Bedfordshire"},"registered_office_is_in_dispute":false,"sic_codes":["68320"],"type":"ltd","undeliverable_registered_office_address":false,"has_super_secure_pscs":false}
Non-existent company:
curl -u YOUR_APIKEY: "https://api.company-information.service.gov.uk/company/99999999"
{
"errors": [
{
"type": "ch:service",
"error": "company-profile-not-found"
}
]
}
Good luck.