The Spanish version is the authoritative reference. View in Spanish
getStatus
Synchronous method that queries the status of an asynchronous process started with sendSummary. It receives the ticket returned by sendSummary and returns the processing result once SUNAT has completed it.
Input parameters
AtributoTipoDescripción
ticketstringIdentifier of the asynchronous process returned by sendSummary. Example: 39653905513768616531
Output parameters
AtributoTipoDescripción
statusCodestringProcess status. 0 = processed correctly, 98 = in process.
contentbase64BinaryOSE's CDR Base64-encoded. Only present when statusCode is 0.
Examples
getStatus
<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:getStatus>
<ticket>39653905513768616531</ticket>
</ns1:getStatus>
</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).
Status codes
| statusCode | Meaning |
|---|---|
0 | Processed correctly — the CDR is available in content |
98 | In process — SUNAT has not yet finished processing the document |
Unlike SUNAT directly, the OSE does not return statusCode 99. If there are validation errors, they are reflected within the CDR.
CDR in Base64
The content field contains the OSE's CDR Base64-encoded. You must decode it to obtain the XML response with the document status. It is only present when statusCode is 0.