Actions12
- NIT Actions
- Indicator Actions
- Emitir Factura Actions
Emitir Factura → Factura De Compra
AI-generatedSummary
Create a purchase invoice (Factura De Compra) in the Siigo accounting system via its API using specified purchase details and items.
Inputs
- siigoEnvironment — Choose the Siigo API environment: Production (real API), Mock (simulation), or Debugging (proxy for inspection). Defaults to Production.
- authToken — Siigo authentication token to override stored credentials; if empty, configured node credentials are used.
- nitCliente (required) — NIT (Tax ID) of the client/supplier for the purchase invoice.
- razonSocial — Business name of the client/supplier.
- documentoCompraId (required) — ID of the purchase document type configured in Siigo (obtained from the document types endpoint).
- metodoPagoId (required) — ID of the payment method configured in Siigo (obtained from the payment types endpoint).
- numeroFactura (required) — Purchase invoice number, can be a plain number or prefixed string (e.g., 'PREFIX-NUMBER').
- fechaVencimiento — Payment due date in 'YYYY-MM-DD' format; if empty, defaults to today's date.
- taxIncluded — Boolean flag indicating if prices include tax. Defaults to true.
- itemsSource (required) — Choose whether invoice items are entered manually or come from previous workflow output.
- itemsInputField — Dot-notation path to locate the array of items in the input JSON when
itemsSourceis 'fromInput'. - items — Manually entered list of items; each item includes code, description, price, quantity, and type (product or service).
- subtotal — Subtotal amount for the purchase invoice.
- iva — IVA (value-added tax) amount, typically 19%. Use 0 if not applicable.
- total (required) — Total amount of the purchase invoice.
Output shape
a single JSON object indicating success or failure with HTTP status code, Siigo API response body or error details, and the request payload sent.
Output JSON includes fields: success (boolean), statusCode, siigo_response (on success), siigo_error and error (on failure), and the sent request_body. No pagination.
Examples
Example 1: Create a purchase invoice by manually entering invoice details and items, then sending the data to Siigo's production API environment.
Configure environment as 'Producción', supply required authentication token or use configured credentials, enter client NIT and document/payment IDs, specify invoice number, due date, tax inclusion flag, add items directly in the node, and provide subtotal, IVA, and total amounts.
Example 2: Create a purchase invoice using items from previous workflow node output, specifying the JSON path to the items array.
Set 'itemsSource' to 'fromInput', provide the dot-notation path to the items array in 'itemsInputField', and fill in other required invoice fields accordingly.