Saltar al contenido principal

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.

GET/api/v1/sucursales/{branchCode}/validate-nit/{nit}Verify if a NIT is valid or not before Impuestos.

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)

FieldsTypeExampleFormatMin SizeMax SizeCompulsory
facturaExternaNumber111No
numeroFacturaNumber119999999Yes
numeroAutorizacionCufAlphanumeric15ABC...160Yes
fechaFacturaOriginalString2021-01-01 12:20:23Y-m-d H:i:s1919Yes
descuentoFacturaOriginalNumber017.211No
montoTotalFacturaOriginalNumber12.1217.219999999.99Yes
detalleFacturaOriginalArray[{},{},...]1 (products)500 (products)YES (if facturaExterna=1)
numeroNotaNumber119999999Yes
codigoPuntoVentaNumber015Yes
nombreRazonSocialString3150Yes
codigoTipoDocumentoIdentidadNumber115Yes
numeroDocumentoString118Yes
codigoClienteString3150Yes
codigoLeyendaNumber115Yes
usuarioStringRoberto Lopez380Yes
montoTotalDevueltoNumber1000.3617.21.09999999.99Yes
montoDescuentoCreditoDebitoNumber017.21.09999999.99Yes
montoEfectivoCreditoDebitoNumber1000.3617.21.09999999.99Yes
detallesArray[{},{},...]1 (products)500 (products)Yes

Description of each field (NCD):

FieldDescription
facturaExternaRepresents the status of the original invoice. Note: send 1 if the original invoice is NOT in the EMIZOR system.
numeroFacturaRepresents the number of the original invoice.
numeroAutorizacionCufRepresents the authorization number (for manual or computerized SFV invoices) or the CUF (for online computerized invoices) of the original invoice.
fechaFacturaOriginalRepresents the issue date of the original invoice.
descuentoFacturaOriginalRepresents the discount applied to the original invoice.
montoTotalFacturaOriginalRepresents the total amount of the original invoice.
detalleFacturaOriginalRepresents the detail of the items of the original invoice (Send only if facturaExterna=1).
numeroNotaRepresents the credit and debit note number.
codigoPuntoVentaRepresents the code of the point of sale in which the note is issued.
nombreRazonSocialRepresents the name or business name of the client.
codigoTipoDocumentoIdentidadRepresents the code of the client's identity document type.
numeroDocumentoRepresents the client's document number.
codigoClienteRepresents the client code in the local system.
codigoLeyendaRepresents the code of the legend that will be shown on the note.
usuarioRepresents the user who issues the note.
montoTotalDevueltoRepresents the total returned amount of the original invoice.
montoDescuentoCreditoDebitoRepresents the additional discount applied to the note.
montoEfectivoCreditoDebitoRepresents 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).
detallesRepresents 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.