Get a reseller
Return a single reseller by numeric ID. The billing snapshot is embedded, so a follow-up call to GET /resellers/{id}/billing is not needed unless you specifically want the compact billing-only shape.
The response includes member_group_name, which the list endpoint also returns and which is stable across calls. That means a UI can render the group label directly without a second lookup against the panel's member-groups list.
Endpoint
GET https://<your-panel-domain>/panel-api/v1/resellers/{id}
Authentication
Send the API key in the Authorization: Bearer <your-api-key> header. Both key types can call this endpoint:
- Admin key: any reseller on the panel.
- Reseller key: only the caller's own sub-resellers and their sub-resellers, the accounts it can list with List resellers. Any other ID, including the caller's own, returns
404 not_found, exactly like an ID that does not exist. The reseller's member group needs Can Create Subresellers.
Required scope
- Admin key:
resellers:read - Reseller key:
subresellers:read
Path parameters
| Name | Type | Description |
|---|---|---|
id |
int | The reg-user ID of the reseller. This is the value that appears as id in the list response. |
Response
The response is a flat object. billing is the standard shape used everywhere else in the API (see the Get billing page for a full description).
active_users inside billing is populated only when the reseller is in users mode. For credits-mode resellers it is null.
{
"id": 262260,
"username": "reseller_new",
"email": "reseller_new@example.com",
"member_group_id": 4,
"member_group_name": "RESELLER",
"status": 1,
"billing": {
"mode": "credits",
"credits": 10,
"max_users": null,
"active_users": null,
"billing_expires": null
}
}
Examples
cURL
curl -H "Authorization: Bearer <your-api-key>" \
https://<your-panel-domain>/panel-api/v1/resellers/262260
PHP SDK
require __DIR__ . '/api-panel-php-sdk-1.3.0/autoload.php';
use XtreamAI\PanelApi\PanelApiClient;
$client = new PanelApiClient(baseUrl: 'https://<your-panel-domain>', token: '<your-api-key>');
$reseller = $client->resellers->get(262260);
echo $reseller->username, ' ', $reseller->billing?->credits, PHP_EOL;
Python SDK
from xtream_ai_panel_api import PanelApiClient
client = PanelApiClient(base_url="https://<your-panel-domain>", token="<your-api-key>")
reseller = client.resellers.get(262260)
print(reseller.username, reseller.billing.credits if reseller.billing else None)
Errors
| HTTP | Error slug | When it happens | How to fix |
|---|---|---|---|
| 401 | invalid_key |
Missing, malformed, or unknown API key. | Send a live key in Authorization: Bearer <token>. |
| 403 | insufficient_scope |
An admin key without resellers:read, or a reseller key without subresellers:read. |
Issue a new key with the scope named in details.required_scope. |
| 403 | sub_reseller_view_not_allowed |
Reseller key only: the reseller's member group does not have Can Create Subresellers enabled. | Ask the panel administrator to enable it for the group. |
| 404 | not_found |
No reseller exists with that ID or, on a reseller key, the ID is outside the caller's sub-resellers. | Look the ID up via GET /resellers?username=<name> if you have the username, or via the list endpoint. |
| 429 | rate_limited |
The per-key request budget for this minute is spent. | Back off and retry after the minute rolls over. |