What does the API response code mean?

200, 400, 401, 404, 409, 429, 500 What do these numbers mean?

So you've got your API key, you've made a POST or GET command and you've received a number as a response. What does this mean?

We have four main set responses that you can receive. However, there are several other lesser used responses which may still be used.  

What does the API response code mean-image1

200 OK

This is the exact response you want to see. Everything was successful.
Your postcard or letter was received by our platform.
Your recipient data was added to the recipient group you selected.
You may still need to check that you're happy with your letter and that you've entered all of your details correctly which you can do from the reporting tab or the API audit log if you have this enabled. 

400 Bad Request

The majority of POST and GET commands have mandatory parameters. If you're receiving this you've missed a highly crucial piece of information. For letters you may not have referenced a template or included a PDF file. Or perhaps you have not mapped the address information correctly.  

401 Forbidden

Everything connected correctly however, you've inputted your API key incorrectly. Check your API key hasn't been refreshed in the API settings.
Your account's API key is essential to ensuring your request connects to the correct account. 

404 Not Found

The request you're trying to make no longer exists. Perhaps you are entering the POST or GET command incorrectly. Check through our API documentation and try again.

409 Conflict

This error code is unlikely to happen with our current regular POST/GET commands however, it can still happen. You will typically receive this response code when you are trying to interact with a resource that is currently in use on our platform or when trying to update a new resource with it's older version. 

429 Too Many Requests

Like many other systems, Stannp can only process so many requests at one time. If one account sends too many requests within a short period it could cause an error to occur. 429 will be shown when this is the case. If you find you are running into this frequently, get in contact with your account manager to be enhanced to a higher rate limit. 

500 Internal Server Error

Our servers at Stannp are rarely ever offline or having issues due to our high security rating and our regular dev team maintenance. If you ever do receive this error, try again soon as we can guarantee that any downtime we do have will be kept to a minimum. 

When receiving this error it is likely that you do not receive the typical JSON response body that you would expect to be supplied.