Skip to main content

Create Discount Price Type Rule

POST 

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

Creates a rule that assigns a price type to discounts matching a name or code.

Required scope: reports:write

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

Body (all required unless noted):

  • match_field — what the pattern is compared with: any (name or code), name or code.
  • match_type — exact or contains (case-insensitive).
  • pattern — the discount name or code to match (1–191 characters, trimmed).
  • price_type — one of clearance, temporary_special, automatic_promotion, coupon, employee, price_adjustment.
  • priority (optional) — integer from -1000 to 1000; higher wins. Default 0.

Creating an exact rule with match_field any for a pattern that already has one replaces that rule's price type instead of adding a second rule.

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