Discounts

List discounts

Returns a paginated list of discounts for the website. Requires OAuth website scope website.discounts.read or website.discounts, or API key scope DISCOUNTS_READONLY or DISCOUNTS.

get/v1/commerce/discounts

Request

Query parameters

sortBy'CREATED_ON' | 'PROMO_CODE' | 'USES_COUNT'

Sort field for the result set.

sortDirection'ASCENDING' | 'DESCENDING'

Sort direction.

searchstring

Free-text search across a discount's name and promo code.

status'ALL' | 'ACTIVE' | 'EXPIRED' | 'SCHEDULED'

Filter by discount lifecycle status.

criteriastring[]

Filter by one or more criteria types (comma-separated). When omitted, defaults to all allowable values.

templatestring[]

Filter by one or more template types (comma-separated). When omitted, defaults to all allowable values.

triggerstring[]

Filter by one or more trigger types (comma-separated): AUTO (auto-applied) or CODE (promo code). When omitted, or when all allowable values are supplied, defaults to all allowable values.

limitedUseOnlyboolean

When true, only discounts with limited-use semantics (per product rules) are returned.

offsetinteger

Zero-based offset into the result set. Must be non-negative. Default 0.

limitinteger

Page size (1–1000; default 50).

Headers

Authorizationstring required

API key or OAuth access token

User-Agentstring required

User Agent

Response

Paginated discounts for the website (empty page is a successful response).

hasNextPageboolean

True when more results exist after the current window.

hasPreviousPageboolean

True when a page of results exists before the current window.

Example response

{
  "discounts": [
    {
      "criteria": {
        "minimumCartTotal": {
          "value": 49.99
        }
      },
      "template": {
        "discountAmount": {
          "value": 49.99
        }
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.