Issue credit note
Service to issue electronic credit notes. Credit notes are used to cancel, correct, or discount previously issued documents (invoices or receipts).
Important usage rules
tipoIntegracion:OFFLINE→ your own ERP handles the correlative (series/number).ERP→ tefacturo handles the correlative.numero(indatosDocumento): it cannot be duplicated. If the number was already used, map/track the correlative so it is not resent.fechaEmision: an electronic document (CPE) can be declared with at most 3 days of backdating.- Replace the fixed example RUC with the issuer RUC used in the URL and token; all three must match.
- Response 200 values such as series, number, hash, signature, and identifier are illustrative; the API generates their actual values for each request.
https://jarvis.tefacturo.pe/notacredito-api/invoice2u/integracion/nota-credito/{ruc}Service to issue electronic credit notes. Replace {ruc} with the issuer RUC. The credit note must reference a previously issued document.
Headers
| Header | Value | Description |
|---|---|---|
| Authorization | Bearer {token} | Authentication token obtained from the login endpoint. |
| Content-Type | application/json | Content type for the request body. |
Request Body
The credit note includes a comprobanteAjustado object that references the original document. Use the tabs in the right panel to switch between the invoice-based case, the receipt-based case, and the payment date adjustment reason shown on the JSON examples page.
Adjusted document (Original document)
El objeto comprobanteAjustado identifica el comprobante original al que se aplica la nota de crédito. Es obligatorio para vincular la nota con el documento que se está corrigiendo.
| Campo | Tipo | Requerido | Description |
|---|---|---|---|
| serie | string | Sí | Original document series |
| numero | number | Sí | Número del comprobante original |
| tipoComprobante | string | Sí | Tipo: "01" para Factura, "03" para Boleta |
| tipoDocumento | string | Sí | FACTURA o BOLETA, coherente con tipoComprobante |
| fechaEmision | string | Sí | Fecha de emisión del documento original (YYYY-MM-DD) |
Credit note reasons
El campo motivo a nivel raíz define la razón de la emisión de la nota de crédito:
| Value | Description |
|---|---|
| ANULACION_OPERACION | Anulación total de la operación. Se emite por el monto completo del documento original. |
| ANULACION_ERROR_RUC | Anulación por error en el RUC del receptor. |
| CORRECCION_DESCRIPCION | Corrección en la descripción de los items. |
| DESCUENTO_GLOBAL | Descuento global aplicado al documento. |
| DESCUENTO_ITEM | Descuento aplicado a items específicos. |
| DEVOLUCION_TOTAL | Devolución total de los bienes. |
| DEVOLUCION_ITEM | Devolución parcial de bienes específicos. |
Successful Response (200)
La respuesta confirma que la nota de crédito fue emitida correctamente y retorna los datos generados del documento: firma, hash, identificador, serie, número, total, observación y tipo_documento.
Error Handling
| Code | Status | Description |
|---|---|---|
| 400 | Bad Request | Errores de validación. Verifique que el comprobante ajustado exista y los campos sean correctos. |
| 401 | Unauthorized | Invalid or expired authentication token. |
| 403 | Forbidden | You do not have permission to issue credit notes with the provided RUC. |
| 404 | Not Found | El RUC o el comprobante original no está registrado en el sistema. |
| 500 | Internal Server Error | Internal server error. Try again or contact support. |