PrestaShop icon

PrestaShop

Interact with PrestaShop API

Overview

This node interacts with the PrestaShop API to retrieve detailed information about a specific product. It is designed to fetch product data by its unique Product ID, supporting various output formats and filtering options. This node is beneficial in e-commerce automation workflows where you need to synchronize product details, update inventories, or display product information dynamically.

Practical examples include:

  • Fetching product details to update an external inventory system.
  • Retrieving localized product information for multi-language storefronts.
  • Extracting specific product fields for reporting or analytics.

Properties

Name Meaning
Product ID The unique identifier of the product to retrieve. Must be a positive integer (minimum 1).
Output Format Choose the format of the response data: either JSON (recommended) or XML.
Language ID Filter localized fields by language ID; 1 corresponds to the default language. Useful for multi-language stores.
Display Fields Control which fields are returned in the response: either all available fields ("Full") or a custom selection ("Custom").
Custom Fields When "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: work with all shops, a specific shop, or a shop group.
Shop ID When working with a specific shop, specify its ID (minimum 1).
Shop Group ID When working with a shop group, specify its ID (minimum 1).
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 product data in the chosen format (JSON or XML):

  • json: Contains the product details as an object or array of objects depending on the request. The structure includes all or selected product fields based on the "Display Fields" property.
  • If debug mode is enabled, additional metadata about the API request (URL, method, parameters) is included in the output for troubleshooting purposes.

The node does not output binary data.

Dependencies

  • Requires connection to a PrestaShop instance via its REST API.
  • Needs an API authentication token or key configured in n8n credentials to authorize requests.
  • Supports multi-shop contexts, so appropriate shop or group IDs must be provided if applicable.

Troubleshooting

  • Common issues:
    • Invalid or missing Product ID will cause the API call to fail.
    • Incorrect shop context or IDs may result in empty or error responses.
    • Selecting XML output requires handling XML parsing downstream.
  • Error messages:
    • Errors from the PrestaShop API (e.g., "Product not found") will be surfaced in the node's output unless "Continue On Fail" is enabled.
    • Network or authentication errors indicate misconfigured credentials or connectivity issues.
  • Resolutions:
    • Verify that the Product ID exists in the PrestaShop store.
    • Confirm that the API credentials have sufficient permissions.
    • Use debug mode to inspect the exact API request details.

Links and References

Discussion