Mark an obligation as filed / not applicable for a period
const url = 'https://api.emite.cr/v1/fiscal/status';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"obligationCode":"150","customObligationId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","period":"2026-07","status":"pending","filedAt":"2026-04-15T12:00:00Z","note":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.emite.cr/v1/fiscal/status \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "obligationCode": "150", "customObligationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "period": "2026-07", "status": "pending", "filedAt": "2026-04-15T12:00:00Z", "note": "example" }'Send exactly ONE of obligationCode or customObligationId (400 OBLIGATION_SOURCE_AMBIGUOUS). status: pending DELETES the record — pending is derived from the absence of one, never stored. filedAt may be in the past: what is recorded is when it was filed, not when someone remembered to write it down. Requires fiscal:write.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
TRIBU-CR code of a DGT obligation (404 OBLIGATION_NOT_FOUND outside the catalog). Send exactly one of this and customObligationId (400 OBLIGATION_SOURCE_AMBIGUOUS).
Example
150Id of one of the company's own obligations (404 CUSTOM_OBLIGATION_NOT_FOUND when it is not the company's or was removed). Exactly one of this and obligationCode.
The period of the occurrence, exactly as the calendar returns it: YYYY-MM, or YYYY for a window labeled by year.
Example
2026-07filed — mark it as filed; not_applicable — mark it as not applying to the company for this period; pending — clear the mark (the record is deleted: pending is the absence of one).
When it was filed (ISO 8601). It may be in the past: what is recorded is when it was filed, not when someone wrote it down. Omitted with filed, it is now; ignored for any other status.
Free-text note kept with the status; omitting it clears a previous one.
Responses
Section titled “Responses”object
The status now recorded for the period, the one sent: pending means the mark was cleared.
Example
{ "status": "pending"}