Shopware icon

Shopware

Shopware

Actions778

Unit → Search Unit

AI-generated

Overview

This node performs a search operation on the 'Unit' resource within the Shopware system. It allows users to query units with various parameters such as pagination (page, limit), filtering, sorting, and grouping. The node supports advanced search features including post-filters, aggregations, field selection, and specifying which fields to include in the response. This is useful for retrieving specific units based on complex search criteria, for example, fetching units that match certain filters or sorting them by specific attributes.

Use Case Examples

  1. Search for units with a specific filter and sort order, limiting results to 10 per page.
  2. Retrieve units with specific fields and aggregations to analyze grouped data.
  3. Use post-filters to refine search results without affecting aggregations.

Properties

Name Meaning
Page The page number of the search results to retrieve, used for pagination.
Limit The number of items to return per page in the search results.
Filter A JSON array of filters to restrict the search results based on specific criteria.
Sort A JSON array defining the sorting order of the search results.
Post Filter A JSON array of filters applied after aggregations, which do not affect the aggregation results.
Associations A JSON object defining related entities to include in the search results.
Aggregations A JSON array specifying aggregations to perform on the search results.
Grouping A JSON array defining fields to group the search results by.
Fields A JSON array specifying which fields should be returned in the search results.
Total Count Mode Option to determine how the total number of hits is calculated: none (disabled), exact (slow but accurate), or next-pages (fast for next page only).
Ids A JSON array of specific IDs to search for.
Includes A JSON object specifying which fields to include for given entities, used to control the response content.
Request Options Settings for request behavior such as batching, SSL certificate validation, proxy usage, and timeout.

Output

JSON

  • data - The search results containing the units matching the query parameters.

Dependencies

  • Requires Shopware API credentials for authentication.

Troubleshooting

  • Invalid JSON in filter, sort, post-filter, aggregations, grouping, fields, ids, or includes properties can cause errors. Ensure JSON is correctly formatted.
  • Incorrect pagination values (page or limit) may result in empty or unexpected results.
  • Using 'exact' total count mode may slow down the response time significantly for large datasets.
  • SSL certificate issues can be bypassed by enabling 'Ignore SSL Issues' but this is insecure and should be used cautiously.

Links

Discussion