docs / 06

Errors

The API returns JSON errors with a stable error code and a human-readable message.

Error shape

A rejected request returns a JSON body with at least an error code and a message.

{
  "error": "invalid_fips",
  "message": "county FIPS must be exactly five digits",
  "fips": "abc"
}

HTTP status codes

StatusMeaning
200Success.
201Created (trial token issued).
400Malformed input: an invalid FIPS, status or state filter.
401Missing, invalid or expired credential.
402The trial token has no credits remaining.
403The token is revoked, or the caller is not an admin.
404Unknown county, unknown token id, or unknown path.
409An active trial token already exists for the account.

Error codes

CodeHTTPRaised when
invalid_status400status is not one of the five coverage statuses. The body lists allowed.
invalid_state400state is not a two-letter abbreviation or two-digit FIPS.
invalid_fips400/api/counties/:fips is not exactly five digits.
invalid_county_fips400/api/parcels county_fips is not exactly five digits.
not_found404No tracked county with that FIPS, or no revocable token with that id.
trial_already_active409The account already has an unexpired trial token.
missing401No Authorization: Bearer header was provided.
invalid401The bearer token is not recognised.
expired401The bearer token is past its expiry.
exhausted402A trial token has no credits remaining.
revoked403The bearer token has been revoked.

Examples

An unknown county:

{
  "error": "not_found",
  "message": "No county with FIPS 00000",
  "fips": "00000"
}

An exhausted trial token:

{
  "error": "exhausted",
  "message": "The API token has no credits remaining."
}