Skip to main content

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:

Types and codes

Not every endpoint emits every code; each endpoint’s reference page lists its own. A “no match” is never a 404; it’s a successful 200. Registraduría, SUNAT, and RREE return found: false, and SICAAC and Superfinanciera return an empty list. A 404 means the endpoint or job id itself doesn’t exist.
Async lookups can fail as a job rather than an HTTP error. A failed job carries the same error object in the envelope, with code: "job_failed".