Shopware icon

Shopware

Shopware

Actions778

Promotion Discount → Search Promotion Discount

AI-generated

Overview

This node operation allows searching for promotion discounts within the Shopware platform. It supports detailed search queries with pagination, filtering, sorting, and aggregation options, enabling users to retrieve specific promotion discount data based on various criteria. This is useful for scenarios where you need to analyze or manage promotion discounts programmatically, such as fetching discounts for reporting, applying filters to find active promotions, or sorting discounts by certain attributes.

Use Case Examples

  1. Retrieve the first page of promotion discounts with a limit of 10 items per page.
  2. Search promotion discounts filtered by specific criteria such as discount type or active status.
  3. Sort promotion discounts by creation date or discount value.
  4. Use aggregations to group promotion discounts by certain fields for analytical purposes.

Properties

Name Meaning
Page The page number of the search result to retrieve, used for pagination.
Limit The number of items to return per page in the search result, controlling the page size.
Filter A JSON array of filters to restrict the search results based on specific conditions.
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 aggregation results.
Associations A JSON object defining related entities to include in the search results.
Aggregations A JSON array specifying aggregation operations to perform on the search results.
Grouping A JSON array defining fields over which to perform groupings in the search results.
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 fields to include for given entities, used to control returned data at the API level.

Output

JSON

  • data - The array of promotion discount objects returned from the search query.
  • total - The total number of promotion discounts matching the search criteria, if total count mode is enabled.
  • aggregations - Aggregation results based on the specified aggregation parameters.

Dependencies

  • An API key credential for Shopware Admin API

Troubleshooting

  • Ensure the API credentials are correctly configured and have sufficient permissions to access promotion discount data.
  • Verify that JSON inputs for filters, sorting, and other parameters are correctly formatted to avoid parsing errors.
  • If the total count mode is set to 'exact', expect slower response times for large datasets; consider using 'next-pages' or 'none' for performance.
  • Check network connectivity and proxy settings if requests fail or time out.

Links

Discussion