Error codes
Error codes are stable API surface. Branch oncode, 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.
PERIOD_TYPE_NOT_SUPPORTED returns structured details so you can branch on data rather
than on prose:
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 awarnings 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 (unlessfail_fast: true). Each employee result includes its own status:
"fail_fast": true in batch options to abort on the first error instead.