Errors

An error is JSON with an error code, and is never cached.

StatusDescription
400A value or body the API cannot take
404A route the API does not have
429Too many geo or validate requests

A 400 also carries a message saying which value it refused:

CODE
{ "error": "bad_request", "message": "country is not a code" }

An unknown country is not an error: a code with no country behind it gets the default layout under its own code, because a visitor from such a place still has to be able to check out. An unknown language is not an error either: it gets English, and content-language on /v1/locales/:lang says which language the body is in.

/v1/geo is limited to 60 requests a minute per IP address, and POST /v1/validate to 120. The data routes are not limited.

A field POST /v1/validate does not pass is not an error: the answer is a 200, and the field says "valid": false. A 400 from it is a body it cannot read: not JSON, no fields object, a value that is not a string, or more than it takes.