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 stock item identified by its Stock ID. It is useful in e-commerce automation workflows where you need to fetch current stock details, such as inventory levels or product availability, from a PrestaShop store.
Typical use cases include:
- Synchronizing stock data between PrestaShop and other systems like ERPs or warehouses.
- Triggering alerts or actions based on stock availability.
- Displaying up-to-date stock information in custom dashboards or reports.
For example, you can configure this node to get the stock details of a particular product variant by specifying its Stock ID, optionally filtering fields or localizing the response.
Properties
| Name | Meaning |
|---|---|
| Stock ID | The unique identifier of the stock item to retrieve. This is required to specify which stock record to fetch. |
| Advanced Options | A collection of optional parameters to customize the output and context: |
| - Output Format | Choose the format of the returned data: JSON (recommended) or XML. |
| - Language ID | Filter localized fields by language ID (default is 1, representing the default language). |
| - Display Fields | Control which fields are returned: Full (All Fields) returns all available data; Custom Fields allows specifying a comma-separated list of fields to return (e.g., "id,name,price,reference"). |
| - Custom Fields | When Custom Fields is selected, specify which fields to include in the response as a comma-separated string. |
| - Shop Context | Define the shop context in multishop environments: All Shops, Specific Shop, or Shop Group. |
| - Shop ID | If Specific Shop is chosen, specify the ID of that shop. |
| - Shop Group ID | If Shop Group is chosen, specify the ID of the shop group. |
| - Enable Debug Mode | When enabled, adds debug information such as request URL, HTTP method, and parameters to the response to assist troubleshooting. |
Output
The node outputs JSON data representing the stock information for the specified Stock ID. The structure depends on the selected display fields and output format:
- JSON output (default): An object containing stock details such as stock quantity, product reference, location, and any other requested fields.
- XML output: The same data represented in XML format.
If debug mode is enabled, additional metadata about the API request is included in the output.
No binary data is produced by this node.
Dependencies
- Requires an active connection to a PrestaShop instance via an API key credential configured in n8n.
- The node depends on the PrestaShop REST API being accessible and properly authenticated.
- No additional external services are needed beyond the PrestaShop API.
Troubleshooting
Common issues:
- Invalid or missing Stock ID will cause the API call to fail.
- Incorrect API credentials or network issues may result in authentication errors or timeouts.
- Selecting a non-existent shop or shop group ID in multishop contexts can lead to empty or error responses.
- Requesting custom fields that do not exist may cause incomplete data or errors.
Error messages:
"Stock ID is required": Ensure the Stock ID property is set and valid."Authentication failed": Verify the API key credential and permissions."Resource not found"or"Invalid shop context": Check that the specified shop or group IDs exist in your PrestaShop setup."Invalid output format": Use only supported formats (JSONorXML).
Enabling debug mode can help identify request parameters and URLs used, aiding in diagnosing issues.