Errors

The CHeKT API uses standard HTTP status codes plus a structured JSON envelope. You get a stable code to switch on, a human message for logs, and an optional request_id for support tickets.

Error envelope

{
  "error": {
    "code": "device_not_found",
    "message": "No device with that ID exists on this dealer.",
    "request_id": "req_91kxl2",
    "field": "device_id"
  }
}

Status codes

StatusMeaningWhat to do
400Bad requestInspect error.field, validate input, retry.
401UnauthorizedRefresh or rotate your API key.
403ForbiddenAdd the missing permission to your app.
404Not foundVerify the resource ID and dealer scope.
409ConflictRetry after refreshing local state.
422Validation failedSurface error.field to the user.
429Rate limitedBack off — see rate limits.
5xxServer errorSafe to retry with backoff. Open a ticket if it persists.

Common error codes

  • invalid_api_key — token missing, expired, or revoked.
  • permission_denied — your app lacks the required scope.
  • device_not_found — the device ID doesn't exist under this dealer.
  • webhook_signature_invalid — your verification failed; check the signing secret.
  • idempotency_conflict — same idempotency key used with different payload.

Always log the request_id

When you open a support ticket, the request_id lets us trace exactly which request misbehaved. Log it on every 4xx and 5xx.