Skip to main content
All errors follow a consistent JSON structure:
Use the code field for programmatic error handling, not the HTTP status code. Include the request_id when contacting support to help trace your request.

Error codes

Error codes are stable API surface. Branch on code, not on the HTTP status.

Authentication

See Authentication for the key format and rotation.

Request validation

VALIDATION_ERROR reports the exact field path. For a single calculation that is employee.risk_class_rate; in a batch it is employees.{i}.risk_class_rate, which is the only thing that is actionable in a batch of 500.
risk_class_rate is required for MX, CO, AR and CL, and has no default. Omitting it returns 422 VALIDATION_ERROR. A batch is rejected whole — schema validation happens before any row runs.
PERIOD_TYPE_NOT_SUPPORTED returns structured details so you can branch on data rather than on prose:
A batch with an unsupported period.type fails whole, not row by row: a period no row can liquidate is not a single row’s error. See Pay periods.

Calculation

Retrieval

A resource belonging to another client returns 404, never 403. Clevis does not reveal that a record it will not show you exists.

Availability

PERSISTENCE_UNAVAILABLE means exactly what it says: the calculation was not stored, and therefore no id and no amounts were returned. This is deliberate. Handing back an id that nothing can ever fetch is the defect stored calculations exist to fix. Retry with the same Idempotency-Key. /v1/payroll/simulate and /v1/payroll/schemes do not depend on storage and are not affected.
There is no RATE_LIMIT_EXCEEDED and no 429. Earlier versions of this page listed one; rate limiting is not implemented.

Payouts

Payout error codes are documented separately in Payout errors.

Warnings are not errors

A successful calculation can still carry a warnings array. A warning never changes an amount and never changes the status code — it reports that an input contradicts something the engine can check for itself. See Warnings.

Handling errors in code

Batch error handling

In batch requests, individual employee errors do not abort the entire batch (unless fail_fast: true). Each employee result includes its own status:
Set "fail_fast": true in batch options to abort on the first error instead.