Void document
DELETE /api/v1/facturas/{clave}
Marks a document as voided in the POS’s internal database. Use this when you need to reflect the operational voiding of the document (for example, to keep it out of the customer’s active listing).
Authentication
| Attribute | Value |
|---|---|
| Required scope | facturas:anular |
Critical behavior
This endpoint does NOT send a credit note to Hacienda. It only sets the anulada=true field in the POS’s internal database, which has no tax effect.
To void a document for tax purposes once Hacienda (Costa Rica’s tax authority) has already accepted it, you must issue a credit note (NC) with POST /api/v1/facturas. Keep the permission in mind: the NC requires the notas:write scope, not facturas:write — see Scopes.
{
"tipo": "NotaCredito",
"idUsuario": 7,
"cliente": { "idCliente": 42 },
"condicionVenta": "01",
"medioPago": "01",
"moneda": "CRC",
"lineas": [ /* same lines or a subset */ ],
"referencias": [
{
"tipoDocumento": "01",
"numero": "50615012600310112345600100001010000000123456789012",
"fechaEmision": "2026-05-15T15:32:11Z",
"codigo": "01",
"razon": "Anulación total por error en el cliente"
}
]
}Responses
| Code | Meaning |
|---|---|
204 No Content | Document marked as voided in the POS. |
404 Not Found | The key does not exist in this API key’s tenant. |