API Reference
The full endpoint reference, generated from the OpenAPI 3.1 contract.
Every page under this section is generated from the OpenAPI 3.1 contract
(sdk/openapi/sello.openapi.yaml) by fumadocs-openapi at build time, so the
reference never drifts from the API. To change a request/response shape, edit the
contract — the docs follow.
The reference is grouped by resource. Each operation has its own page with the request/response schemas, an interactive playground, and code samples.
Groups
- Documents — issue a comprobante, list documents, poll Hacienda status, download the PDF, trigger email delivery.
- Received Documents — ingest a supplier's signed comprobante, browse the inbox, file a Mensaje Receptor.
- Emisores — read an emisor's consecutivo series and seed one from the last number used at Hacienda.
- Webhooks — register your endpoint
and the outbound callbacks Sello POSTs: document verdicts and failures
(
document.accepted,document.rejected,document.failed), IVA-rate divergences, and usage crossings. - Reference — the read-only
catalog endpoints: dataset registry, CABYS, and IVA rates (mounted at
/reference). - Connect — connector
onboarding (mounted at
/connect): provision a company, mint and redeem a credential upload grant, read an emisor's credential status. See Connector onboarding.
All /v1 and /reference routes require a bearer API key. Errors are RFC 9457
application/problem+json — see Error handling.
Odoo
Configure an Odoo Online company so every posted invoice becomes a Costa Rican electronic voucher.
Issue an electronic document (FE / TE / NC / ND)
Validate, build the v4.4 XML, allocate the consecutivo + 50-digit clave, sign the comprobante (XAdES-EPES), and persist it. Returns `201 Created` on a fresh issue (or `200 OK` on an idempotent replay) with the allocated `clave`, `numeroConsecutivo`, and `state: "signed"`; the engine then submits to Hacienda out of band, walking the state machine (`signed → submitted → accepted | rejected`). Poll `GET /v1/documents/{clave}` or subscribe to webhooks for the terminal outcome. Mutations require an `Idempotency-Key`: replaying the same key returns the original result without re-issuing (no double-submit to Hacienda). A well-formed document outside the published supported-scenario matrix (https://ca-sello-docs.orangesmoke-cacc8fb5.eastus2.azurecontainerapps.io/docs/guides/supported-scenarios) is refused with a `422` whose `type` is `https://sello.cr/problems/unsupported-scenario`, carrying `matrixVersion`, the distinct `scenarios[]` ids and one `errors[]` entry per offending field. The refusal runs ahead of the consecutivo allocation, the quota charge and the idempotency reservation, so it costs nothing and the same key may be retried with a corrected body. The body is limited to 2 MiB and `detalleServicio` to 1000 lines (Hacienda's maximum); for very large lines the byte limit is the one that binds. Every object in the body is closed: an unknown field anywhere in it is a `422` whose `errors[].path` names it, raised before any consecutivo is allocated. `clave`, `numeroConsecutivo` and `fechaEmision` are allocated by Sello and are refused the same way.