# Consultar estado

<mark style="color:green;">`POST`</mark> `https://sandbox.apisunat.pe/api/v3/status`

### **Headers**

| Nombre        | Valor              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

### Request Body

{% code fullWidth="false" %}

```json
{
    "documento": "factura",
    "serie": "F001",
    "numero": 123
}
```

{% endcode %}

### Response

{% tabs %}
{% tab title="200 OK " %}
{% code fullWidth="false" %}

```json
{
    "success": true,
    "message": "El documento fue enviado correctamente y aceptado por SUNAT.",
    "payload": {
        "estado": "ACEPTADO",
        "hash": "XWQK7MMQV8eBvFdRfQCYn0k5JOyrg7QInN+B212fqS0=",
        "xml": "https://app.apisunat.pe/xml/8701/3qckX0K1JH/10421265149-03-B001-102",
        "cdr": null,
        "pdf": {
            "ticket": "https://app.apisunat.pe/pdf/ticket/8701/3qckX0K1JH/10421265149-03-B001-102",
            "a4": "https://app.apisunat.pe/pdf/a4/8701/3qckX0K1JH/10421265149-03-B001-102"
        }
    }
}

```

{% endcode %}
{% endtab %}

{% tab title="401 Permission denied" %}

```json
{
    "success": false,
    "message": "Error en la autenticación, token no válido."
}
```

{% endtab %}

{% tab title="400 Bad request" %}
{% code title="Documento duplicado" overflow="wrap" %}

```json
{
    "success": false,
    "message": "Factura F001-123 no se encuentra registrado."
}
```

{% endcode %}

{% code title="Datos requeridos" overflow="wrap" %}

```json
{
    "success": false,
    "message": "JSON no estructurado correctamente (Validación capa 01)",
    "payload": {
        "documento": [
            "El campo documento es requerido."
        ]
    }
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Descripción de datos

<table><thead><tr><th width="262">Name</th><th>Description</th></tr></thead><tbody><tr><td>documento<mark style="color:red;">*</mark></td><td><code>factura</code><br><code>boleta</code><br><code>nota_credito</code><br><code>nota_debito</code></td></tr><tr><td>serie<mark style="color:red;">*</mark></td><td>serie de 4 dígitos del comprobante a consultar</td></tr><tr><td>numero<mark style="color:red;">*</mark></td><td>correlativo del comprobante a consultar</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.apisunat.pe/integracion/facturacion-electronica/consultar-estado.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
