Errors
Recognize errors in cell lookups and measurement submissions.
Check both the HTTP status and the response body. Some errors arrive with HTTP 200, and measurement submissions use different response shapes from cell lookups.
Cell API error codes
These codes apply to /cell/get, /cell/getInArea and /cell/getInAreaSize.
| Code | HTTP status | Message | What to do |
|---|---|---|---|
1 | 200 | Cell not found | Check the identifiers or bounding box. See Coverage and missing cells for possible dataset gaps or identifier mismatches. |
2 | 401 | API Key not known: YOUR_API_KEY | Check your API key. The message includes the submitted key; remove it before sharing errors. |
3 | 400 | Invalid input data | Check required parameters, values and the requested format. |
3 | 400 | BBOX too big - Limit to 4,000,000 sq.mts. | Reduce the bounding box. |
5 | 500 | Internal server error | Retry later. Contact us if the error persists. |
7 | 429 | Daily limit exceeded for your API key | See Access and limits for more credits or commercial plans. |
Code 1 can also accompany a message that an endpoint is temporarily unavailable. Some no-result responses include an optional notice with additional information.
Each user receives 1,000 API request credits per day. Use code 7 to identify a daily-limit error; the message does not include the allowance.
Cell API response formats
The examples below show the same invalid-input error in each supported format, with HTTP 400. Empty area searches return a successful empty list, and area counts return zero.
JSON
Available on all three cell endpoints with format=json:
{"error":"Invalid input data","code":3}A lookup with no matching cell returns:
{"error":"Cell not found","code":1}XML
Available on all three cell endpoints with format=xml:
<?xml version="1.0"?>
<rsp stat="fail">
<err info="Invalid input data" code="3"/>
</rsp>AT (plain text)
Available on /cell/get with format=at. Errors begin with +Error: and do not include a numeric code:
+Error:Invalid input dataCSV
Available on /cell/getInArea with format=csv. The header contains info and code, followed by the error:
info,code
Invalid input data,3KML
Available on /cell/getInArea with format=kml. An error uses a kml root with stat="fail" and an err element:
<?xml version="1.0"?>
<kml stat="fail">
<err info="Invalid input data" code="3"/>
</kml>Measurement submission errors
These responses apply to /measure/add, /measure/uploadCsv, /measure/uploadJson and /measure/uploadClf. The uploaded file's format does not determine the error response format.
Missing API key
A missing or empty key returns plain text and may use HTTP 200:
Err: Invalid tokenInvalid upload key
File uploads with a rejected key return HTTP 401 with this JSON body. There is no numeric code field:
{"error":"Invalid API key"}File upload errors
Upload errors can return plain text with HTTP 200. For example:
No file sent.Other messages include:
| Message | Meaning |
|---|---|
Invalid parameters. | The datafile upload is missing or malformed. |
Exceeded filesize limit. | The upload exceeds the server's upload limit. |
Exceeded filesize limit: 4000001 | The file exceeds 4,000,000 bytes; the number is the received file size. |
Invalid file format. | The file is not recognized as plain text, CSV or JSON. |
Unknown errors. | Another file-upload error occurred. |
Failed to move uploaded file. | The server could not accept the uploaded file. Retry later. |
A temporary submission service failure may also return:
errSuccessful file uploads return 0,OK, including JSON uploads. A successful single-measurement submission returns Your measurement has been inserted.
Unknown cell endpoint
An unknown cell endpoint returns HTTP 404 with plain text:
Endpoint does not exist