ReferralHero uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the
2xxrange indicate success, codes in the
4xxrange indicate an error that failed given the information provided (e.g., a required parameter was omitted, an update failed, etc.), and codes in the
5xxrange indicate an error with ReferralHero's servers (these are rare).
When a request returns an error we always try to provide a clear explanation of what went wrong. Errors are returned as JSON files and follow the same structure:
message: "Error explanation" // Eg: "Missing API token"
code: "error_code" // Eg: no_token
Our API raises errors for many reasons and when this happens the "status" attribute will always be "error". We recommend writing code that gracefully handles all possible API exceptions.
A human-readable message providing more details about the error.
The type of error returned. See list of possible errors below: