Skip to content

Poll Hacienda for the current document status

GET
/v1/hacienda/status/{clave}
curl --request GET \
--url https://api.emite.cr/v1/hacienda/status/50601012600310112345600100001010000000001110000000 \
--header 'Authorization: Bearer <token>'

Queries ATV /recepcion/:clave for the latest status. Use this when waiting for Hacienda to finalize processing of a previously submitted invoice. ATV states: recibido (received), procesando (in flight), aceptado (final accepted), rechazado (final rejected). Recommended polling: exponential backoff starting at 5s, max 60s, ceiling 24h (the job queue does this server-side already; this endpoint is for clients that prefer pull).

clave
required
string
Example
50601012600310112345600100001010000000001110000000

50-digit Hacienda key (clave). Stable across invoice retries.

Current ATV status snapshot

Media typeapplication/json
object
clave
required

50-digit Hacienda key of the document.

string
>= 50 characters <= 50 characters
fecha
required

The emission instant the document declares (<FechaEmision>).

string format: date-time
indEstado
required

Hacienda's state. A submit answers recibido (received, not yet judged); the verdict (aceptado / rechazado) arrives later — read it from the invoice, the status endpoint or the webhooks.

string
Allowed values: recibido procesando aceptado rechazado error
respuestaXml

Hacienda's response XML (MensajeHacienda), base64-encoded. Present once Hacienda has judged the document.

string
detalleMensaje

On a submit, the HTTP status of Hacienda's acknowledgement (HTTP 202). Once Hacienda has judged the document, its DetalleMensaje — the reason of a rejection.

string
Example
{
"indEstado": "recibido"
}

Missing or invalid JWT / API key

Clave unknown in this tenant.

ATV unreachable. Retry later.