Actions26
- Product Actions
- Order Actions
- Customer Actions
- Category Actions
- Stock Actions
Overview
This node interacts with the PrestaShop API to retrieve multiple category records based on specified criteria. It is designed to fetch a list of categories from a PrestaShop store, supporting pagination, filtering, sorting, and localization options.
Common scenarios where this node is beneficial include:
- Synchronizing category data from PrestaShop into another system or database.
- Generating reports or analytics on product categories.
- Building custom storefronts or dashboards that require category information.
- Filtering categories dynamically based on specific attributes like name, ID, or active status.
For example, you could use this node to get all active categories sorted by their creation date or to fetch a limited number of categories starting from a certain offset for paginated display.
Properties
| Name | Meaning |
|---|---|
| Return All | Whether to return all matching categories or limit the results using pagination. Options: true (return all), false (use pagination). |
| Limit | Maximum number of category results to return when not returning all. Range: 1 to 1000. Default is 50. |
| Offset | Number of category results to skip before starting to collect the output (for pagination). Minimum is 0. |
| Filters | Advanced filtering rules to narrow down categories based on fields such as name, price, id_category, active, etc. Supports filter types like equals, not equals, greater than, less than, contains, starts with, ends with, in list, and range. Example: Filter categories where active equals 1. |
| Sort Options | Sorting configuration specifying which field to sort by (e.g., id, name, price, date_add) and direction (Ascending or Descending). |
| Output Format | Choose response format: JSON (recommended) or XML. |
| Language ID | Numeric ID to filter localized fields by language. Default is 1 (default language). |
| Display Fields | Control which fields are returned: Full (all available fields) or Custom (specify a comma-separated list of fields). |
| Custom Fields | Comma-separated list of fields to display when Display Fields is set to Custom. Example: "id,name,price,reference". |
| Shop Context | Define shop context for multishop environments: All Shops, Specific Shop, or Shop Group. |
| Shop ID | ID of the specific shop to work with when Shop Context is Specific Shop. Minimum value is 1. |
| Shop Group ID | ID of the shop group to work with when Shop Context is Shop Group. Minimum value is 1. |
| Enable Debug Mode | When enabled, adds debug information such as request URL, method, and parameters to the response to assist troubleshooting. |
Output
The node outputs an array of JSON objects representing the retrieved categories. Each object contains fields corresponding to the selected display option (full or custom fields). The structure depends on the PrestaShop API response and may include fields like:
id: Category identifiername: Category name (localized if language ID is specified)active: Status indicating if the category is active- Other category-specific fields depending on the display settings
If debug mode is enabled, additional metadata about the API request (URL, HTTP method, parameters) is included in the output for troubleshooting purposes.
The node does not output binary data.
Dependencies
- Requires a valid API key credential for authenticating with the PrestaShop API.
- Needs network access to the PrestaShop store's API endpoint.
- No other external dependencies beyond standard n8n environment and the PrestaShop API.
Troubleshooting
Common Issues:
- Incorrect API credentials or missing permissions can cause authentication failures.
- Using invalid filter fields or unsupported filter types may result in API errors.
- Pagination parameters (
limitandoffset) outside allowed ranges might cause unexpected results or errors. - Specifying a non-existent language ID or shop context may lead to empty responses.
Error Messages:
- Authentication errors typically indicate invalid or missing API keys; verify credentials.
- "Field not found" or similar errors suggest incorrect filter or sort field names; check spelling and available fields.
- Rate limiting or timeout errors may occur if too many requests are made; consider enabling pagination or reducing request frequency.
Resolution Tips:
- Double-check all input parameters for correctness.
- Use debug mode to inspect the actual API request details.
- Consult PrestaShop API documentation for supported fields and filter types.
- Ensure the API user has sufficient permissions to read category data.