WbReports icon

WbReports

n8n node to interact with WB API

Actions26

Overview

This node interacts with a reporting API to retrieve supplier sales data filtered by date and an optional flag parameter. It is useful for automating the extraction of sales or return transactions from a supplier's system, especially when you need to process or analyze sales data updated since a specific date or all sales on a particular day.

Typical use cases include:

  • Synchronizing sales data into a database or analytics platform.
  • Generating daily or periodic sales reports automatically.
  • Monitoring sales changes or returns after a certain timestamp.

For example, you can configure the node to fetch all sales updated since June 20, 2019, or all sales that occurred exactly on June 20, 2019.

Properties

Name Meaning
Date From The starting date and time to filter sales or returns based on their last modification date. The date must be in RFC3339 format and can include just the date or date with time (up to seconds or milliseconds precision). The time is interpreted in the Moscow timezone (UTC+3). Examples: 2019-06-20, 2019-06-20T23:59:59, 2019-06-20T00:00:00.12345. This property is required.
Flag Controls how the date filter is applied:
- 0 (default or omitted): Returns data where the lastChangeDate is greater than or equal to the Date From value. The number of returned records can vary up to about 100,000.
- 1: Returns all orders or sales exactly matching the date part of Date From (time is ignored). The number of returned records equals all sales/orders made on that date.

Output

The node outputs JSON data representing the supplier sales information retrieved from the API. Each item corresponds to a sale or return record matching the specified filters.

  • The output JSON structure includes fields describing sales details such as order identifiers, dates, quantities, prices, and other relevant transactional data.
  • No binary data output is indicated or expected.

Dependencies

  • Requires access to the external reporting API endpoint defined in the bundled Swagger/OpenAPI specification.
  • Needs an API authentication token or key configured in n8n credentials (referred generically as "an API key credential").
  • The base URL and request headers are set according to the imported OpenAPI definition.
  • The node depends on the @devlikeapro/n8n-openapi-node package for building properties and handling requests.

Troubleshooting

  • Common issues:

    • Incorrect date format in the Date From property may cause API errors or no data returned. Ensure the date follows RFC3339 format and uses the Moscow timezone.
    • Using flag=1 with a Date From including time may lead to unexpected results because time is ignored in this mode.
    • Large data volumes (up to ~100,000 records) might cause timeouts or performance issues depending on the environment.
  • Error messages:

    • API authentication errors indicate missing or invalid API credentials; verify your API key configuration.
    • Validation errors related to query parameters usually mean the Date From is missing or malformed.
    • Network or timeout errors suggest connectivity problems or server-side delays; consider retrying or adjusting request limits.

Links and References

Discussion