WbPromotion icon

WbPromotion

n8n node to interact with WB API

Overview

This node interacts with a calendar of promotions, specifically fetching promotional events within a specified date range. It is useful for scenarios where users want to retrieve and analyze promotional campaigns or sales events scheduled between two dates. For example, marketing teams can use it to gather all active or upcoming promotions to plan advertising strategies or synchronize with other sales channels.

The "Get Calendar Promotions" operation allows filtering promotions by date range, whether to show all promotions or only those available for participation, and supports pagination through limit and offset parameters.

Properties

Name Meaning
Start Date Time The start of the period to fetch promotions from, in YYYY-MM-DDTHH:MM:SSZ format.
End Date Time The end of the period to fetch promotions until, in YYYY-MM-DDTHH:MM:SSZ format.
All Promo Whether to show all promotions (true) or only those available for participation (false).
Limit The maximum number of promotions to return in one request.
Offset The number of promotions to skip before starting to return results (used for pagination).

Output

The node outputs JSON data containing the list of promotions matching the query parameters. Each promotion typically includes details such as its identifier, name, start and end dates, and status (available or not). The output structure corresponds directly to the API response for calendar promotions.

No binary data output is indicated.

Dependencies

  • Requires an API key credential for authentication with the external promotions service.
  • The node uses a base URL defined in an imported Swagger/OpenAPI specification file.
  • The node expects the environment to have access to this API endpoint and proper network connectivity.

Troubleshooting

  • Common issues:

    • Invalid date formats for start or end date may cause errors; ensure ISO 8601 format with timezone (YYYY-MM-DDTHH:MM:SSZ).
    • Requesting too many promotions at once (exceeding API limits) might result in errors or truncated data.
    • Network or authentication failures if the API key is missing or invalid.
  • Error messages:

    • Authentication errors indicate missing or incorrect API credentials; verify and update the API key.
    • Validation errors on date parameters suggest incorrect formatting; double-check input values.
    • Pagination errors may occur if offset exceeds total available promotions; adjust offset accordingly.

Links and References

  • No direct links provided in the source code.
  • Users should refer to the external promotions API documentation for detailed information on parameters and response structure.

Discussion