PrestaShop icon

PrestaShop

Interact with PrestaShop API

Overview

This node interacts with the PrestaShop API to delete a category by its ID. It is useful in scenarios where you need to programmatically remove product categories from your PrestaShop store, such as cleaning up obsolete categories or automating category management workflows.

For example, if you have an automated process that identifies outdated categories based on sales data or inventory status, this node can be used to delete those categories without manual intervention.

Properties

Name Meaning
Category ID The unique identifier of the category to delete. Must be a positive integer (minimum 1).
Advanced Options A collection of optional parameters to customize the deletion request:
- Output Format Choose the response format: JSON (recommended) or XML.
- Language ID Filter localized fields by language ID (default is 1, which is the default language).
- Display Fields Control which fields are returned in the response: Full (All Fields) or Custom Fields.
- Custom Fields If Custom Fields is selected above, 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 selected, provide the ID of the shop to work with (minimum 1).
- Shop Group ID If Shop Group is selected, provide the ID of the shop group to work with (minimum 1).
- Enable Debug Mode Enable debug mode to add detailed information (such as URL, HTTP method, and parameters) to the response for troubleshooting purposes.

Output

The node outputs JSON data representing the result of the delete operation. This typically includes confirmation of the deletion or any error messages returned by the PrestaShop API.

If debug mode is enabled, additional debug information such as the request URL, HTTP method, and parameters will be included in the output to assist with troubleshooting.

No binary data output is produced by this node.

Dependencies

  • Requires connection to a PrestaShop instance via its API.
  • Needs an API key credential 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 deletions.

Troubleshooting

  • Common Issues:

    • Invalid or missing Category ID: Ensure the Category ID is provided and is a valid positive integer.
    • Insufficient permissions: The API key must have rights to delete categories.
    • Network or connectivity issues: Verify that the PrestaShop API endpoint is reachable.
    • Multishop context misconfiguration: When working in multishop environments, ensure the correct shop or shop group IDs are specified.
  • Error Messages:

    • Errors returned from the PrestaShop API will be passed through. For example, "Category not found" indicates the specified ID does not exist.
    • Authentication errors suggest invalid or missing API credentials.
    • Enabling debug mode can help identify request details causing failures.

Links and References

Discussion