kevbite / CompaniesHouse.NET

A simple .NET client wrapper for CompaniesHouse API
MIT License
37 stars 44 forks source link

New changes to some API data types. #183

Open mattu08 opened 2 years ago

mattu08 commented 2 years ago

Hi,

Just thought, i'd bring this to your attention just in case this is the first time you have heard of these changes below:

You can read the full post from this link: https://forum.aws.chdev.org/t/upcoming-changes-to-the-api-and-stream-responses/5299

I have also posted the post below if this also helps.

" MArkWilliams Companies House

There will be changes made to the following specifications to align with the data that is being returned from the api and stream responses;

Insolvency - Companies House Public Data API: companyInsolvency ( 2company-information.service.gov.uk 1) 2

The cases[].number is currently an integer. This will now be shown as a string. The cases[].practitioners[].address[].postal_code is currently shown as mandatory. This will now be optional. A new cases[].type of moratorium has been added.

Charges - Companies House Public Data API: chargeDetails ( 2company-information.service.gov.uk 1) 2

The insolvency_cases[].case_number is currently an integer. This will now be shown as a string. The transactions[].insolvency_case_number is currently an integer. This will now be shown as a string. The transactions[].transaction_id will be deprecated. Please use transactions[].links[]. The scottish_alterations[].type and scottish_alterations[].description will be deprecated as they are not returned in the api or stream response. The insolvency_cases[].transaction_id will be deprecated because the value was in an unusable format. "

Thanks,

Matt

bernhard-dwe commented 2 years ago

Is the CH API versioned @mattu08 ? I.e. could we avoid breaking changes by consuming an older version until the changes in the latest version are supported in this library?

mattu08 commented 2 years ago

Hi @BernhardHofmannAtDwellant

As this is a post from the CH Development forum it is hard to tell, from what I’ve read so far it looks like upcoming changes, annoyingly there isn’t a specified date on the post for when these changes are going to be pushed LIVE, also you cannot reply to the post which isn’t helpful.

From your question about using an older version until these changes are made. I guess there could be a possibility, I’ve never really looked into if the API has different version's, could be a good work around if so. Someone that understands the CH API a little more may have to clarify. The only thing I have noticed is that the links within that post point to “?v=latest” so could well be.

bernhard-dwe commented 2 years ago

I think I made an incorrect assumption - that you worked at/on the CH API.

Indeed it was the ?v=latest on the documentation that lead me to believe there might be versioning, but I see no mention of it in the documentation, which is sad because it means we'll always be rushing to implement the latest enum values when they introduce a new type/status/etc.

kevbite commented 2 years ago

@mattu08 @BernhardHofmannAtDwellant I've never seen any versioning on their API docs since it was in beta, it's a lot of effort supporting multiple API versions but you never know they might have something that's not public knowledge

kevbite commented 2 years ago

Just looking back over the docs and there is mention of versioning using Accept/Content-Type headers but nowhere in the actual API documentation tells you anything about these versions of resources. https://developer-specs.company-information.service.gov.uk/guides/versioning