Alegra (Unofficial - BETA) icon

Alegra (Unofficial - BETA)

Consume Alegra API - UNOFFICIAL BETA community node. NOT officially supported by Alegra.

Overview

The node integrates with the Alegra API to manage invoices, specifically allowing users to update existing invoices. This operation is useful in scenarios where invoice details such as dates, status, or notes need to be modified after creation. For example, a business might use this node to update the due date of an invoice if payment terms change, add internal observations for record-keeping, or change the invoice status from "Draft" to "Open" once it is finalized.

Properties

Name Meaning
Invoice ID The unique identifier of the invoice to update.
Update Fields Collection of fields that can be updated on the invoice:
- Date: Invoice date (format YYYY-MM-DD).
- Due Date: Invoice due date (format YYYY-MM-DD).
- Observations: Internal observations or comments related to the invoice.
- Anotation: Notes intended to be printed on the invoice.
- Status: Invoice status; options are "Draft" or "Open".

Output

The output is a JSON object representing the updated invoice as returned by the Alegra API. It contains all relevant invoice data reflecting the changes made. The structure typically includes invoice identifiers, dates, client information, status, and any updated notes or annotations.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the Alegra API via an API key credential configured in n8n.
  • The node uses HTTP methods (PUT) to send update requests to the /invoices/{id} endpoint of the Alegra API.
  • Proper API credentials and network access to Alegra's environment URL are necessary.

Troubleshooting

  • Common Issues:

    • Invalid or missing Invoice ID will cause the update to fail.
    • Incorrect date formats (not YYYY-MM-DD) may result in API errors.
    • Attempting to update fields with invalid values (e.g., unsupported status) will cause errors.
    • Network or authentication issues with the Alegra API can prevent successful updates.
  • Error Messages:

    • Errors from the API are wrapped and thrown as node operation errors with messages indicating the problem.
    • If the node is set to continue on failure, error messages are included in the output JSON under an error field.
  • Resolutions:

    • Ensure the Invoice ID is correct and exists in Alegra.
    • Use valid date formats for date fields.
    • Select only supported status values ("Draft" or "Open").
    • Verify API credentials and network connectivity.

Links and References

Discussion