> For the complete documentation index, see [llms.txt](https://docs.consultasperu.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.consultasperu.com/api-consultas/dni.md).

# DNI

{% hint style="info" %} <mark style="color:blue;">**Búsqueda por número de Documento Nacional de Identidad**</mark>
{% endhint %}

{% code title="POST" %}

```url
https://api.consultasperu.com/api/v1/query
```

{% endcode %}

### *<mark style="color:blue;">Headers</mark>*

| Name         | Value            |
| ------------ | ---------------- |
| Content-Type | application/json |

### *<mark style="color:blue;">Body</mark>*

```json
{
    "token": "tu_token_aqui",
    "type_document":"dni",
    "document_number": "00000000"
}
```

### *<mark style="color:blue;">Response</mark>*

{% tabs %}
{% tab title="200: OK" %}

```json
{
    "success": true,
    "message": "Successful response",
    "data": {
        "number": "00000000",
        "full_name": "Nombre completo",
        "name": "Solo el nombre",
        "surname": "Solo apellidos",
        "date_of_birth": "2005-03-31",
        "department": "Departamento",
        "province": "Provincia",
        "district": "Distrito",
        "address": "Dirección",
        "ubigeo": "000000"
    }
}
```

{% endtab %}

{% tab title="404: Not Found" %}

```json
{
    "success": false,
    "message": "No data found",
    "data": null
}
```

{% endtab %}

{% tab title="401: Unauthorized" %}

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "success": false,
    "message": "Invalid Token",
    "data": null
}
</code></pre>

{% endtab %}
{% endtabs %}
