Documentation Index
Fetch the complete documentation index at: https://docs.croma.run/llms.txt
Use this file to discover all available pages before exploring further.
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:
| Field | Notes |
|---|---|
type | Broad category (see below). |
code | Specific machine-readable code. Branch on this. |
message | Human-readable; safe to surface in UI. |
param | Offending field. Present on validation errors. |
details | Optional structured detail (e.g. all validation issues). |
Types and codes
| Status | type | code | Meaning |
|---|---|---|---|
400 | invalid_request_error | invalid_param | Body failed validation; see param / details. |
400 | invalid_request_error | too_many_results | Query matched too many records to return. Narrow it. |
401 | authentication_error | invalid_api_key | Missing or invalid key. |
401 | authentication_error | personal_api_key_not_allowed | A personal key was used; org keys only. |
404 | not_found_error | resource_not_found | No record in the upstream source. |
404 | not_found_error | endpoint_not_found | No API endpoint at that path. See /catalog. |
405 | invalid_request_error | method_not_allowed | Wrong method. Data endpoints are POST. |
429 | rate_limit_error | rate_limited | Quota exceeded; see Rate limits. |
5xx | upstream_error | <source>_upstream | A government source failed or was unreachable. |
500 | api_error | internal_error | Unexpected internal error. |
Not every endpoint emits every code.
resource_not_found only applies to
lookups that resolve a specific record (e.g. Registraduría, SUNAT, RREE).
Endpoints that proxy a government source can return an upstream_error — for
example Rama Judicial returns rama_judicial_upstream with the source’s own
status code, falling back to 502. Each endpoint’s reference page lists its
codes.Handling errors
Branch on the HTTP status first, thenerror.code for programmatic handling
and error.message for display:
X-Request-Id response header when reporting an issue. It lets us
trace the exact request.