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.
Endpoint
Section titled “Endpoint”POST /api/voided-documents
Authentication
Section titled “Authentication”Authorization: Bearer sk_live_YOUR_API_KEY or Authorization: Bearer JWT_TOKEN
Request body
Section titled “Request body”{ "issueDate": "2026-02-20", "referenceDate": "2026-02-19", "correlative": 1, "items": [ { "series": "F001", "correlative": 1, "documentType": "01", "reason": "Error en datos del cliente" } ]}Field reference
Section titled “Field reference”Root fields
Section titled “Root fields”| Field | Type | Required | Description |
|---|---|---|---|
issueDate | string | Yes | Issue date of the voided document in YYYY-MM-DD format |
referenceDate | string | Yes | Date of the original document being voided in YYYY-MM-DD format |
correlative | number | Yes | Sequential number for the voided document |
items | array | Yes | Documents to void (minimum 1) |
Item object (voided)
Section titled “Item object (voided)”| Field | Type | Required | Description |
|---|---|---|---|
series | string | Yes | Series of the document to void |
correlative | number | Yes | Correlative of the document to void |
documentType | string | Yes | Document type code (01, 03, 07, 08) |
reason | string | Yes | Reason for voiding the document |
Response
Section titled “Response”Success (201 Created)
Section titled “Success (201 Created)”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}Async flow: checking the ticket
Section titled “Async flow: checking the ticket”After receiving the ticket, you must poll to check the status.
Check ticket endpoint
Section titled “Check ticket endpoint”POST /api/documents/:id/check-ticket
curl -X POST https://api.suit.pe/api/documents/cm3vwx234/check-ticket \ -H "Authorization: Bearer sk_live_YOUR_API_KEY"Pending response
Section titled “Pending response”If SUNAT has not processed the document yet:
{ "status": "SENT", "cdrResponseCode": null, "cdrDescription": null}Final response (accepted)
Section titled “Final response (accepted)”{ "status": "ACCEPTED", "cdrResponseCode": "0", "cdrDescription": "La Comunicacion de Baja numero RA-20260220-00000001, ha sido aceptada"}Final response (rejected)
Section titled “Final response (rejected)”{ "status": "REJECTED", "cdrResponseCode": "2329", "cdrDescription": "El documento referenciado no existe"}Recommended polling strategy
Section titled “Recommended polling strategy”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');}Differences from sync documents
Section titled “Differences from sync documents”| Aspect | Sync documents (Facturas, etc.) | Voided documents |
|---|---|---|
| SUNAT method | sendBill | sendSummary |
| Response | Immediate final status | Ticket number (async) |
| Status flow | Request -> ACCEPTED/REJECTED | Request -> SENT -> poll -> ACCEPTED/REJECTED |
| Retry | POST /api/documents/:id/retry | POST /api/documents/:id/check-ticket |