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?
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.
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?