ListDiscountsRequest
| Field | Type | Description |
|---|---|---|
folder_id | optional string | |
page_size | int32 | |
cursor | string | Opaque next_cursor from the previous page; keep the other filters the same. The preferred way to read every row. |
Required scope: catalog:read
Returns active discounts that can be attached to a quote. Results can be
limited to one catalog folder and come in catalog order. pageSize is 1 to 100 and defaults to 100. When nextCursor is set, send it
back as cursor with the same filters for the next page; an empty nextCursor
means you have every row.
countryPrices contains the country-specific grand-total discount rows used by
CreateQuote, including each row’s country-derived currency, discount types,
and recurring duration modes. productDiscounts contains product-specific
links and their country, currency, price type, and optional duration. Use these
fields to determine whether a discount is available for a quote’s
pricingCountry and selected product price type. The top-level discount fields
remain the legacy/default representation.
Discount types are serialized as protobuf enum names in JSON:
PUBLIC_DISCOUNT_TYPE_PERCENTAGE or PUBLIC_DISCOUNT_TYPE_FIXED.
POST /public-api/publicapi.v1.Catalog/ListDiscounts Lists active discounts available to the API key actor in catalog order. Pages with page_size (default and max 100) and cursor: pass next_cursor back until it is empty.
| Field | Type | Description |
|---|---|---|
folder_id | optional string | |
page_size | int32 | |
cursor | string | Opaque next_cursor from the previous page; keep the other filters the same. The preferred way to read every row. |
| Field | Type | Description |
|---|---|---|
discounts | repeated Discount | |
next_cursor | string | Pass as cursor to read the next page. Empty on the last page. |
{ "folderId": "<catalog-folder-id>", "pageSize": 50}{ "discounts": [ { "id": "<discount-id>", "name": "Launch promotion", "description": "One-time promotional discount", "discountGroup": "promotion", "discountOnce": 10, "discountOnceType": "PUBLIC_DISCOUNT_TYPE_PERCENTAGE", "discountMonthlyType": "PUBLIC_DISCOUNT_TYPE_UNSPECIFIED", "discountYearlyType": "PUBLIC_DISCOUNT_TYPE_UNSPECIFIED", "countryPrices": [ { "countryCode": "US", "currency": "USD", "discountMonthly": 15, "discountMonthlyType": "PUBLIC_DISCOUNT_TYPE_PERCENTAGE", "discountMonthlyDurationMode": "contract", "discountYearlyDurationMode": "permanent" } ], "productDiscounts": [ { "id": "<product-discount-link-id>", "discountId": "<discount-id>", "productId": "<product-id>", "productName": "Battery", "discountType": "PUBLIC_DISCOUNT_TYPE_FIXED", "discountAmount": 2500, "durationMonths": 6, "priceType": "PUBLIC_PRICE_TYPE_MONTHLY", "countryCode": "US", "currency": "USD" } ], "isActive": true } ]}