Skip to content

Comunicacion de Baja (RA)

Comunicaciones de Baja (voided documents) are used to annul previously emitted documents. Unlike other document types, voided documents use SUNAT’s asynchronous flow — you send the request, receive a ticket number, and then poll for the result.

POST /api/voided-documents

Authorization: Bearer sk_live_YOUR_API_KEY or Authorization: Bearer JWT_TOKEN

{
"issueDate": "2026-02-20",
"referenceDate": "2026-02-19",
"correlative": 1,
"items": [
{
"series": "F001",
"correlative": 1,
"documentType": "01",
"reason": "Error en datos del cliente"
}
]
}
FieldTypeRequiredDescription
issueDatestringYesIssue date of the voided document in YYYY-MM-DD format
referenceDatestringYesDate of the original document being voided in YYYY-MM-DD format
correlativenumberYesSequential number for the voided document
itemsarrayYesDocuments to void (minimum 1)
FieldTypeRequiredDescription
seriesstringYesSeries of the document to void
correlativenumberYesCorrelative of the document to void
documentTypestringYesDocument type code (01, 03, 07, 08)
reasonstringYesReason for voiding the document

Unlike sync documents, the initial response includes a ticket number and the status is SENT:

{
"id": "cm3vwx234",
"ticket": "1708123456789",
"status": "SENT",
"cdrResponseCode": null,
"cdrDescription": null
}

After receiving the ticket, you must poll to check the status.

POST /api/documents/:id/check-ticket

Terminal window
curl -X POST https://api.suit.pe/api/documents/cm3vwx234/check-ticket \
-H "Authorization: Bearer sk_live_YOUR_API_KEY"

If SUNAT has not processed the document yet:

{
"status": "SENT",
"cdrResponseCode": null,
"cdrDescription": null
}
{
"status": "ACCEPTED",
"cdrResponseCode": "0",
"cdrDescription": "La Comunicacion de Baja numero RA-20260220-00000001, ha sido aceptada"
}
{
"status": "REJECTED",
"cdrResponseCode": "2329",
"cdrDescription": "El documento referenciado no existe"
}

Poll every 5-10 seconds, with a maximum of 12 attempts (approximately 1-2 minutes). If the status is still SENT after all attempts, try again later.

async function checkTicket(documentId, apiKey, maxAttempts = 12) {
for (let i = 0; i < maxAttempts; i++) {
const response = await fetch(
`https://api.suit.pe/api/documents/${documentId}/check-ticket`,
{
method: 'POST',
headers: { 'Authorization': `Bearer ${apiKey}` }
}
);
const result = await response.json();
if (result.status !== 'SENT') {
return result; // Final status reached
}
// Wait 5 seconds before next attempt
await new Promise(resolve => setTimeout(resolve, 5000));
}
throw new Error('Ticket check timed out');
}
AspectSync documents (Facturas, etc.)Voided documents
SUNAT methodsendBillsendSummary
ResponseImmediate final statusTicket number (async)
Status flowRequest -> ACCEPTED/REJECTEDRequest -> SENT -> poll -> ACCEPTED/REJECTED
RetryPOST /api/documents/:id/retryPOST /api/documents/:id/check-ticket