novinzodevelopers
Your store's APIApps referenceReseller catalog

Create Price Rule

POST/admin/price-rules

A new price rule. Per unit, one of the store's own resellers pays its own FixedPrice of the SKU, else its tier's, else the SKU's listPriceMinor less its tier's discountBps; then the largest promotion running for it comes off that, never several together, and then the largest volume bracket its line's quantity reaches. Brackets apply to every reseller. Percentages are basis points: 1000 is 10%. A sub-reseller pays its upline's unit cost plus the markup its upline set instead. PreviewPricing answers what a reseller would pay.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

_tag*"FixedPrice"

Value in

  • "FixedPrice"
skuId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
target*|
priceMinor*integer
Range0 <= value <= 9007199254740991

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/admin/price-rules" \  -H "Content-Type: application/json" \  -d '{    "_tag": "FixedPrice",    "skuId": "string",    "target": {      "_tag": "Tier",      "tierId": "string"    },    "priceMinor": 0  }'
{  "_tag": "FixedPrice",  "id": "string",  "skuId": "string",  "target": {    "_tag": "Tier",    "tierId": "string"  },  "priceMinor": 0,  "createdAt": "string"}