discountNodes
query
Requires read_discounts access scope.
An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
List of discounts.
Arguments
Returns elements preceding the specified cursor. The
last argument must also be specified when using this argument.Returns the first n elements in the list.
Returns the last n elements in the list.
Whether to reverse the order of the list.
● true: reverse
● false: do not reverse
Default value: false
Apply one or more filters to the query.
Currently supported filter fields and optional values:
-
discount_type: Represents the type of discount, selectable values: bogo (buy X get Y free), fix_amount (reduce the amount), percentage (reduce percentage discount), free_shipping (free shipping)
-
method: Represents the way to obtain the discount, selectable values: code (discount code), automatic (automatic discount)
-
status: Represents the activity status, selectable values: active (enabled), expired (expired), scheduled (upcoming)
-
times_used: The range of usage times, can be filtered by range, for example: times_used:>0 means activities with more than 0 usage times
-
starts_at: Represents the start time, can be filtered by range, for example: starts_at:>='2023-01-10T00:00:00Z' means activities starting at a time greater than or equal to 2023-01-10T00:00:00Z
-
title: Represents the title and discount code keywords, keywords need to be wrapped in ''
-
sales_channel represents the sales channel, with (online sales channel), pos with selectable values: web (online sales channel), pos (POS sales channel)
-
source_key is the tag source key, used to differentiate the source of activity creation
Example:
query:"method:code AND discount_type:fix_amount AND status:active starts_at>'2023-01-10T07:43:00Z' AND times_used:>0 and AND title:'discount'"Query for a list of discount codes with a fixed discount type, enabled status, start time greater than 2023-01-10T07:43:00Z, more than 0 usage times, and titles and discount codes containing "discount".
Sort the underlying list by the given key
Returns elements following the specified cursor. The
first argument must also be specified when using this argument.Return
A list of edges.
A list of the nodes contained in DiscountNodeEdge.
Information to aid in pagination
Status and error codes
For detailed information about common codes, see Status and error codes.
Was this article helpful to you?