Rest Accounting

Interact with Rest Accounting API

Actions13

Overview

This node interacts with a RESTful accounting API to retrieve various financial data and perform accounting operations. Specifically, the "Reports" resource with the "Trial Balance" operation fetches a trial balance report from the accounting system. This report summarizes the balances of all ledger accounts at a specific point in time, helping users verify that total debits equal total credits.

Common scenarios for this node include:

  • Generating trial balance reports for auditing or reconciliation purposes.
  • Extracting financial snapshots within specified date ranges.
  • Integrating accounting data into broader workflows for financial analysis or reporting automation.

For example, a user might configure the node to get a trial balance report for the last fiscal quarter by specifying start and end dates, then use the output to feed into a dashboard or export it for review.

Properties

Name Meaning
Query Parameters Collection of optional filters and pagination settings for the report request:
- Start Date The beginning date (string) to filter the report data (e.g., "2023-01-01").
- End Date The ending date (string) to filter the report data (e.g., "2023-03-31").
- Page Page number for paginated results (default is 1).
- Page Size Number of items per page in paginated results (default is 50).

Note: Although the property definition includes some fields like "Reference" and "Description," these are only applicable to other resources/operations and not relevant for the Reports > Trial Balance operation.

Output

The node outputs JSON data representing the trial balance report retrieved from the API. The structure typically includes account balances, debit and credit totals, and possibly metadata such as report generation date or pagination info.

Example output JSON structure (simplified):

{
  "accounts": [
    {
      "accountId": 101,
      "accountName": "Cash",
      "debit": 10000,
      "credit": 0,
      "balance": 10000
    },
    {
      "accountId": 201,
      "accountName": "Accounts Payable",
      "debit": 0,
      "credit": 5000,
      "balance": -5000
    }
  ],
  "totalDebit": 10000,
  "totalCredit": 5000,
  "reportDate": "2023-03-31"
}

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential configured in n8n to authenticate requests to the external Rest Accounting API.
  • The node uses HTTP requests with JSON payloads and expects the API base URL and key to be set in credentials.
  • No additional environment variables or services are required beyond the API key credential.

Troubleshooting

  • Common issues:

    • Invalid or missing API key credential will cause authentication failures.
    • Incorrect date formats in query parameters may result in API errors or empty responses.
    • Pagination parameters exceeding available pages may return empty datasets.
  • Error messages:

    • "Request failed": Generic error indicating the HTTP request did not succeed; check network connectivity and API availability.
    • Errors wrapped as NodeApiError include the original message from the API response, which can help diagnose issues like invalid parameters or permission problems.
  • Resolutions:

    • Verify the API key credential is correctly configured and active.
    • Ensure date strings follow the expected format (usually ISO 8601).
    • Adjust pagination parameters to valid ranges based on the dataset size.

Links and References

Discussion