WbProducts icon

WbProducts

n8n node to interact with WB API

Overview

This node is designed to upload size and price data for products to a service related to "Цены И Скидки" (Prices and Discounts). It allows users to send bulk information about product sizes and their corresponding prices, with a maximum of 1,000 size entries per request. This is particularly useful for managing price lists where prices vary by size, such as apparel or footwear.

A practical example would be updating the pricing for multiple sizes of a product in one operation, ensuring that each size has its correct price set efficiently without manual entry for each size.

Properties

Name Meaning
Data JSON array containing objects with size and price details. Each object should include:
- nmID: Product identifier
- sizeID: Size identifier
- price: Price for the given size

Maximum of 1,000 size entries allowed.

Note: For products with size-based price setting, quarantine rules do not apply.

Example of the expected JSON format:

[
  {
    "nmID": 123,
    "sizeID": 98989887,
    "price": 999
  }
]

Output

The node outputs the response from the API after uploading the size and price data. The output is structured as JSON in the json field of the output item. This typically contains confirmation of the upload status or any error messages returned by the service.

There is no indication that the node outputs binary data.

Dependencies

  • Requires an API key credential for authentication with the external service.
  • The node uses a base URL configured from an imported Swagger/OpenAPI specification.
  • The request headers specify Accept: application/json and Content-Type: application/json.
  • No additional environment variables are explicitly required beyond the API authentication token.

Troubleshooting

  • Common issues:

    • Sending more than 1,000 size entries may cause the request to fail.
    • Malformed JSON in the Data property will result in parsing errors.
    • Missing or invalid API credentials will lead to authentication failures.
    • Incorrect nmID, sizeID, or price values might cause validation errors on the server side.
  • Error messages:

    • Invalid JSON format: Ensure the Data property contains valid JSON.
    • Authentication failed: Verify that the API key credential is correctly configured.
    • Request payload too large: Reduce the number of size entries to 1,000 or fewer.
    • Validation errors: Check that all required fields (nmID, sizeID, price) are present and correctly typed.

Links and References

  • No direct links provided in the source code.
  • Users should refer to the external API documentation for "Цены И Скидки" for detailed information on the data format and API behavior.

Discussion