Streaming record schema definition

The schema given here for the company change stream record format:

includes a property:


Is that colon at the end meant to be there? Looks like a typo.

Is there a name for this format for specifying a JSON schema? I can tell it’s not but it seems pretty regular and easy to understand. There are primitive types:


If the value of a property is an object, it’s a nested schema. If the value is an array, it will (I guess) always have a single element which is either a primitive or a nested schema. Is this accurate?

1 Like

At this path in the schema:

"data": {
    "accounts": {
        "last_accounts": {
            "type": {}

In the first real record I looked at, the “type” property is not an object, but a string. In this case it was "total-exemption-full".

Is there any documentation for the maximum length of the string properties in these change stream records?

I’ve no idea for the streaming API specifically. However:
(a) Companies House have said they didn’t want to commit themselves previously about field lengths (on the main REST API) - see:

…but the gave some “it might be this” indications some time back for some fields:

(b) You could make a starting assumption (and verify…) that if the field is one in the main API it will be the same via stream API. Then the main API may have an equivalent / represent the same underlying data as something in the XML gateway. That represents the older technology and that does have some lengths in their schemas (e.g. see XML the “base types” definitions). Check from the main page that you’re looking at the current one as they do update.

1 Like