Actions26
- Product Actions
- Order Actions
- Customer Actions
- Category Actions
- Stock Actions
Overview
This node interacts with the PrestaShop API to retrieve stock information based on a supplier's product reference. Specifically, the "Get by Supplier Reference" operation allows users to query stock details for products using the supplier's unique reference code.
Common scenarios where this node is beneficial include:
- Synchronizing inventory data between PrestaShop and external systems by fetching stock levels or product availability via supplier references.
- Automating stock checks for specific supplier items before processing orders or updating catalogs.
- Integrating supplier-specific stock queries into workflows that manage product listings or inventory updates.
For example, an e-commerce manager could use this node to automatically fetch stock details for a list of supplier references daily, ensuring their online store reflects accurate inventory counts.
Properties
| Name | Meaning |
|---|---|
| Supplier Reference | The unique product reference code provided by the supplier to identify the product. This is required to perform the stock lookup. |
| Advanced Options | A collection of optional parameters to customize the request: |
| - Output Format | Choose the response format: JSON (recommended) or XML. |
| - Language ID | Numeric ID to filter localized fields by language (default is 1). |
| - Display Fields | Control which fields are returned in the response: Full (All Fields) or Custom Fields. |
| - Custom Fields | If "Custom Fields" is selected, specify a comma-separated list of fields to return (e.g., id,name,price,reference). |
| - Shop Context | Define the shop context in multishop environments: All Shops, Specific Shop, or Shop Group. |
| - Shop ID | When "Specific Shop" is chosen, specify the numeric ID of the shop to work with. |
| - Shop Group ID | When "Shop Group" is chosen, specify the numeric ID of the shop group to work with. |
| - Enable Debug Mode | Boolean flag to add debug information (such as URL, HTTP method, and parameters) to the response for troubleshooting purposes. |
Output
The node outputs JSON data representing the stock information corresponding to the given supplier reference. The structure of the JSON depends on the selected display fields and output format but generally includes product stock details such as quantities, locations, and related metadata.
If debug mode is enabled, additional debug information about the API request (URL, method, parameters) will be included in the output.
The node does not output binary data.
Dependencies
- Requires access to a PrestaShop instance with API enabled.
- Needs an API key credential configured in n8n to authenticate requests to the PrestaShop API.
- The node dynamically imports operation-specific modules internally but no external dependencies beyond the PrestaShop API are required.
Troubleshooting
Common Issues:
- Invalid or missing supplier reference will cause the API call to fail or return no results.
- Incorrect API credentials or insufficient permissions can lead to authentication errors.
- Selecting an unsupported output format or invalid custom fields may result in malformed responses.
- Multishop context misconfiguration (wrong shop or group IDs) might cause unexpected or empty results.
Error Messages:
- Authentication errors typically indicate issues with the API key; verify the credential setup.
- "Not Found" or empty responses suggest the supplier reference does not exist or is incorrect.
- Debug mode can help diagnose request parameters and endpoint URLs if the response is unexpected.