Items - Captain
AI-generatedOverview
This node fetches items from a CDP (Customer Data Platform) API, specifically either consumable items or discounted items, based on user selection. It supports pagination, filtering by availability, and filtering by minimum discount percentage for discounted items. This node is useful for workflows that need to retrieve product data for inventory management, marketing campaigns, or sales analysis.
Use Case Examples
- Fetch consumable items available in stock, limited to 1000 results on page 1.
- Fetch discounted items with at least 10% discount, only those available in stock, limited to 500 results on page 2.
Properties
| Name | Meaning |
|---|---|
| Item Type | Select which type of items to fetch, either consumable or discount items. |
| Page | Page number for pagination, starting from 1. |
| Limit | Maximum number of results to return, between 1 and 5000. |
| Only Available | Boolean flag to return only items that are currently available in stock. |
| Discount Percent | Minimum discount percent to filter items, applicable only when fetching discount items. |
Output
JSON
json- Each output item contains the JSON data of a fetched item from the API.
Dependencies
- Requires environment variables CDP_URL (base URL of the API) and UNEXO_API_KEY (API authentication token).
Troubleshooting
- Common issues include network errors or API request failures. The node retries the request up to 3 times with a 2-second delay between attempts.
- If the API URL or API key environment variables are not set correctly, the request will fail.
- Error messages from failed attempts are logged to the console for debugging.