> For the complete documentation index, see [llms.txt](https://docs.apisunat.pe/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apisunat.pe/integracion/facturacion-electronica/factura.md).

# Factura

***

## Ambientes disponibles

Cada RUC dispone de un token único para ambos ambientes: Pruebas y Producción. Para obtener más detalles sobre el uso de la API, visite la siguiente página.&#x20;

{% content-ref url="/pages/51jsU0jAzTH1blqVrvyp" %}
[Configuración API](/integracion/facturacion-electronica/configuracion-api.md)
{% endcontent-ref %}

***

## Ejemplos JSON

{% content-ref url="/pages/9KpjQNfkv4y9gXG9JhZD" %}
[Factura simple](/integracion/facturacion-electronica/factura/factura-simple.md)
{% endcontent-ref %}

{% content-ref url="/pages/IaPhyt9Q6V65Q4bGpZZZ" %}
[Factura al crédito](/integracion/facturacion-electronica/factura/factura-al-credito.md)
{% endcontent-ref %}

{% content-ref url="/pages/StlHNa5lhqVPuRabalWw" %}
[Factura exonerada](/integracion/facturacion-electronica/factura/factura-exonerada.md)
{% endcontent-ref %}

{% content-ref url="/pages/xh6gvzLjTZew2wV9kebY" %}
[Factura con detracción](/integracion/facturacion-electronica/factura/factura-con-detraccion.md)
{% endcontent-ref %}

{% content-ref url="/pages/Io32CJlhWpZU0dXOlrsE" %}
[Factura de exportación](/integracion/facturacion-electronica/factura/factura-de-exportacion.md)
{% endcontent-ref %}

{% content-ref url="/pages/XiJg486vVc7kUssUY5cj" %}
[Factura con placa vehícular](/integracion/facturacion-electronica/factura/factura-con-placa-vehicular.md)
{% endcontent-ref %}

{% content-ref url="/pages/cCkGNCN2se569YJY7VRm" %}
[Factura con anticipos](/integracion/facturacion-electronica/factura/factura-con-anticipos.md)
{% endcontent-ref %}

## Descripción de los datos

{% hint style="info" %}
Todos los campos marcados con un asterisco (<mark style="color:red;">\*</mark>) son obligatorios. Los demás son opcionales y pueden omitirse en el body del envío
{% endhint %}

<table data-full-width="false"><thead><tr><th width="262">Name</th><th>Description</th></tr></thead><tbody><tr><td>documento<mark style="color:red;">*</mark></td><td>factura</td></tr><tr><td>serie<mark style="color:red;">*</mark></td><td>serie de 4 dígitos</td></tr><tr><td>numero<mark style="color:red;">*</mark></td><td>correlativo del comprobante</td></tr><tr><td>fecha_de_emision<mark style="color:red;">*</mark></td><td>fecha del día que se emite el comprobante</td></tr><tr><td>fecha_de_vencimiento<mark style="color:red;">*</mark></td><td>fecha cuando se realizará el pago total o la última cuota</td></tr><tr><td>moneda<mark style="color:red;">*</mark></td><td>PEN = soles<br>USD = dólares</td></tr><tr><td>orden_compra_servicio</td><td>número de orden de compra o servicio del cliente</td></tr><tr><td>cliente_tipo_de_documento<mark style="color:red;">*</mark></td><td>1 = DNI<br>6 = RUC</td></tr></tbody></table>

{% embed url="<https://apisunat.lucode.pe/>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.apisunat.pe/integracion/facturacion-electronica/factura.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
