HGV Traders Docs

Errors

HTTP status codes and error response format for the HGV Traders API.

Error envelope

Failed requests return JSON with a single error string:

{ "error": "Invalid query" }

Successful requests use the { "data": ... } envelope described in Overview.

Status codes

CodeMeaningTypical cause
400Bad requestInvalid query parameters, malformed JSON body, or missing organisationId when the user belongs to multiple organisations
401UnauthorizedMissing, invalid, expired, or revoked bearer token; invalid credentials on POST /api/v1/auth
403ForbiddenPATCH /api/v1/accounts without ADMIN role on the target organisation
404Not foundResource does not exist, is not published, or the caller is not a member of the requested organisation
429Too many requestsRate limit exceeded — see Rate limits. Response includes a Retry-After header (seconds)
503Service unavailableSearch backend temporarily unavailable on public list endpoints

Rate limit responses

When rate limited, the response body is:

{ "error": "Too many requests. Please try again later." }

or, for auth:

{ "error": "Too many attempts. Please try again later." }

Always honour the Retry-After header before retrying.

Search errors

Public list endpoints (/api/v1/jobs, /events, /posts) may return:

  • 400 with "Invalid search query" — malformed free-text search syntax
  • 503 with "Search unavailable" — search index temporarily unreachable

Retry 503 responses with exponential back-off.