Skip to content

Lookup a taxpayer by Hacienda identification number

GET
/v1/hacienda/lookup
curl --request GET \
--url 'https://api.emite.cr/v1/hacienda/lookup?identification=3101123456' \
--header 'Authorization: Bearer <token>'

Looks the number up in Hacienda's public taxpayer registry (https://api.hacienda.go.cr/fe/ae?identificacion=X), to prefill a contact or a company with its name, identification type and economic activities. Each answer is cached server-side for one hour. The registry is often slow or unavailable: on a 424 or a 429, fall back to manual entry. An alphanumeric cédula jurídica (decreto 44648-MJ) is forwarded as well; on 2026-11-28 the registry still refused one (HTTP 403), which reaches you as the 424.

identification
required
string
Example
3101123456

9-12 digit identification number, or an alphanumeric cédula jurídica (4 digits and 6 letters or digits).

Media typeapplication/json
object
identification
required

The identification number that was looked up, as sent.

string
identificationType
required

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.

string
name
required

Name in the registry (the razón social of a company) — prefill name with it rather than asking for it.

string
regimen
required

Tax regime in the registry.

object
code
required

Code of the taxpayer's tax regime in the registry; null when it gives none.

number
nullable
description
required

Name of that regime as the registry writes it (Spanish); null when it gives none.

string
nullable
status
required

Standing in the registry.

object
isRegistered
required

The registry lists the taxpayer as registered (inscrito) with Hacienda.

boolean
isMoroso
required

The registry flags the taxpayer as in arrears with Hacienda (moroso).

boolean
isOmiso
required

The registry flags the taxpayer as having missed tax filings (omiso).

boolean
economicActivities
required

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.

Array<object>
object
code
required

Activity code as the registry gives it, in its dotted form — the value for economicActivityCode.

string
description
required

Name of the activity as the registry writes it (Spanish).

string
isPrimary
required

The registry marks it as the taxpayer's primary activity (tipo P).

boolean
isActive
required

The registry lists the activity as active (estado A).

boolean
Example
{
"identification": "3101123456",
"identificationType": "02",
"regimen": {
"code": 1,
"description": "Régimen General"
},
"economicActivities": [
{
"code": "6201.0"
}
]
}

Missing identification, or neither 9–12 digits nor an alphanumeric cédula jurídica.

Identification unknown in Hacienda's registry.

HACIENDA_LOOKUP_UNAVAILABLE: the registry could not be reached, answered an error or returned something that is not JSON.

Hacienda is throttling registry lookups.