Overview
This node provides a way to interact with the WangDian API, a service platform for e-commerce and logistics operations. It supports two main operations: querying data and calling arbitrary API methods on the WangDian platform. The "Call" operation allows users to specify any API method name and pass JSON-formatted parameters, enabling flexible integration with WangDian's extensive API.
Common scenarios include:
- Automating order management by querying or updating orders.
- Synchronizing inventory or product information.
- Executing custom API calls that are not covered by predefined operations in other nodes.
For example, a user can call a specific WangDian API method by specifying its name and passing the required parameters as JSON, then process the returned data within an n8n workflow.
Properties
| Name | Meaning |
|---|---|
| 方法名称 | The name of the WangDian API method to call. This is a required string input. |
| 请求参数 | The request parameters for the API call, provided as a JSON object. Editable in a window. |
Output
The node outputs a JSON array containing the data field from the WangDian API response. The structure of this data depends on the called API method but generally includes the requested information or results of the API call.
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
- The node uses these credentials to authenticate and sign requests.
- The node sends HTTP POST requests with JSON payloads to the specified WangDian API endpoint.
Troubleshooting
- Invalid API URL format: If the configured API URL does not start with "http", the node will throw an error indicating an invalid URL format. Ensure the URL is correct and includes the protocol.
- Empty method name: The method name property cannot be empty. Provide a valid API method name.
- Incorrect secret format: The secret must be in the format
"secret:salt". If it does not contain a colon, an error is thrown. - 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 and parameters for correctness.
- Invalid response: If the API response is empty or malformed, an error is raised.
Links and References
- WangDian Official API Documentation (in Chinese)
- n8n Documentation for general usage of custom nodes and credentials configuration