Max Size of Elements of companyProfile.registered_office_address

Hi there

Can someone explain size of elements of api companyProfile.registered_office_address?

“registered_office_address” : {
“address_line_1” : “string”,
“address_line_2” : “string”,
“care_of” : “string”,
“country” : “string”,
“locality” : “string”,
“po_box” : “string”,
“postal_code” : “string”,
“premises” : “string”,
“region” : “string”
},

All the elements are described as string. I have to store these elements in our back office. So, need to be more specific on size limits due to back office element size limits.

Thanks in Advance.

Short answer - check the XML Schema Definition files on the XML Gateway site. They may give you an idea of some of the corresponding fields in the REST API.

Longer:
(I have no direct information on the data sizes for the Companies House API - he following information is drawn from this forum.)

The main thread enquiring about this is:

In this Companies House stated:

We haven’t published field lengths as we are discussing if todo so and the most appropriate method. The reasoning behind being so reserved is we do not want to restrict ourselves and others with specific field lengths as changing in the future could be classed as a breaking change to the API and we want to limit breaking changes.

However at least one post by Companies House explicitly suggests checking the XML schema definitions if you want data specifications (for size). Here’s one from 2016:

The main XML gateway page is at:
https://xmlgw.companieshouse.gov.uk/

The schema definitions (as XML Schema Definition files - XSD) are at:
https://xmlgw.companieshouse.gov.uk/v1-0/xmlgw/SchemaStatusOutput

There is also an XML Gateway forum which might be of interest. Obviously what appears there may or may not be relevant to the Companies House REST API.
http://xmlforum.aws.chdev.org/

The following touches on the mappings between (address) XML submitted to Companies House and what they make available and might also be of interest:

Other threads with info on field lengths:
A note on something which appears to exceed the “suggested” lengths:

“The address lines have a maximum length of 128 characters each”

Currently none of the live companies on the register have more than 128 chars in any of the address fields.