API reference

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.

CodeHTTP statusMessageWhat to do
1200Cell not foundCheck the identifiers or bounding box. See Coverage and missing cells for possible dataset gaps or identifier mismatches.
2401API Key not known: YOUR_API_KEYCheck your API key. The message includes the submitted key; remove it before sharing errors.
3400Invalid input dataCheck required parameters, values and the requested format.
3400BBOX too big - Limit to 4,000,000 sq.mts.Reduce the bounding box.
5500Internal server errorRetry later. Contact us if the error persists.
7429Daily limit exceeded for your API keySee 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 data

CSV

Available on /cell/getInArea with format=csv. The header contains info and code, followed by the error:

info,code
Invalid input data,3

KML

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 token

Invalid 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:

MessageMeaning
Invalid parameters.The datafile upload is missing or malformed.
Exceeded filesize limit.The upload exceeds the server's upload limit.
Exceeded filesize limit: 4000001The 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:

err

Successful 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

On this page