Skip to content

Developers

Errors

API docs: Errors

Back to the index

Error format

A failed request returns an HTTP status and a body in the RFC 9457 application/problem+json format:

{
  "type": "/problems/insufficient-scope",
  "title": "The API key does not hold the required scope.",
  "status": 403,
  "code": "insufficient_scope",
  "detail": "This route requires activity:write.",
  "required_scopes": ["activity:write"]
}
FieldMeaning
typeA path that names the problem. It is the code with dashes.
titleA short summary for people
statusThe HTTP status, repeated
codeA stable, machine-readable code. Write your error handling against this field.
detailWhat went wrong in this request. The text can change. Do not parse it.
required_scopesOnly on insufficient_scope: the scopes that the request needs

One exception. When no key is sent, or the value does not start with tc_live_ or tc_test_, the reply is 401 with this body. It is not a problem body:

{ "status": 401, "message": "Unauthorized: no bearer token was sent." }

Error codes

HTTPcodeCauseWhat to do
400validation_failedThe body or a parameter is not validRead detail and fix the request. Do not retry it unchanged.
401(none)No key was sent, or the value does not start with tc_live_ or tc_test_Send the full key in X-API-Key
401api_key_invalidThe key is not knownCheck the key
401api_key_revokedThe key was revokedGet a new key
401api_key_expiredThe key passed its expiry dateGet a new key
403insufficient_scopeThe key does not have a scope that the request needsAsk for the scope in required_scopes
403forbiddenThe key cannot act on this company or record, or a write key has no source systemCheck companyCode, the key's company and the key's source system
403not_ownerThe equipment belongs to another source systemDo not write records that another system owns
404not_foundNo record has this id, or it is outside the key's companiesCheck the id
409conflictThe code is taken, the record belongs to another source system, or the record changed after you read itRead detail. For a stale update, read the record again and retry.
409code_takenAnother piece of equipment already uses this code. This code is for equipment only. A Job code clash is conflict.Use another code, or update the existing record
429rate_limitedToo many requests. Reserved: the API does not enforce rate limits yet.Wait, then retry with back-off
500internal_errorAn error on our side. A create can be saved even when it returns 500.Before you retry a create, look the record up by its code. Retry reads later. If it continues, contact support.
503service_unavailableThe service cannot check the key at the momentRetry after a few seconds
503instance_mismatchThe service is being moved or set upRetry later. If it continues, contact support.

Retries

StatusRetry?How
429, 503YesUse exponential back-off, for example 1 s, 2 s, 4 s. Stop after 5 tries.
500 on a readYesRetry later. If it continues, contact support.
500 on a createOnly after a checkThe record can exist. Look it up by its code first, for example GET /activities?q=<code> or GET /equipment-catalog?q=<code>. A create sent again for a saved record gets 409.
400, 401, 403, 404, 409NoThey fail again. Fix the request first. A stale 409 is the one case where you read the record again, apply your change and send a new request.

A PATCH that sends values the record already has changes nothing. It is safe to retry.

Contact support

Email support@matrixtimecard.com. Include the code and detail from the response, the request method and path, and the time of the request (UTC).