Invalid CompaniesHousePersonalCode format

We are occassionally seeing the following error when attempting to submit a new Company Incorporation.

Invalid CompaniesHousePersonalCode format

There is no regular expression pattern in the XSD schema, so I wondered if this is truly a formatting error with the Personal Code?

Does this error instead indicate a mismatch in the supplier name and DOB vs that which the personal code is assigned to? Are these checks done at the point of submission or are they done post-submission?

Thanks

Just a heads up in case you weren’t aware, there is a separate XML forum here: https://xmlforum.companieshouse.gov.uk/

There’s been at least one post along similar lines with a response from Simon, althought that was specifically regarding CS01s: Is there any way to validate UIDs - Invalid CompaniesHousePersonalCode format - Confirmation Statement (New Annual Return) - Companies House XML Gateway Forum

As far as I’m aware there’s no kind of checksum or regex style validation beyond 11 alphanumerics (with all letters being capital). Most seem to be in the format of five or six letters followed by six or five numbers, but this does vary. We’ve had one that was ten letters and one number (thrilling stuff!)

If it’s any help we haven’t encountered this error in 100+ formations, although we have had a couple of rejections for incorrect code. These are standard rejections with a message: The identity verification details provided for the director XXXXX were not correct. Before you try again, you should check that you have the right Companies House personal code, and make sure their details on the Companies House register…

This suggests that validation of the code against the individual is post-submission, and the errors you are getting are… not sure actually!

The only other thing I can think of that might be worth checking is when we’ve encountered similar errors in the past, it’s not related to the formatting of the data, but either order or existence of the field in question (with the error message being bit misleading). So invalid XYZ format sometimes means ā€œI was expecting XYZ here but got something else insteadā€ or even ā€œI was not expecting XYZ hereā€. Although if yoiu’re generating XML systematically and the error is only occasionaly, that probably wouldn’t make sense unless there was a common factor in all the ones that are failing (thinking along the lines of something like code inserting a blank ID block for Corporate Appointments or something like that).

In fact the more I think about the more I seem to recall that pretty much every time we’ve had ā€œinvalid formatā€ errors after a schema update it’s been related to a field being included when it shouldn’t, or not being included where it was expected, and nothing to do with the formatting itself!

If you are in a position to share redacted incorporation XML for one that failed, either here or by DM I’d be happy to have a look and see if I can spot anything.

1 Like

I didn’t know about the XML forum, that could prove to be very useful, thank you.

In this particular case it later transpired that the accountant had copied the code from a low resolution screen shot and miskeyed something. :man_facepalming:

accountant here. not a developer, though i do dable in the API.

seems like the LAST 5 characters (at least) must always be numbers. a client made a typo when providing their code to me. instead of an ā€˜8’ at character position 7 told me it was a ā€˜B’. correcting this now allowed me to send the CS01 and VS01 without validation errors. now waiting for submission of CS01 to be accepted. VS01 has gone through OK.

I have also obtained from other clients (only a few), codes that have 6 numbers at the end, though i’ve not attempted submitting these yet as the window is not open….

can someone from companies house verify my findings?

why isn’t this simple ā€˜rule’ documented anywhere so that developers can build in validation? its hardly a trade secret is it? companies house know how they programmed the code which spits out the personal code, so why dont they tell us?