Guides
Errors
Every error is a JSON object with an error message. Validation errors also list each problem in errors.
AnyoneIn uses standard HTTP status codes. Anything in the 2xx range worked; 4xx means something in the request needs changing; 5xx means something went wrong on our side.
Error shape
Every error response has the same shape: a JSON object with an error string, written to be read by a person. Validation errors add an errors array with one message per problem.
Note
Match on the status code, and on errors for validation. The wording of messages can improve over time, so don't parse them. Error codes you can match on are on the roadmap.
Status codes
| Status | error | Meaning |
|---|---|---|
200 | It worked | |
201 | Created | |
400 | Bad JSON | The body isn't valid JSON |
401 | A message asking for the key | The Authorization header is missing or the key is wrong. See Authentication |
404 | No confirmation with that id. | No confirmation has that id |
404 | Not found | The path doesn't exist |
405 | Method not allowed | Wrong method for the path, such as GET on /advance |
409 | This confirmation is already closed. | You tried to advance or cancel a closed confirmation |
409 | Nothing left to send. | You tried to advance when every step has gone out |
413 | Request too large. | The body is over 40 KB |
422 | Every problem, joined | Validation failed. Details in errors |
429 | That’s a lot of confirmations. Try again in an hour. | Too many creates. See Rate limits |
500 | Something went wrong. | Our fault. Retry with backoff, and tell us if it persists |
422 validation
Creating a confirmation checks everything at once and reports every problem in one response, so you can fix them in one go. The full list of messages is in Create a confirmation.
Retrying
| Status | Retry? |
|---|---|
400, 401, 404, 405, 413, 422 | No. Fix the request first |
409 | No. Retrieve the confirmation to see its current state |
429 | Yes, later. The limit is a rolling hour |
500, network errors, timeouts | Yes, with backoff. For creates, read Idempotency first |
Base URL https://api.anyonein.co.uk/v1 is a placeholder until the production domain is confirmed. Found a mistake? Tell us.