Skip to main content

List Discount Price Type Rules

GET 

/api/settings/discount-price-type-rules

Returns the discount price type rules, every discount used on sales orders in the date range with the price type it currently resolves to, the list of price types and when the rules last changed.

Required scope: reports:read

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

A rule matches a discount by its name or code and decides which price type the discount counts as. Rules are tried highest priority first, exact before contains, newest first; the first match wins and beats what the sales channel reported about the discount. With no matching rule, a code counts as coupon, an automatic or script discount as automatic_promotion and a manual / POS discount as temporary_special; a discount of unknown kind is assumed to be a temporary_special and flagged as inferred.

Rule changes apply to new orders; start Reclassify Sales by Price Type to apply them to past orders.

observed rows: name (discount name or code), application_type as reported by the sales channel (code, automatic, manual, script, or null when unknown), uses, amount (total discount given), price_type it resolves to, detection (how it was decided), rule_id of the matching rule (null when none) and is_inferred. is_default marks rules the system created for you.

Requires access to the Sell-Through by Price Type report and the reports scope; creating, updating and deleting also need permission to update settings.

Request​

Responses​

OK

Response Headers
    Content-Type