NubeFact MCP by usefulapi

v1.5.0
io.usefulapi/nubefact Checked 8 hours ago Published 12 days ago

Issue, 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.

ParameterTypeDescription
cliente_denominacion *stringCustomer name or company name.
cliente_numero_de_documento *string
cliente_tipo_de_documento *string6 = 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 *stringIssue date, dd-mm-yyyy (must be today).
items *arrayDocument lines. Totals are computed from these lines.
numero *integerDocument number, no leading zeros.
serie *stringSeries, 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_direccionstringCustomer address (optional for boletas).
cliente_emailstringCustomer email. NubeFact emails the document only when enviar_automaticamente_al_cliente is true.
documento_que_se_modificaobjectThe document a note changes. Required for notes (tipo 3 and 4).
enviar_automaticamente_a_la_sunatbooleanSend the document to SUNAT now (default true).
enviar_automaticamente_al_clientebooleanEmail the document to the customer.
monedainteger1 = soles, 2 = dólares, 3 = euros, 4 = libra esterlina.
motivo_de_notaintegerNote 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.
observacionesstringNotes printed on the document.
tipo_de_cambionumberExchange 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.

ParameterTypeDescription
numero *integerDocument number, no leading zeros.
serie *stringSeries, 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.

ParameterTypeDescription
motivo *stringReason for the voiding, for example "ERROR DEL SISTEMA".
numero *integerDocument number, no leading zeros.
serie *stringSeries, 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.

ParameterTypeDescription
numero *integerDocument number, no leading zeros.
serie *stringSeries, 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.