Introduction
What the reseller API does, where it lives and how responses come back.
The reseller API lets your system do on its own what you do in the panel: browse the catalog and your balance, generate keys and reset HWIDs. A store, a Discord bot or an order system can deliver the key to the customer at the moment of sale, without anyone opening the panel.
List products
The mods available and the price of each key.
Generate keys
Creates keys and deducts from your balance.
Reset HWID
Frees a key for another computer.
Get balance
Balance and credit statement.
API address
Every call starts with the same address. It is shown in the panel, under API βΊ Tokens, in the usage example.
The examples in this documentation read the address and the token from two environment variables:
export PROJECT_API_URL="paste the address from the panel here"
export PROJECT_TOKEN="prj_live_..."There is no test environment
Every call uses your real balance. Only generate a key when you are about to deliver it to a customer.
Response format
Every response is JSON and always has the same fields:
| Field | What it is |
|---|---|
success | true when it worked, false on error. |
message | A text to show or log. The API messages are in Portuguese. |
data | The response data (only on success). |
errors | The error details (only on error). |
{
"success": true,
"message": "Saldo carregado.",
"data": { "balance": 480 }
}{
"success": false,
"message": "CrΓ©ditos insuficientes.",
"errors": { "balance": 12 }
}Responses may include fields beyond the ones described here. Ignore the ones your system does not know. Always decide by the HTTP status code, not by the text of message.
Dates, deadlines and amounts
- Dates such as
created_atcome in theYYYY-MM-DD HH:MM:SSformat. - Deadlines such as
access_endcome in seconds since 1970 (Unix). - Credits are always integers.