Empty Post town fields and unexpected values in Address Line 2 instead

The post town values for a lot of different company house IDs shows up in the registered address line 2 and instead the Post town values are empty. The Post town values are being consumed by us as mandatory fields. Could you please look into why those values like London show up in reg address line 2 instead of PostTown?

I don’t think the API even has a Post Town field. The way it stores addresses doesn’t have a direct 1-to-1 mapping with the XML that is submitted to Companies House (where Post Town is mandatory). Instead the Post Town field maps to either “address_line_2” or “locality” depending on what other optional information was submitted (Thoroughfare in particular).

I can’t say for sure why it was done this way, but I suspect it’s because address formatting in the UK is a confusing mess and the API has to accomodate not only the current XML data, but historical data from times when different formatting was the norm, non-UK addresses, as well as possible future-proofing. As such it feels like they’ve simplified things a little to make it easier to supply address in a universal format that can be easily formatted. Only the premise (address_line_1) and Postcode (postal_code) really matter, so the rest is just easy-to-format window dressing.

From experience: this can create problems if the same system that is sending addresses to Companies House (via XML) is also consuming data from the API for maintainence. It’s fairly easy to convert both an XML address block and an API address block into a common format so you can compare the two.However, converting an API address block back to an XML address block could be a bit of a problem (fortunately, for us, we have no need to do that).

Note: This isn’t an official answer, just some guesses and information about how we dealt with it from someone who was in a similar position in the past!

Edit: One thing that might be worth noting is that you can still retrieve this information via XML. However address formating is even more generic when you do that with the address block being reduced to a series of ordered “AddressLine” elements that contain no information about what part of the address is what.

Hi Ash,

Thank you for your response, I guess them not demarcating between the address fields could you be a reason, However we are consuming the data from the bulk CSV and not the XML that they share with the details of the companies. And the CSV has dedicated columns for post town and line1 and line 2 address, do you reckon the issue with the data is the same there too?

You need to bear in mind that the role of Companies House is to record and make available information provided to them; the end result is, as always, only as good as the original input which may be, for example

in the wrong field
misspelt / keyboard error
deliberately wrong / misleading

By and large issues remain until a responsible person at the Company makes the necessary correction.

In summary the data is what it is and those of us that consume it simply have to make the best of it! Good luck!