# Nota de crédito y débito

## Crear documento

<mark style="color:green;">`POST`</mark> `https://demo.simplefact.pe/v1/sales/orders`

Crear una nota de crédito para un comprobante electrónico emitido previamente.

#### Request Body

| Name                                                         | Type   | Description                                                                                                                                                                                                                                                                                                                                                |
| ------------------------------------------------------------ | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| modificator\_type<mark style="color:red;">\*</mark>          | string | <p>Motivo de nota de crédito: </p><p>01 =  Anulación</p><p>02 = Anulación por error en RUC</p><p>03 = Corrección por error en descripción<br>04 = Descuento Global</p><p>05 = Descuento por Item</p><p>06 = Devolución Total</p><p>07 = Devolución por Item</p><p>08 = Bonificación</p><p>09 = Disminución del valor</p><p>10 = Otros conceptos</p><p></p> |
| modificator<mark style="color:red;">\*</mark>                | string | <p>Documento al que se le aplica la nota de crédito, puede ser: </p><p>01  = Factura </p><p>03 = Boleta</p>                                                                                                                                                                                                                                                |
| modificator\_number<mark style="color:red;">\*</mark>        | string | Numero del comprobante a modificar                                                                                                                                                                                                                                                                                                                         |
| modificator\_serie<mark style="color:red;">\*</mark>         | string | Serie del comprobante a modificar                                                                                                                                                                                                                                                                                                                          |
| items<mark style="color:red;">\*</mark>                      | array  | <p><code>\[</code><br> <code>{</code> <br>  <code>"id":1,</code> <br>  <code>"qty":1,</code> <br>  <code>"price":23.6,</code> <br>  <code>"discount\_percent":0,</code><br>  <code>"tax\_percent":18</code> <br> <code>}</code><br><code>]</code></p>                                                                                                      |
| currency<mark style="color:red;">\*</mark>                   | string | Moneda por defecto `PEN`                                                                                                                                                                                                                                                                                                                                   |
| total                                                        | number | Total incluido impuestos                                                                                                                                                                                                                                                                                                                                   |
| discount                                                     | number | Descuento                                                                                                                                                                                                                                                                                                                                                  |
| tax\_total                                                   | number | Total impuestos                                                                                                                                                                                                                                                                                                                                            |
| subtotal                                                     | number | Subtotal sin impuestos                                                                                                                                                                                                                                                                                                                                     |
| due\_date                                                    | string | Fecha de vencimiento                                                                                                                                                                                                                                                                                                                                       |
| date                                                         | string | Fecha de emisión del comprobante en formato ISO                                                                                                                                                                                                                                                                                                            |
| invoice\_type<mark style="color:red;">\*</mark>              | string | 07 Nota de crédito                                                                                                                                                                                                                                                                                                                                         |
| customer\_address<mark style="color:red;">\*</mark>          | string | Dirección del cliente                                                                                                                                                                                                                                                                                                                                      |
| customer\_document\_number<mark style="color:red;">\*</mark> | string | Numero de documento                                                                                                                                                                                                                                                                                                                                        |
| customer\_document\_type<mark style="color:red;">\*</mark>   | number | Tipo de documento 6: RUC 1: DNI                                                                                                                                                                                                                                                                                                                            |
| customer\_name<mark style="color:red;">\*</mark>             | string | Nombre del cliente o razón social                                                                                                                                                                                                                                                                                                                          |

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

```
{
"success": true,
"data": {}
}
    
```

{% endtab %}
{% endtabs %}


---

# 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.simplefact.pe/api/nota-de-credito-y-debito.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.
