# API issues, 500 error

**URL:** <http://forum.companieshouse.gov.uk/t/api-issues-500-error/8483>\
**Category:** Uncategorized\
**Created:** [September 18, 2024, 12:25pm UTC](http://forum.companieshouse.gov.uk/t/api-issues-500-error/8483 "2024-09-18T12:25:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jgh](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/j/c68b51/32.png) [@jgh](http://forum.companieshouse.gov.uk/u/jgh)\
**Post date:** [September 18, 2024, 12:25pm UTC](http://forum.companieshouse.gov.uk/t/api-issues-500-error/8483/1 "2024-09-18T12:25:22Z")

</div>

I am continuously getting a 500 error with the below for the rest API, even when I reroll my API key.

{‘exception\_id’: ‘4ie8yuh8v580’, ‘error’: ‘Internal server error’}

I assume this is an issue server side, if so any ETA for when it will be fixed?

---

<div class="post-metadata">

**Author:** ![voracityemail](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/v/b77776/32.png) [@voracityemail](http://forum.companieshouse.gov.uk/u/voracityemail)\
**Post date:** [September 19, 2024, 9:26am UTC](http://forum.companieshouse.gov.uk/t/api-issues-500-error/8483/2 "2024-09-19T09:26:35Z")

</div>

I’m not from Companies House, just another user … but these almost always involve some “invalid” form of a URL / parameters being sent. If you’ve searched this forum / read the specifications and not found anything you can see, if you want any further help with this you could try posting the following (some is just basic information, likely not relevant but having more context is always helpful):

Is your application set to be test (sandbox) or live? For almost all purposes it’s best to just create a live application not a test one.

Are you calling from a fixed IP address (server) or is this an AJAX call (e.g. browser-based)? Nothing here should give you a 500 error but have you checked that your IP / domain was registered with Companies House for your application?

Post the exact URL you’re requesting:

e.g. `https://api.company-information.service.gov.uk/company/08730224`

If you’re using a language / function / library / app to do this, can you check to see the _actual_ URL / http headers that are being sent (some libraries / tools can show you this)? That usually shows up what is going wrong. When doing so _don’t post your whole API key_ - however sometimes the first few bytes are useful to show if e.g. the http Basic header is being composed correctly.

Obviously include any parameters you’re passing e.g. if you’re calling search the q parameter etc. Again useful if you can find out the _actual_ data which is being sent to Companies House (perhaps the URL encoding of parameter data is incorrect etc.)

If you’re using a language / library / application to do this list what that is. If you have a (simplified, minimal) code example / a snapshot of the dialog boxes if using an app that can be helpful.

Good luck.

---

<div class="post-metadata">

**Author:** ![jgh](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/j/c68b51/32.png) [@jgh](http://forum.companieshouse.gov.uk/u/jgh)\
**Post date:** [September 19, 2024, 9:37am UTC](http://forum.companieshouse.gov.uk/t/api-issues-500-error/8483/3 "2024-09-19T09:37:55Z")

</div>

I am using a pretty simple python request with the below endpoint

[https://api.company-information.service.gov.uk/company/15966437/](https://api.company-information.service.gov.uk/company/15966437/)

however, if I do [https://api.company-information.service.gov.uk/company/15966437/officers](https://api.company-information.service.gov.uk/company/15966437/officers) I get a 200, so for some reason the base company ping does not work. However, it did like 1 day ago.

Any idea what is going on?

example code below

```
    o_response=o_request_session_individual.get("https://api.company-information.service.gov.uk/company/15966437/", auth=(TRADE_REG_UK_CH_APIKEY_REST, ''),)
```

---

<div class="post-metadata">

**Author:** ![voracityemail](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/v/b77776/32.png) [@voracityemail](http://forum.companieshouse.gov.uk/u/voracityemail)\
**Post date:** [September 19, 2024, 9:57am UTC](http://forum.companieshouse.gov.uk/t/api-issues-500-error/8483/4 "2024-09-19T09:57:10Z")

</div>

Did you see this thread? Companies House is (variably) specific about trailing “/”

[https://forum.aws.chdev.org/t/api-update-release-date-question-for-trailing-bug-fix/8472](https://forum.aws.chdev.org/t/api-update-release-date-question-for-trailing-bug-fix/8472)

For a “ping” see the following thread. I’m not sure the original “official” source (presumably someone on this or the XML forum?). I would guess - but do not know - this may not affect the rate-limiting allowance either. If concerned you should check that experimentally!

[https://forum.aws.chdev.org/t/ping-companies-house-service/1573/7](https://forum.aws.chdev.org/t/ping-companies-house-service/1573/7)
