# Officers endpoint - register\_view=true results in 400 or 404

**URL:** <http://forum.companieshouse.gov.uk/t/officers-endpoint-register-view-true-results-in-400-or-404/703>\
**Category:** API Issues\
**Created:** [August 3, 2016, 9:46pm UTC](http://forum.companieshouse.gov.uk/t/officers-endpoint-register-view-true-results-in-400-or-404/703 "2016-08-03T21:46:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![adzxt](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/a/e95f7d/32.png) [@adzxt](http://forum.companieshouse.gov.uk/u/adzxt)\
**Post date:** [August 3, 2016, 9:46pm UTC](http://forum.companieshouse.gov.uk/t/officers-endpoint-register-view-true-results-in-400-or-404/703/1 "2016-08-03T21:46:34Z")

</div>

Using the API explorer, I am trying to retrieve the directors for a company, so I set the `register_view=true` and `register_type=directors`.

With both set, I get 404. With only register\_view set, I get 400. With only register\_type set, I get 200 but it brings back all officers including company secretaries.

Happens with all companies.  
200: `GET /company/00002065/officers HTTP/1.1`  
400: `GET /company/00002065/officers?register_view=true HTTP/1.1`  
404: `GET /company/00002065/officers?register_type=directors&register_view=true HTTP/1.1 `

Is there a workaround or fix?

---

<div class="post-metadata">

**Author:** ![flisowski](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/flisowski/32/272_2.png) [@flisowski](http://forum.companieshouse.gov.uk/u/flisowski)\
**Post date:** [August 8, 2016, 8:58am UTC](http://forum.companieshouse.gov.uk/t/officers-endpoint-register-view-true-results-in-400-or-404/703/2 "2016-08-08T08:58:00Z")

</div>

Hello adzxt,  
I’m sorry to hear you are experiencing difficulties with our API.

The reason you are getting 400 - bad request - is because both the register\_view and register\_type parameters  
are required. Please, refer to the documentation :

> **[List the company officers](https://developer.company-information.service.gov.uk/api/docs/company/company_number/officers/officerList.html)**

Please, take a look at description of fields “register\_view” and "register\_“type”.

“[…] The register\_type field will only work if registers\_view is set to true […]”  
and  
“[…] If given register is held at Companies House, registers\_view set to true and correct  
register\_type specified, only active officers will be returned. […]”

The reason you are getting 404 - not found - is because the register is not held at companies house. Hence,  
you can not view that specific set of data as the official register is not held with us.

You can see which registers are held with us using registers API :

> **[Get the company registers information](https://developer.company-information.service.gov.uk/api/docs/company/company_number/registers/readCompanyRegister.html)**

If the result is 404 ( it is for the company you used ) adding the register\_view or register\_type parameters will not return anything.

Regards,  
Filip

---

<div class="post-metadata">

**Author:** ![adzxt](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/a/e95f7d/32.png) [@adzxt](http://forum.companieshouse.gov.uk/u/adzxt)\
**Post date:** [August 8, 2016, 9:30am UTC](http://forum.companieshouse.gov.uk/t/officers-endpoint-register-view-true-results-in-400-or-404/703/3 "2016-08-08T09:30:35Z")

</div>

Hi Filip,

Thanks for the response. I’m not quite sure I understand fully.  
There are two points of concern:

1. For the same company, if I get the officers without the register\_view and register\_type parameters, it returns all of the officers; active/resigned, directors or secretary. Would that not indicate that the data is present but applying a filter to only show active directors isn’t working?

2. I’ve just tested the Registers API that you linked to with about 10 different companies ranging from small newly formed businesses to FTSE100 companies. Each one returns 404; how is it determined whether companies house holds the register or not, and for those where CH doesn’t hold it, who does?

Regards,

Adz

---

<div class="post-metadata">

**Author:** ![flisowski](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/flisowski/32/272_2.png) [@flisowski](http://forum.companieshouse.gov.uk/u/flisowski)\
**Post date:** [August 8, 2016, 10:51am UTC](http://forum.companieshouse.gov.uk/t/officers-endpoint-register-view-true-results-in-400-or-404/703/4 "2016-08-08T10:51:53Z")

</div>

Adzxt,

Before I answer those questions let me explain what a register is. We’ll take register of directors as an example.

Companies House requires every company to maintain the register of directors and this register is to be kept available for inspection. Typically this register is kept at the registered office address of the company (other possibility is single alternative inspection location - SAIL ). However, they now have an option of electing to keep their register at Companies House. Only specific information is required to be shown on a register. For example, for registers of directors - only active directors are shown including their full date of birth.

This is why we have the 2 new parameters ( you can treat them as filters ) to enable customers to see data that is specific to each register and register only. It is important to distinguish between a company that hasn’t elected to hold its register at Companies House and one that has. If a company hasn’t elected to hold their register at Companies House, we can only show a generic officer listing including all types and statuses of officers. If they’ve elected to hold their register at Companies House this allows us to deliver a specific set of data based on register\_type and register\_view parameters.

Looking at available parameter names ( register\_type and register\_view ) you can see they are very specific to registers and can not be used on their own - you can not set register\_type=directors without setting register\_view=true - also they only work if given register is held at Companies House. Currently it is not possible to filter on officer type ( directors, secretaries, etc. ) or status ( active, resigned ). Those special type filters I mentioned above were only implemented to support the ‘register view’ of data not to be used as separate filters.

To answer your 2nd question - companies need to notify us of their intent to hold their register at Companies House. Because, this is a relatively new feature, not many companies have notified us yet and therefore, you’d get 404 for the vast majority of companies.

An example of a company which has chosen to elect to hold some of their registers with us is company number : 07300678 . If you call the registers API using the aforementioned company number, you will see they elected to hold their directors, secretaries and usual residential address registers with us. Looking at the API response JSON, you can see each register held with us has a link to a resource itself - for that particular example:

```
"directors": {
     "links": {
       "directors_register": "/company/07300678/officers?registers_view=true&register_type=directors"
     },
     "items": [
       {
         "register_moved_to": "public-register",
         "moved_on": "2016-07-01"
       }
     ]
   }

```

Kind regards,  
Filip

---

<div class="post-metadata">

**Author:** ![adzxt](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/a/e95f7d/32.png) [@adzxt](http://forum.companieshouse.gov.uk/u/adzxt)\
**Post date:** [August 8, 2016, 6:31pm UTC](http://forum.companieshouse.gov.uk/t/officers-endpoint-register-view-true-results-in-400-or-404/703/5 "2016-08-08T18:31:00Z")

</div>

Thanks for taking the time to explain that fully, much appreciated.
