Why do I get the Error 500 – Internal Server Error

While using the API2, it can happen that sometimes the server will return a request with the error code: 500 Internal Server Error.

The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the web site's server but the server could not be more specific on what the exact problem is.

Most of the time this error happens due to problems with the load in the database, a bug in the code or problems in the servers operating system or software environment. However, another posibility is that the request send to the API has the a bad format, wrong encoding or is missing some necessary tags. 

The best way to target the resolution of this error is just to try again later after a period of time. It could be that the server was too busy to handle your request at that precise time, but after a few minutes it is ready and available. You could create some retry logic in your code in order to handle this error, if after a maximum amounts of retries you still get this error then you can prompt it to the user or log it somewhere. If the error keeps on recurring then you need to contact our support department for further help on the issue.

If the cause of the error is a badly formatted xml/json document, then please try to create a request with all the fields presented in the Api documentation.