Actions26
- Product Actions
- Order Actions
- Customer Actions
- Category Actions
- Stock Actions
Overview
This node interacts with the PrestaShop API to retrieve stock information for a specific product. It is designed to fetch stock details by product ID and optionally by product attribute (combination) ID. This operation is useful in e-commerce automation workflows where you need to monitor or manage inventory levels, synchronize stock data with other systems, or trigger actions based on stock availability.
Common scenarios:
- Automatically checking stock levels before processing orders.
- Synchronizing stock quantities between PrestaShop and external inventory management systems.
- Alerting or notifying teams when stock for a product or its variants falls below a threshold.
Practical example:
You can use this node to get the current stock of a product with ID 123 and its specific attribute combination ID 0 (main product), then update your internal database or notify your purchasing team if stock is low.
Properties
| Name | Meaning |
|---|---|
| Product ID | The unique identifier of the product to retrieve stock information for. |
| Product Attribute ID | The identifier of the product attribute or combination. Use 0 to refer to the main product without any specific attribute combination. |
| Output Format | Choose the format of the response data: either JSON (recommended) or XML. |
| Language ID | Filter localized fields by language ID (default is 1). This controls which language version of text fields is returned. |
| Display Fields | Control which fields are included in the response: "Full" returns all available fields; "Custom" allows specifying a comma-separated list of particular fields to return. |
| Custom Fields | When "Custom Fields" display option is selected, specify which fields to include in the response as a comma-separated list (e.g., "id,name,price,reference"). |
| Shop Context | Define the shop context for multishop environments: "All Shops", "Specific Shop", or "Shop Group". |
| Shop ID | When "Specific Shop" is selected as shop context, specify the ID of that shop. |
| Shop Group ID | When "Shop Group" is selected as shop context, specify the ID of that shop group. |
| Enable Debug Mode | If enabled, adds debug information such as request URL, HTTP method, and parameters to the response to assist troubleshooting. |
Output
The node outputs the stock information for the specified product (and attribute, if provided) in the chosen format (JSON or XML).
- json: An object or array containing stock details such as quantity, location, and related metadata depending on the fields requested.
- If debug mode is enabled, additional debug info about the API request is included.
- Binary data output is not applicable for this node.
Dependencies
- Requires connection to a PrestaShop instance via its REST API.
- Needs an API authentication token or key configured in the node credentials to authorize requests.
- The node supports multishop contexts, so appropriate shop or shop group IDs may be required depending on your PrestaShop setup.
Troubleshooting
Common issues:
- Invalid or missing product ID will result in errors or empty responses.
- Incorrect shop context or IDs may cause no data to be returned or errors.
- Network or authentication failures will prevent successful API calls.
Error messages:
- Errors from the PrestaShop API (e.g., "Product not found") indicate invalid input parameters.
- Authentication errors suggest misconfigured or expired API credentials.
- Enabling debug mode helps reveal the exact request URL, method, and parameters used, aiding diagnosis.
Resolutions:
- Verify product and attribute IDs exist in your PrestaShop store.
- Confirm API credentials are valid and have sufficient permissions.
- Check network connectivity to the PrestaShop server.
- Use debug mode to inspect request details and adjust parameters accordingly.