This is general advice for anyone handling company numbers…
The expectation is that the API will be navigated from search, which provides the appropriate links:{}
sub-document containing the correct company profile API URI (with a correctly formatted company number).
If you bypass the search, then the expectation is that you know what the company number is - you must have got it from somewhere, right?
. So (rhetorically) why is your company number missing characters?
Sometimes the answer to the above is that a developer has stored the company numbers in a database as a numeric, which drops the leading zeros. But that is bad, because company numbers are alphanumeric, despite being called “numbers”. For example, FC000002
.
Other times it is that in the handling/processing of the company number stripped the leading zeros if they looked like numbers (classically seen when a spreadsheet has been involved somewhere along the chain, but there are other cases).
Lastly, it is because the company number has been manually typed in by a human, who “tidied it up” by skipping the leading zeros. In this case, a company number such as FC000002
is very likely to have been typed in correctly, whereas 00000002
is not.
Just some things to think about to help prevent company numbers from being modified.
Now, the following scheme is not infallible, but since the current format is eight alphanumeric characters, if you have a number which is 7 characters or less, then prefix it with leading zeros. If you have a number which begins with two alphabetic charactes, such as FC2
, then you need to pad the inner characters, giving FC
00000
2
.
Like I said, it is not infallible (and will change in the future when we start running out), so a far better approach is to make sure that your company numbers are entered and stored correctly in the first place.