Create Price Rule
/admin/price-rulesA 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.
Value in
- "FixedPrice"
^([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})$0 <= value <= 9007199254740991Response 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"}Archive Product POST
Archives every duration of a product for good: resellers can no longer buy it, and nothing unarchives it. Keys already bought keep working. ListProducts still lists it, with its archivedAt.
Create Product POST
A new product resellers may buy keys of, at one or more durations. Each duration is a SKU: durationMinutes is how long its keys last once activated, and null makes lifetime keys. listPriceMinor is the price before tier discounts and price rules. The provider product cannot change afterwards. With connectionId "store" the product sells the store's own keys: providerProductId is one of ListStoreKeyProducts, and it sells at one duration, which you state as its keys last.
