I don’t quite follow - you’re just calling the api with https://api.companieshouse.gov.uk/company/03034606/charges yes? In which case as you’ve said you’ll get back some subset of the charges (e.g. 25 if that’s what you find, ordered most - least recent). Charge list is one of the “paged lists” where you may need to call repeatedly setting the start_index
and items_per_page
parameters as appropriate (note *).
The charge list documentation doesn’t guarantee that it will return all the charges, or a particular category (satisfied / unsatisfied) (although I wish it would…) or that it’ll give you them in any particular order. Along with any charge items it returns it should give you three fields:
total_count
part_satisfied_count
satisfied_count
So (forgive labouring the point) in the case of 03034606 - EASYJET AIRLINE COMPANY LIMITED if I get back 25 charge items from calling the API and I see that total_count
is 209 I’ll call again but setting e.g. start_index
to 25 (and items_per_page
to 25) to get the next set of results. If you just want the outstanding ones, keep a count of them and as soon as it matches ( total_count
- part_satisfied_count
- satisfied_count
) you’re done.
Note *: if you’re searching with start_index
> 300 you might not get the expected response: http://forum.aws.chdev.org/t/search-company-officers-returns-http-416-when-start-index-over-300/897