Overview
This node integrates with the WangDian API, a service platform for e-commerce and logistics operations. It allows users to perform two main actions: querying data and calling arbitrary API methods on the WangDian platform.
The primary use case is to query various datasets from WangDian by specifying the method name and parameters, including pagination options. This is useful for workflows that need to retrieve order information, inventory status, shipment details, or other business data managed by WangDian.
For example, a user might configure this node to query order lists with specific filters and page through results automatically, or call a custom API method to trigger an action in the WangDian system.
Properties
| Name | Meaning |
|---|---|
| 方法名称 (method) | The name of the API method to invoke on WangDian. This is required and must not be empty. |
| 请求参数 (body) | JSON-formatted string representing the request parameters for the API call. Always editable in a large window. Default is an empty array []. |
| 分页索引 (pageIndex) | (Only for Query operation) The zero-based index of the page to retrieve. Defaults to 0. |
| 分页大小 (pageSize) | (Only for Query operation) The number of items per page to retrieve. Defaults to 10. |
| 是否计算总数 (calcTotal) | (Only for Query operation) Boolean flag indicating whether to calculate the total count of records. Defaults to false. |
Output
The node outputs a JSON array where each item corresponds to the data field returned by the WangDian API response. The structure of each item depends on the invoked method and the data returned by WangDian.
- The output JSON contains the actual queried or called data.
- No binary data output is produced by this node.
Dependencies
- Requires valid credentials for the WangDian API, including:
- A session ID (
sid) - An application key (
appKey) - An application secret in the format
"secret:salt" - The base URL of the WangDian API server (
serverUrl), which must start withhttp.
- A session ID (
- The node uses an MD5 hashing function to generate a signature for authentication.
- The node sends HTTP POST requests with JSON bodies and query string parameters.
- Requires n8n credential configuration to provide the above credentials securely.
Troubleshooting
- Invalid API URL format: If the configured API URL does not start with
http, the node will throw an error indicating the URL format is invalid. Ensure the URL is correct and includes the protocol. - Empty method name: The node requires a non-empty method name. If left blank, it throws an error prompting to specify the method.
- Incorrect secret format: The secret must be in the format
"secret:salt". If missing the colon separator, an error is thrown. Verify the secret value in credentials. - API errors: If the API returns a status code greater than 0, the node throws an error with the code and message from the API response. Check the method name, parameters, and credentials.
- Invalid response: If the API response is empty or undefined, the node throws an "invalid response" error.
- JSON parsing issues: The
bodyparameter must be valid JSON. Invalid JSON will cause runtime errors when parsing.