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. |
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. |
405 | invalid_request_error | method_not_allowed | Wrong method. Data endpoints are POST. |
429 | rate_limit_error | rate_limited | Quota exceeded; see Rate limits. |
500 | api_error | internal_error | Unexpected internal error. |
Not every endpoint emits every code.
404 only applies to lookups that
resolve a specific record (e.g. Registraduría, SUNAT, RREE). Endpoints that
proxy a flaky upstream (e.g. Rama Judicial) may return 502 with an
upstream_error type. Each endpoint’s reference page lists its codes, and
some upstreams use endpoint-specific code values.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.