Free trial
Colour

API errors reference

Look up each error code the Dispatch API returns, what it means and how to fix it.

For
AdministratorEveryone
Hosting
Any hosting
Devices
All devices
Business
All businesses

Checked against Pop Street Dispatch 0.1.0

Every error has one shape, so a client can read it the same way each time. You will be able to find any code and its remedy.

The shape #

{"error":{"code":"validation_failed","message":"Missing: name.","fields":["name"],"request_id":"9f2c1a4b7d3e8a60"}}
  • code: the stable word to program against.
  • message: plain text for a person.
  • fields: the fields at fault, when there are any.
  • request_id: quote it to support. It matches the X-Request-Id header on the response, and you can send your own (8 to 64 letters, digits, dot, hyphen or underscore).

Success shapes: a record is {"data":{...}}, a list is {"data":[...]}, a page adds next_cursor, and an action returns fields such as {"ok":true}. A new record answers 201.

The codes #

HTTPCodeMeaning and fix
400invalid_jsonThe body is unreadable JSON. Fix the syntax.
400invalid_cursorThe paging cursor is unrecognised. Start again from the first page.
401unauthorizedNo token, a malformed token, an ended or revoked token, or an inactive account. Sign in again.
401invalid_credentialsThe email and password pair failed. Wait a few minutes and try again.
401totp_requiredAdd the 6 digit code in the totp field.
401totp_enrolment_requiredSet up the authenticator app first.
403forbiddenThe role or the key scope excludes the action. Messages: "Ask the owner if you need access.", "This key is read-only.", "This key is for towing dispatch only."
403licence_read_onlyThe licence allows reading and exporting only. Reads still work. See the licence articles.
403password_change_requiredA one-time password is still in use. Send a new password to /auth/change-password.
404not_foundNo record, path or link matches.
405method_not_allowedThe path takes other methods.
409conflictThe request clashes with the current state: a rule refusal (for example an assignment), a repeated set-up, or an idempotency key used for another request.
409no_driverThe account has no active driver record.
413validation_failedAn upload is over 60 MB.
414uri_too_longThe address is over 2000 characters.
422validation_failedA field is missing or invalid. fields names it.
422invalid_dateA date needs ISO 8601 form.
422vin_failedThe VIN failed its check, or needs details by hand.
422upload_failedEvery photo failed the checks.
429rate_limitedToo many requests. Wait a minute. The Retry-After header says 60.
429lockedToo many failed sign-ins. Wait a few minutes.
500server_errorA fault on the server. The detail is in the server log. Try again, and quote the request_id.
503safe_modeThe server is read only after repeated crashes, or a safety check paused changes. Reads, exports and (in safe mode) backups still work. See the safe mode article.

Also useful #

  • Unknown paths answer 404 not_found with "No such path." and OPTIONS answers 204.
  • Every response carries Cache-Control: no-store. A GET that returns 200 carries an ETag, and a repeat with If-None-Match can answer 304.
  • Times are UTC in the form YYYY-MM-DDTHH:MM:SSZ. Lists take limit from 1 to 100 (25 by default), an opaque cursor and updated_since.

If something goes wrong #

Send the request_id and the time to your administrator. See "Server health".