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 "Get Invoice Statistics" operation of the Lectful Central node interacts with the Lectful Central API to retrieve comprehensive statistics and analytics related to invoices. This operation is useful for administrators or finance teams who want to gain insights into invoice performance, trends, and overall financial health within their subscription or billing system.
Typical use cases include:
- Generating reports on invoice statuses and amounts.
- Monitoring overdue or paid invoices for accounting purposes.
- Analyzing invoice data to optimize billing processes.
For example, a user might run this operation to fetch an overview of all invoices' payment statuses and totals to prepare monthly financial summaries.
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) |
| Credentials Note | Notice shown when using Manual Configuration mode explaining credential overrides. |
| Base URL Override | Optional base URL to override the stored credential's base URL (without /api/v1). |
| API Key Override | Optional API key to override the stored credential's API key. |
These properties control how the node authenticates requests to the Lectful Central API.
Output
The output JSON contains the invoice statistics data returned by the Lectful Central API endpoint /admin/invoices/statistics/overview. The structure typically includes aggregated metrics and analytics about invoices such as counts, sums, statuses, and possibly time-based trends.
Since the exact response schema depends on the API, the output will be a JSON object representing these statistics. No binary data is involved in this operation.
Example output snippet (conceptual):
{
"total_invoices": 150,
"paid_invoices": 120,
"overdue_invoices": 10,
"total_amount": 50000,
"currency": "USD",
"statistics_by_status": {
"draft": 5,
"sent": 15,
"paid": 120,
"overdue": 10
}
}
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 node uses HTTP Bearer token authentication with the provided API key.
- No additional external dependencies are required.
Troubleshooting
- Missing or invalid credentials: If neither stored credentials nor manual configuration is properly set, the node will throw an error indicating that valid credentials are required.
- Base URL or API key missing in manual mode: When using manual authentication mode, both the Base URL Override and API Key Override must be provided; otherwise, an error is thrown.
- API request failures: Network issues, incorrect API keys, or insufficient permissions can cause errors. Check the API key validity and network connectivity.
- Invalid JSON responses: The node attempts to parse string responses as JSON; if parsing fails, it returns the raw string. Ensure the API returns valid JSON.
- Continue On Fail: If enabled, the node will continue processing subsequent items even if one item fails, returning the error message in the output JSON.
Links and References
- Lectful Central API Documentation (hypothetical link, replace with actual if available)
- n8n Documentation on HTTP Request Node for understanding API calls
- General info on Bearer Token Authentication