调用 API
AI-generatedOverview
This node allows users to call YouZanYun APIs by providing an API token, API name, version, and request parameters. It supports both single API calls and paginated API calls where it fetches all pages of data from a specified list field. This is useful for integrating YouZanYun services into workflows, such as retrieving product lists, order data, or other resources exposed by the YouZanYun API.
Use Case Examples
- Fetch a list of products from YouZanYun by specifying the API name, version, and parameters, optionally enabling pagination to retrieve all products across multiple pages.
- Call a specific YouZanYun API endpoint to get detailed information about an order or customer by providing the required token and parameters.
Properties
| Name | Meaning |
|---|---|
| Token | The API token used for authenticating the YouZanYun API request. This is required for all API calls. |
| API 名称 | The name of the YouZanYun API to call. This specifies which API endpoint to invoke. |
| API 版本 | The version of the YouZanYun API to use for the call. Defaults to '3.0.0'. |
| 请求参数 | The JSON-formatted parameters to send with the API request. This allows customization of the API call. |
| Pagination Mode | A boolean flag indicating whether to fetch all pages of data from the API and output all records from the specified list field. |
| 列表字段 | The name of the list field in the API response that contains the array of records to paginate through. Supports dot notation for nested fields. Required if Pagination Mode is enabled. |
Output
JSON
json- The JSON response from the YouZanYun API call. If pagination is enabled, outputs each record from the specified list field as a separate item.
Dependencies
- YouZanYun API token credential
Troubleshooting
- Ensure the Token is valid and has the necessary permissions to call the specified API.
- If Pagination Mode is enabled, verify that the list field name is correct and points to an array in the API response.
- Common errors include invalid token, incorrect API name or version, malformed request parameters, and pagination list field not being an array.
- Error messages from the API are propagated and include details to help diagnose issues.