The Spanish version is the authoritative reference. View in Spanish
getStatusCdr
Synchronous method that obtains the CDR of a receipt previously sent with sendBill. Unlike getStatus, it does not require a ticket — it identifies the receipt directly by its RUC, type, series and number.
Input parameters
AtributoTipoDescripción
rucComprobantestringRUC of the receipt issuer. Example: 20556695548
tipoComprobantestringReceipt type code per Annex 4. Example: 01 (Electronic Invoice)
serieComprobantestringReceipt series. Example: FB98
numeroComprobantestringReceipt number. Example: 00200
Output parameters
AtributoTipoDescripción
statusCodestringQuery status code. 0004 = the acknowledgment exists.
statusMessagestringDescriptive status message. Example: The acknowledgment exists
contentbase64BinaryOSE's CDR Base64-encoded. Only present when the acknowledgment exists.
Examples
getStatusCdr
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://service.sunat.gob.pe"
xmlns:ns2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<SOAP-ENV:Header>
<ns2:Security>
<ns2:UsernameToken>
<ns2:Username>20556695548CLHBIHCVK</ns2:Username>
<ns2:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">
x#1F^BTAn(3t
</ns2:Password>
</ns2:UsernameToken>
</ns2:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:getStatusCdr>
<ns1:rucComprobante>20556695548</ns1:rucComprobante>
<ns1:tipoComprobante>01</ns1:tipoComprobante>
<ns1:serieComprobante>FB98</ns1:serieComprobante>
<ns1:numeroComprobante>00200</ns1:numeroComprobante>
</ns1:getStatusCdr>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>Notes
Authentication
The SOAP-ENV:Header header must include the WS-Security token with the Username in {RUC}{username} format and the password in plain text (PasswordText).
When to use getStatusCdr vs getStatus?
| Method | When to use it |
|---|---|
getStatusCdr | To query the CDR of a receipt sent with sendBill, identifying it by RUC, type, series and number |
getStatus | To query the result of an asynchronous process started with sendSummary, using the returned ticket |
CDR in Base64
The content field contains the OSE's CDR Base64-encoded. You must decode it to obtain the XML response with the receipt status. It is only present when statusCode is 0004.