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

StatuserrorMeaning
200It worked
201Created
400Bad JSONThe body isn't valid JSON
401A message asking for the keyThe Authorization header is missing or the key is wrong. See Authentication
404No confirmation with that id.No confirmation has that id
404Not foundThe path doesn't exist
405Method not allowedWrong method for the path, such as GET on /advance
409This confirmation is already closed.You tried to advance or cancel a closed confirmation
409Nothing left to send.You tried to advance when every step has gone out
413Request too large.The body is over 40 KB
422Every problem, joinedValidation failed. Details in errors
429That’s a lot of confirmations. Try again in an hour.Too many creates. See Rate limits
500Something 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

StatusRetry?
400, 401, 404, 405, 413, 422No. Fix the request first
409No. Retrieve the confirmation to see its current state
429Yes, later. The limit is a rolling hour
500, network errors, timeoutsYes, 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.