WbFinances icon

WbFinances

n8n node to interact with WB API

Overview

This node operation "Get Documents List" under the resource "Документы" (Documents) retrieves a list of documents from an external API. It allows filtering and sorting of documents based on various criteria such as locale, date range, category, and document ID. This is useful for workflows that need to fetch financial or official documents programmatically, for example, to automate report generation, auditing, or data synchronization tasks.

Practical examples:

  • Fetching all documents in Russian language created within a specific week.
  • Retrieving documents sorted by their creation date or category.
  • Filtering documents by a specific category or unique document identifier.

Properties

Name Meaning
Locale Language of the category field. Options: ru (Russian), en (English), zh (Chinese).
Begin Time Start date of the period to filter documents. Must be used together with End Time. Format: string.
End Time End date of the period to filter documents. Must be used together with Begin Time. Format: string.
Sort Sorting criteria for the documents. Options: date (by creation date), category (by category name, only if locale=ru). Must be used with Order.
Order Sorting order. Options: desc (descending), asc (ascending). Must be used with Sort.
Category Document category ID (string). Refers to the category's name field.
Service Name Unique ID of a specific document (string).

Output

The output JSON contains the list of documents matching the query parameters. Each item typically includes metadata about the document such as its ID, category, creation date, and other relevant fields returned by the API.

If binary data is present (not explicitly shown in the provided code), it would represent the actual document content or attachments.

Dependencies

  • Requires connection to an external API endpoint defined by the base URL configured in the node.
  • Needs an API key or authentication token credential to access the WB API (the exact credential type is abstracted).
  • The node uses HTTP query parameters to send filters and sorting options.

Troubleshooting

  • Missing or invalid credentials: Ensure the API key or authentication token is correctly set up in n8n credentials.
  • Invalid date range: Both Begin Time and End Time must be provided together; missing one may cause errors or empty results.
  • Unsupported locale for sorting by category: Sorting by category only works when Locale is set to ru.
  • Incorrect category or serviceName values: Using invalid IDs may result in no documents found.
  • API rate limits or connectivity issues: Network problems or API limits can cause request failures.

Links and References

Discussion