NubeFact MCP by usefulapi
v1.5.0Issue, void and check facturas, boletas and notes sent to SUNAT in NubeFact.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
nubefact_issue_document Issue a factura, boleta or note
Issue an electronic factura (tipo 1), boleta (tipo 2), credit note (tipo 3) or debit note (tipo 4) through NubeFact, which sends it to SUNAT. Totals are computed from the lines (IGV 18% on gravado lines). This creates a legal document: it cannot be edited or deleted. Void a wrong one with nubefact_void_document. Check the series and number first with nubefact_get_document. Operation: generar_comprobante.
| Parameter | Type | Description |
|---|---|---|
cliente_denominacion * | string | Customer name or company name. |
cliente_numero_de_documento * | string | |
cliente_tipo_de_documento * | string | 6 = RUC, 1 = DNI, - = varios (sales under S/700), 4 = carnet de extranjería, 7 = pasaporte, A = cédula diplomática, B = documento de identidad del país de residencia, 0 = no domiciliado (exportaci… |
fecha_de_emision * | string | Issue date, dd-mm-yyyy (must be today). |
items * | array | Document lines. Totals are computed from these lines. |
numero * | integer | Document number, no leading zeros. |
serie * | string | Series, 4 characters. Starts with F for facturas, B for boletas (notes take the series of their document). |
tipo_de_comprobante * | 1 = factura, 2 = boleta, 3 = nota de crédito, 4 = nota de débito. | |
cliente_direccion | string | Customer address (optional for boletas). |
cliente_email | string | Customer email. NubeFact emails the document only when enviar_automaticamente_al_cliente is true. |
documento_que_se_modifica | object | The document a note changes. Required for notes (tipo 3 and 4). |
enviar_automaticamente_a_la_sunat | boolean | Send the document to SUNAT now (default true). |
enviar_automaticamente_al_cliente | boolean | Email the document to the customer. |
moneda | integer | 1 = soles, 2 = dólares, 3 = euros, 4 = libra esterlina. |
motivo_de_nota | integer | Note reason code. Credit notes 1-13 (1 = anulación de la operación, 6 = devolución total). Debit notes 1-5 (1 = intereses por mora, 3 = penalidades). Required for notes. |
observaciones | string | Notes printed on the document. |
tipo_de_cambio | number | Exchange rate to soles (3 decimals). Required when moneda is not 1. |
nubefact_get_document Get a document
Read one issued factura, boleta or note: its PDF, XML and CDR links, whether SUNAT accepted it, and whether it is voided. Operation: consultar_comprobante.
| Parameter | Type | Description |
|---|---|---|
numero * | integer | Document number, no leading zeros. |
serie * | string | Series, 4 characters. Starts with F for facturas, B for boletas (notes take the series of their document). |
tipo_de_comprobante * | 1 = factura, 2 = boleta, 3 = nota de crédito, 4 = nota de débito. |
nubefact_void_document Void a document
Void (anular) an issued factura, boleta or note. NubeFact sends a voiding communication to SUNAT. The voiding is final: check it later with nubefact_get_void_status. Operation: generar_anulacion.
| Parameter | Type | Description |
|---|---|---|
motivo * | string | Reason for the voiding, for example "ERROR DEL SISTEMA". |
numero * | integer | Document number, no leading zeros. |
serie * | string | Series, 4 characters. Starts with F for facturas, B for boletas (notes take the series of their document). |
tipo_de_comprobante * | 1 = factura, 2 = boleta, 3 = nota de crédito, 4 = nota de débito. |
nubefact_get_void_status Get a voiding status
Read the voiding (anulación) of a factura, boleta or note: the SUNAT ticket, whether SUNAT accepted it, and the PDF, XML and CDR links. Operation: consultar_anulacion.
| Parameter | Type | Description |
|---|---|---|
numero * | integer | Document number, no leading zeros. |
serie * | string | Series, 4 characters. Starts with F for facturas, B for boletas (notes take the series of their document). |
tipo_de_comprobante * | 1 = factura, 2 = boleta, 3 = nota de crédito, 4 = nota de débito. |