Shopware icon

Shopware

Shopware

Actions778

Promotion → Search Promotion

AI-generated

Overview

This node operation allows searching for promotions within the Shopware platform. It supports detailed search queries with pagination, filtering, sorting, and other advanced search parameters. This is useful for retrieving specific promotions based on various criteria, such as filtering by attributes, sorting results, and controlling the number of results per page.

Use Case Examples

  1. Retrieve a list of active promotions with a limit of 10 per page.
  2. Search promotions filtered by specific criteria such as date range or promotion type.
  3. Sort promotions by creation date or priority.
  4. Use aggregations and groupings to analyze promotion data.

Properties

Name Meaning
Page The page number of the search results to retrieve.
Limit The number of items to return per page in the search results.
Filter A list of filters to restrict the search results based on specific conditions.
Sort Sorting criteria to order the search results.
Post Filter Filters applied without affecting aggregations in the search results.
Associations Associations to include related entities in the search results.
Aggregations Aggregations to perform calculations or summaries on the search results.
Grouping Fields to group the search results by.
Fields Specific fields to include in the search results.
Total Count Mode Determines how the total number of hits is calculated for the search query. Options include none (disabled), exact (slow but accurate), and next-pages (fast for next page).
Ids List of specific promotion IDs to search for.
Includes Specify fields to be returned for given entities, optimizing the response by including only necessary fields.
Request Options Additional request options such as batching, SSL certificate handling, proxy settings, and timeout configuration.

Output

JSON

  • data - The search results containing the list of promotions matching the query.
  • total - The total number of promotions matching the search criteria, if total count mode is enabled.
  • aggregations - Aggregated data based on the search query, if aggregations are used.

Dependencies

  • An API key credential for Shopware Admin API access

Troubleshooting

  • Ensure the API credentials are correctly configured and have the necessary permissions to access promotion data.
  • Verify that JSON inputs for filters, sorting, and other parameters are correctly formatted to avoid parsing errors.
  • If using batching, check batch size and interval settings to avoid request throttling or timeouts.
  • If SSL issues occur, consider enabling the option to ignore SSL certificate validation, but be aware of security risks.

Links

Discussion