Envelope
Successful responses return{ "data": … }. Failures return an error
object and a non-2xx HTTP status. Branch on the status code, not a body flag:
Every response also carries an
X-Request-Id header; include it when
reporting an issue. Error responses repeat the code in an
X-Croma-Error-Code header, so you can branch without parsing the body.
Types and codes
A “no match” on a list is never a
404: searches and feeds return 200
with an empty data, and a defendant with no cases returns an empty list.
Only the single-case endpoints (GET /v1/processes/{id} and its
/actions) return 404, and only when the id or radicado isn’t in your
organization. A case that exists but belongs to another organization also
reads as 404.Exports can also fail as a job rather than as an HTTP
error: a polled or called-back job carries the same
error object inside the
envelope, with code: "job_failed".