Credit Debit Note (NCD)
It should be considered that to issue a credit-debit note, it is necessary that the corresponding invoice has been issued in ONLINE mode.
Step 1: Authentication
Same as for invoices, obtain an access_token.
Step 2: Validate NIT
Validate the NIT sending the nit and branchCode. Similar to Step 2 for invoices.
Step 3: Issue the NCD
Service to issue a credit debit note:
POST/api/v1/sucursales/{branchCode}/facturas/nota-debito-creditoCreates a Credit and Debit Note.URL Parameter:
branchCode: The branch code from where it will be issued.
Request Body:
{
"facturaExterna": 1,
"numeroFactura": 100,
"numeroAutorizacionCuf": "1553FC196BD6D9773FCFD32BAA4FBB8A33B0C1D1021A41F7CDF446D71",
"fechaFacturaOriginal": "2021-01-01 12:20:23",
"descuentoFacturaOriginal": 0,
"montoTotalFacturaOriginal": 12.32,
"detalleFacturaOriginal": [
{
"codigoProducto": "CAM-1842574",
"codigoProductoSin": 83141,
"descripcion": "CAMISA DIPLOMAT",
"cantidad": 1,
"unidadMedida": 2,
"precioUnitario": 12.32,
"subTotal": 12.32,
"montoDescuento": 0
}
],
"numeroNota": 400,
"codigoPuntoVenta": 0,
"nombreRazonSocial": "Empresa LTD",
"codigoTipoDocumentoIdentidad": 1,
"numeroDocumento": "31170026",
"codigoCliente": "CLIE-0003",
"codigoLeyenda": 203,
"usuario": "JOSE ZARAVIA",
"montoTotalDevuelto": 0.32,
"montoDescuentoCreditoDebito": 12,
"montoEfectivoCreditoDebito": 0.04,
"detalles": [
{
"codigoProducto": "CAM-1842574",
"codigoActividadSin": "99100",
"codigoProductoSin": 83141,
"descripcion": "CAMISA DIPLOMAT",
"cantidad": 1,
"unidadMedida": 2,
"precioUnitario": 12.32,
"subTotal": 12.32,
"montoDescuento": 0
}
]
}
The following describes each of the fields that need to be sent. The facturaExterna field is extremely important as it indicates that the ORIGINAL INVOICE is not found in the EMIZOR billing system. Otherwise, do not send this parameter, as the numeroAutorizacionCuf field will simply be used to reference the original invoice.
Field specifications (NCD)
| Fields | Type | Example | Format | Min Size | Max Size | Compulsory |
|---|---|---|---|---|---|---|
facturaExterna | Number | 1 | 1 | 1 | No | |
numeroFactura | Number | 1 | 1 | 9999999 | Yes | |
numeroAutorizacionCuf | Alphanumeric | 15ABC... | 1 | 60 | Yes | |
fechaFacturaOriginal | String | 2021-01-01 12:20:23 | Y-m-d H:i:s | 19 | 19 | Yes |
descuentoFacturaOriginal | Number | 0 | 17.2 | 1 | 1 | No |
montoTotalFacturaOriginal | Number | 12.12 | 17.2 | 1 | 9999999.99 | Yes |
detalleFacturaOriginal | Array | [{},{},...] | 1 (products) | 500 (products) | YES (if facturaExterna=1) | |
numeroNota | Number | 1 | 1 | 9999999 | Yes | |
codigoPuntoVenta | Number | 0 | 1 | 5 | Yes | |
nombreRazonSocial | String | 3 | 150 | Yes | ||
codigoTipoDocumentoIdentidad | Number | 1 | 1 | 5 | Yes | |
numeroDocumento | String | 1 | 18 | Yes | ||
codigoCliente | String | 3 | 150 | Yes | ||
codigoLeyenda | Number | 1 | 1 | 5 | Yes | |
usuario | String | Roberto Lopez | 3 | 80 | Yes | |
montoTotalDevuelto | Number | 1000.36 | 17.2 | 1.0 | 9999999.99 | Yes |
montoDescuentoCreditoDebito | Number | 0 | 17.2 | 1.0 | 9999999.99 | Yes |
montoEfectivoCreditoDebito | Number | 1000.36 | 17.2 | 1.0 | 9999999.99 | Yes |
detalles | Array | [{},{},...] | 1 (products) | 500 (products) | Yes |
Description of each field (NCD):
| Field | Description |
|---|---|
facturaExterna | Represents the status of the original invoice. Note: send 1 if the original invoice is NOT in the EMIZOR system. |
numeroFactura | Represents the number of the original invoice. |
numeroAutorizacionCuf | Represents the authorization number (for manual or computerized SFV invoices) or the CUF (for online computerized invoices) of the original invoice. |
fechaFacturaOriginal | Represents the issue date of the original invoice. |
descuentoFacturaOriginal | Represents the discount applied to the original invoice. |
montoTotalFacturaOriginal | Represents the total amount of the original invoice. |
detalleFacturaOriginal | Represents the detail of the items of the original invoice (Send only if facturaExterna=1). |
numeroNota | Represents the credit and debit note number. |
codigoPuntoVenta | Represents the code of the point of sale in which the note is issued. |
nombreRazonSocial | Represents the name or business name of the client. |
codigoTipoDocumentoIdentidad | Represents the code of the client's identity document type. |
numeroDocumento | Represents the client's document number. |
codigoCliente | Represents the client code in the local system. |
codigoLeyenda | Represents the code of the legend that will be shown on the note. |
usuario | Represents the user who issues the note. |
montoTotalDevuelto | Represents the total returned amount of the original invoice. |
montoDescuentoCreditoDebito | Represents the additional discount applied to the note. |
montoEfectivoCreditoDebito | Represents the effective amount that is returned to the client. Note: It is the value used for the VAT tax credit (13% of the total returned amount). |
detalles | Represents the detail of the items of the credit and debit note. |
Step 4: Check NCD Status
The service described in section 3.2 of this document is used.
Step 5: Get NCD Details
The service described in section 3.3 of this document is used.