PrestaShop icon

PrestaShop

Interact with PrestaShop API

Overview

This node interacts with the PrestaShop API to retrieve detailed information about a specific product category. The "Get Category" operation fetches data for a single category identified by its ID, allowing users to obtain structured details such as category name, description, and other metadata.

Common scenarios where this node is beneficial include:

  • Synchronizing category data from PrestaShop into another system or database.
  • Displaying category details in custom dashboards or reports.
  • Automating workflows that depend on category attributes, such as targeted marketing or inventory management.

For example, a user might use this node to get the full details of category ID 5 to update their internal catalog or to trigger notifications when certain categories are modified.

Properties

Name Meaning
Category ID The unique numeric identifier of the category to retrieve. Must be an integer greater than or equal to 1.
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: 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 for multishop environments: All Shops, Specific Shop, or Shop Group.
- Shop ID If "Specific Shop" is chosen, provide the numeric ID of the shop to work with.
- Shop Group ID If "Shop Group" is chosen, provide the numeric ID of the shop group to work with.
- Enable Debug Mode When enabled, adds debug information such as URL, HTTP method, and parameters to the response to assist troubleshooting.

Output

The node outputs JSON data representing the requested category's details. The structure typically includes fields like category ID, name, description, parent category, active status, and any other fields specified via the display options.

If debug mode is enabled, additional metadata about the API request (such as the request URL, method, and parameters) is included in the output to help diagnose issues.

No binary data output is produced by this operation.

Dependencies

  • Requires connection to a PrestaShop instance with API access.
  • An API key credential must be configured in n8n to authenticate requests to the PrestaShop API.
  • The node depends on the PrestaShop API being accessible and properly configured to allow category data retrieval.
  • For multishop setups, appropriate shop or shop group IDs must be provided if not working across all shops.

Troubleshooting

  • Common Issues:

    • Invalid or missing Category ID will cause the API to return errors or empty results.
    • Incorrect API credentials or insufficient permissions can lead to authentication failures.
    • Selecting an unsupported output format or invalid custom fields may result in malformed responses.
    • Multishop context misconfiguration (wrong shop or group ID) can cause unexpected data or errors.
  • Error Messages:

    • Authentication errors usually indicate invalid API keys or lack of access rights; verify credentials.
    • "Category not found" errors suggest the provided Category ID does not exist; double-check the ID.
    • Debug mode output can help identify incorrect request URLs or parameters causing failures.
  • Resolution Tips:

    • Ensure the Category ID is valid and exists in the PrestaShop store.
    • Confirm API credentials are correct and have necessary permissions.
    • Use debug mode to inspect the exact API call details.
    • Validate custom field names against PrestaShop API documentation.

Links and References

Discussion