Error Handling
HTTP status codes are used to indicate whether or not an operation succeeded. The status code of a response should always be checked first.
The following codes may be expected:
- 200 OK: The requested operation succeeded. Any result can be found in the response body.
- 400 Bad Request: This can indicate a number of things: bad data may be sent, a required field is missing or some invalid value was provided. In any case: it indicates that something was wrong with the request.
- 401 Unauthorized: The authorization header is missing. See authentication for more details on how to properly sign a request.
- 403 Forbidden: The API key used for this request does not have the correct permissions to execute the requested operation.
- 429 Rate Limit Exceeded: Happens when the order creation rate limit has been exceeded.
- 500 Internal Server Error: An error within Ticketmatic. These should never happen and are collected / reported automatically. Nevertheless: it is always very helpful if you contact support when a server error occurs, it greatly helps us in debugging the issue.
Client libraries may hide this information and instead use the error reporting mechanism for the specific language. For example: in PHP an exception is thrown, in Go there’s an extra error return value.