Create Product
/admin/productsA 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.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
1 <= length <= 2001 <= items <= 20Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/admin/products" \ -H "Content-Type: application/json" \ -d '{ "connectionId": "store", "providerProductId": "string", "name": "string", "visibility": { "_tag": "Everyone" }, "skus": [ { "durationMinutes": 1, "listPriceMinor": 0, "minOrderQuantity": 1 } ] }'{ "id": "string", "name": "string", "connectionId": "string", "providerProductId": "string", "visibility": { "_tag": "Everyone" }, "skus": [ { "id": "string", "productId": "string", "connectionId": "string", "providerProductId": "string", "name": "string", "durationMinutes": 1, "listPriceMinor": 0, "minOrderQuantity": 1, "visibility": { "_tag": "Everyone" }, "archivedAt": "string", "createdAt": "string", "updatedAt": "string" } ], "archivedAt": "string", "createdAt": "string", "updatedAt": "string"}Create Price Rule POST
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.
Create Tier POST
A new tier, with no resellers yet. discountBps comes off every SKU's list price unless a fixed price applies. A tier's policy says what its resellers may do: a support action not in allowedActions is refused; a quota limits an allowed action per UTC day, ISO week or calendar month, and an allowed action without a quota has no limit. Past an hwid_reset quota, a reset costs hwidResetOverageMinor, or is refused when that is null. A reseller's overrides replace single fields of its tier's policy (GetReseller).
