Look up a taxpayer in Hacienda's registry (pre-provisioning prefill)
const url = 'https://api.emite.cr/v1/partner/lookup?identification=3101123456';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.emite.cr/v1/partner/lookup?identification=3101123456'The same padrón lookup that powers party autofill, exposed on the control plane so a partner can prefill razón social + economic activities from just the cédula BEFORE the tenant exists (the tenant-scoped lookup needs a data-plane credential the partner doesn't have yet). Cached server-side for an hour; data comes from Hacienda's public registry. 400 VALIDATION_ERROR unless identification is 9–12 digits; 404 NOT_FOUND when the registry has no taxpayer with that number; 429 RATE_LIMITED or 424 HACIENDA_LOOKUP_UNAVAILABLE when the registry throttles or fails — fall back to manual entry.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Partner app credential (ecp_*)
Query Parameters
Section titled “Query Parameters”Example
31011234569-12 digit identification number.
Responses
Section titled “Responses”object
The identification number that was looked up, as sent.
Identification type as the registry reports it (01 física, 02 jurídica, 03 DIMEX, 04 NITE) — the identificationType to register the contact or company with.
Name in the registry (the razón social of a company) — prefill name with it rather than asking for it.
Tax regime in the registry.
object
Code of the taxpayer's tax regime in the registry; null when it gives none.
Name of that regime as the registry writes it (Spanish); null when it gives none.
Standing in the registry.
object
The registry lists the taxpayer as registered (inscrito) with Hacienda.
The registry flags the taxpayer as in arrears with Hacienda (moroso).
The registry flags the taxpayer as having missed tax filings (omiso).
The economic activities the registry lists for the taxpayer (an entry without code or name is left out); let the user pick the default among them.
object
Activity code as the registry gives it, in its dotted form — the value for economicActivityCode.
Name of the activity as the registry writes it (Spanish).
The registry marks it as the taxpayer's primary activity (tipo P).
The registry lists the activity as active (estado A).
Example
{ "identification": "3101123456", "identificationType": "02", "regimen": { "code": 1, "description": "Régimen General" }, "economicActivities": [ { "code": "6201.0" } ]}