Actions63
- Authentication Actions
- Tenant Management Actions
- Blog Management Actions
- Image Management Actions
- BuilderX AI Integration Actions
- Form Submissions Actions
- Subscription Management Actions
- Subscription Operations Actions
- Product Family Management Actions
- Feature Management Actions
- Invoice Management Actions
- Payment Management Actions
- Payment Method Management Actions
- Coupon Management Actions
- Health Checks Actions
Overview
The "Delete Invoice" operation in the Lectful Central node allows users to delete an existing invoice by specifying its unique invoice ID. This operation is useful for administrative tasks where invoices need to be removed from the system, such as cleaning up test data or removing invoices that were created in error. Note that deletion is only possible if the invoice has no associated payments.
Practical example:
A finance team automates their billing workflow using n8n and wants to remove draft invoices that were never sent or paid. They can use this node operation to delete those invoices programmatically by providing the invoice IDs.
Properties
| Name | Meaning |
|---|---|
| Authentication Mode | Choose how to authenticate with the Lectful Central API: - Use Stored Credentials - Manual Configuration (provide Base URL and API key manually) |
| Base URL Override | Optional base URL to override the credential setting (without /api/v1). Only shown if Manual Configuration is selected. |
| API Key Override | Optional API key to override the credential setting. Only shown if Manual Configuration is selected. |
| Invoice ID | The unique numeric identifier of the invoice to delete. This property is required. |
Output
The node outputs a JSON object representing the response from the Lectful Central API after attempting to delete the specified invoice. Typically, this will be an empty object or confirmation message indicating successful deletion. If the invoice cannot be deleted (e.g., because it has payments), the output will contain an error message.
No binary data is output by this operation.
Example output JSON on success:
{}
Example output JSON on failure:
{
"error": "Invoice cannot be deleted because it has associated payments."
}
Dependencies
- Requires access to the Lectful Central API.
- Requires either stored credentials configured in n8n or manual entry of the API base URL and API key.
- The API key must have sufficient permissions to delete invoices.
- No additional external dependencies are needed.
Troubleshooting
Missing or invalid credentials:
Error messages will indicate if credentials are missing or invalid. Ensure you have configured the API key and base URL correctly, either via stored credentials or manual configuration.Invoice cannot be deleted due to payments:
The API will reject deletion if the invoice has any associated payments. To resolve, ensure the invoice has no payments before attempting deletion.Invalid Invoice ID:
Providing a non-existent or incorrect invoice ID will result in an error. Verify the invoice ID is correct.Network or API errors:
Check network connectivity and API availability. Review logs for HTTP status codes and error messages.
Links and References
- Lectful Central API Documentation (Assumed link, replace with actual if available)
- n8n Documentation on Creating Custom Nodes