HTTP Response Codes
Qubictron uses conventional HTTP response codes to indicate the success or failure of an API request.
A successful request returns the location data itself. A failed one returns a JSON object: errors of the API key
carry success and status_code, errors of the request carry an error message.
| code | response | description |
|---|---|---|
200 | location data | Request completed successfully. Data returned as expected. |
400 | error: Query Is Empty | An autocomplete request has neither query nor any structured field to search by. |
400 | error: not valid id | The id of a place details request is missing or has an unknown format. |
401 | status_code: INVALID_API_KEY | The API key is missing or unknown. Pass it in the lowercase x-api-key header. |
403 | status_code: API_KEY_ACCESS_DENIED | The API key does not have permission to access the Geocoding API. |
403 | status_code: API_KEY_QUOTA_EXCEEDED | The API key has exhausted its total request quota for the current billing period. |
404 | error: Not Found or Invalid ID | No location matches the query, the ID or the coordinates of the request. |
422 | message, errors | A field has an invalid value, e.g. a latitude outside −90…90 or an unknown type. errors lists every problem. |
429 | status_code: API_KEY_RATE_LIMIT_EXCEEDED | The API key has exceeded the allowed request rate. Please slow down and retry. |
500 | error: Internal Server Error | An unexpected internal server error occurred. Please try again or contact support. |