1. Platform Overview
What is the Reseller Platform?
The Proxies.sx Reseller Platform enables authorized partners to build their own mobile proxy business on top of our infrastructure. As a reseller, you can:
- Create sub-accounts for your customers
- Set your own pricing with configurable margins
- Manage quotas for port slots and traffic
- Receive webhooks for real-time event notifications
- Track revenue with detailed analytics
Business Model
┌─────────────────────────────────────────────────────────────────┐ │ RESELLER BUSINESS MODEL │ ├─────────────────────────────────────────────────────────────────┤ │ │ │ Proxies.sx (Platform) │ │ └── Provides: Infrastructure, Devices, API │ │ │ │ │ ▼ │ │ Reseller (You) │ │ └── Provides: Branding, Support, Custom Pricing │ │ │ │ │ ▼ │ │ Your Customers │ │ └── Use: Proxies via YOUR application │ │ │ └─────────────────────────────────────────────────────────────────┘
Key Concepts
| Concept | Description |
|---|---|
| Reseller | Your account on Proxies.sx with `role: reseller` |
| Sub-Account | A customer you create under your reseller account |
| Port Slot | Allocated capacity for creating proxy ports |
| Pricebook | Your pricing configuration (margins, overrides) |
| Webhook | Real-time event notifications to your system |
2. Architecture
System Architecture
┌─────────────────────────────────────────────────────────────────────────────┐
│ ARCHITECTURE │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │
│ │ Your Customer │ │ Your Backend │ │ Proxies.sx API │ │
│ │ (End User) │ │ (Your Code) │ │ (Our System) │ │
│ └────────┬────────┘ └────────┬────────┘ └────────┬────────┘ │
│ │ │ │ │
│ │ "Buy proxy" │ │ │
│ │──────────────────────▶│ │ │
│ │ │ │ │
│ │ │ POST /reseller/ports │ │
│ │ │──────────────────────▶│ │
│ │ │ │ │
│ │ │ { port details } │ │
│ │ │◀──────────────────────│ │
│ │ │ │ │
│ │ "Your proxy: IP:8080" │ │ │
│ │◀──────────────────────│ │ │
│ │
└─────────────────────────────────────────────────────────────────────────────┘Data Model
User (role: reseller)
├── balance: number # Your account balance
├── resellerConfig # Platform settings
│
├── ResellerCustomers[] # Your sub-accounts
│ ├── email, name, company
│ ├── allocatedPortSlots # Quota limit
│ ├── usedPortSlots # Current usage
│ ├── balance # Customer's balance
│ └── status: active|suspended
│
├── ResellerPricebook # Your pricing
│ ├── pricingMode: margin|fixed|multiplier
│ ├── defaultMarginPercent
│ └── countryOverrides[]
│
├── ResellerWebhooks[] # Event subscriptions
│ ├── url, events[], secret
│ └── isActive
│
└── Ports[] # Created for customers
├── resellerId # Links to you
├── resellerCustomerId # Links to customer
└── (port details)3. Getting Started
Prerequisites
- A Proxies.sx account with reseller role
- Sufficient balance in your account
- An API key with appropriate scopes
Step 1: Get Your Account Ready
Contact Proxies.sx support to upgrade your account to reseller role, or if you have admin access:
# Admin assigns reseller role
PATCH /v1/users/{userId}/role
{"role": "reseller"}Step 2: Add Balance to Your Account
Your balance is the pool from which customer topups and port purchases are deducted.
# Admin adds balance (or use payment methods)
POST /v1/billing/payment
{
"userId": "your_user_id",
"amount": 1000,
"method": "admin_credit"
}Step 3: Create an API Key
curl -X POST https://api.proxies.sx/v1/api-keys \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Production API Key",
"scopes": [
"customers:read", "customers:write",
"ports:read", "ports:write",
"webhooks:read", "webhooks:write",
"billing:read", "billing:write"
]
}'Step 4: Create Your First Customer
curl -X POST https://api.proxies.sx/v1/reseller/customers \
-H "X-API-Key: psx_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"email": "customer@example.com",
"name": "My First Customer",
"company": "Customer Corp",
"allocatedPortSlots": 10,
"allocatedTrafficGB": 100
}'4. Authentication
Methods
| Method | Header | Use Case |
|---|---|---|
| JWT Bearer | Authorization: Bearer <token> | Web apps, dashboards |
| API Key | X-API-Key: <key> | Scripts, integrations, servers |
Get JWT Token
POST /v1/login/signin
Content-Type: application/json
{
"email": "reseller@example.com",
"password": "your_password"
}API Key Scopes
| Scope | Description |
|---|---|
customers:read | View sub-accounts |
customers:write | Create, update, suspend customers |
ports:read | View port information |
ports:write | Create, rotate, delete ports |
webhooks:read | View webhook configurations |
webhooks:write | Manage webhooks |
billing:read | View pricing and analytics |
billing:write | Top up customers |
5. Customer Management
Create Customer
POST /v1/reseller/customers
Content-Type: application/json
X-API-Key: psx_xxx
{
"email": "customer@example.com",
"name": "Customer Name",
"company": "Company Name",
"allocatedPortSlots": 10,
"allocatedTrafficGB": 100,
"externalId": "YOUR-CRM-ID-123",
"initialBalance": 50
}List Customers
GET /v1/reseller/customers?status=active&limit=20&skip=0Top Up Customer Balance
Flow:
- Checks YOUR reseller balance ≥ amount
- Deducts amount from YOUR reseller balance
- Adds amount to customer's internal balance
POST /v1/reseller/customers/{customerId}/topup
Content-Type: application/json
{
"amount": 100,
"description": "Monthly credit",
"referenceId": "INV-001"
}Error 403: Insufficient reseller balance
Suspend/Unsuspend Customer
POST /v1/reseller/customers/{customerId}/suspend
{"reason": "Payment overdue"}
POST /v1/reseller/customers/{customerId}/unsuspendManage Quotas
# Set absolute quota
PUT /v1/reseller/customers/{customerId}/quota
{"portSlots": 20, "trafficGB": 200}
# Adjust quota incrementally
PATCH /v1/reseller/customers/{customerId}/quota
{"portSlotsDelta": 5, "trafficGBDelta": 50}6. Port Operations
Create Port for Customer
Charging flow:
- We check YOUR balance has
basePrice × daysavailable - We create the port
- We deduct
basePrice × daysfrom YOUR reseller balance - The
pricing.resellerPricetells you what to charge your customer
POST /v1/reseller/ports
Content-Type: application/json
{
"customerId": "customer_id",
"countryId": "country_id",
"cityId": "city_id", // optional
"carrierId": "carrier_id", // optional
"days": 30,
"exclusive": false,
"isPrivate": false
}{
"port": {
"_id": "port_id",
"displayName": "psx_abc_xyz",
"httpPort": 10001,
"socksPort": 10002,
"proxyLogin": "user123",
"proxyPassword": "pass456",
"serverIp": "1.2.3.4",
"expiresAt": 1740000000000
},
"pricing": {
"costToReseller": 60.00, // What WE charged YOU
"resellerPrice": 75.00, // What YOU should charge YOUR customer
"margin": 15.00 // Your profit
}
}Error 402: Insufficient balance - your account doesn't have enough funds
List Ports
# All ports
GET /v1/reseller/ports
# Ports for specific customer
GET /v1/reseller/ports/customer/{customerId}
# Expiring soon
GET /v1/reseller/ports/expiring?hours=24
# Summary stats
GET /v1/reseller/ports/summaryRotate Port
POST /v1/reseller/ports/{portId}/rotateSuspend/Unsuspend Port
POST /v1/reseller/ports/{portId}/suspend
{"reason": "Customer request"}
POST /v1/reseller/ports/{portId}/unsuspendExtend Port Time
POST /v1/reseller/ports/{portId}/extend
{"hours": 720}7. Pricing & Margins
Understanding the Pricing Model
The pricebook calculates what you should charge your customers (resellerPrice). You always pay us the base cost regardless of your pricebook settings.
┌─────────────────────────────────────────────────────────────────┐ │ PRICING CALCULATION │ ├─────────────────────────────────────────────────────────────────┤ │ │ │ Base Price (our cost to you) = $2.00/day │ │ Your Margin Setting = 25% │ │ Days Requested = 30 │ │ │ │ ─────────────────────────────────────────────────── │ │ │ │ Cost to YOU (what we charge) = $2 × 30 = $60 │ │ Reseller Price (what you charge) = $60 × 1.25 = $75 │ │ Your Profit = $75 - $60 = $15 │ │ │ └─────────────────────────────────────────────────────────────────┘
Pricing Modes
| Mode | Description | Example (base $2/day × 30 days) |
|---|---|---|
| `margin` (default) | Add percentage markup to cost | Cost $60 + 25% = $75 (you charge customer) |
fixed | Fixed price regardless of base cost | Fixed $3/day × 30 = $90 (you charge) |
multiplier | Multiply base cost by factor | Cost $60 × 1.5 = $90 (you charge) |
Default Pricebook Settings
When your account is created:
{
"pricingMode": "margin",
"portPricing": { "marginPercent": 20 },
"trafficPricing": { "marginPercent": 20 },
"defaultMarginPercent": 20,
"countryOverrides": [],
"customerOverrides": []
}Get Pricebook
GET /v1/reseller/pricebookUpdate Pricebook
PUT /v1/reseller/pricebook
{
"pricingMode": "margin",
"defaultMarginPercent": 25,
"portPricing": {
"marginPercent": 25,
"minimumPrice": 1.50
},
"trafficPricing": {
"marginPercent": 30,
"minimumPricePerGB": 0.50
}
}Country Overrides
Set fixed prices for specific countries (overrides margin calculation):
POST /v1/reseller/pricebook/country-override
{
"countryId": "country_id",
"portPricePerDay": 3.50,
"trafficPricePerGB": 0.75
}Customer Overrides
Give specific customers different margins or discounts:
PUT /v1/reseller/pricebook
{
"customerOverrides": [
{
"customerId": "vip_customer_id",
"marginPercent": 15,
"discountPercent": 5
}
]
}Calculate Price
Preview pricing before creating a port:
POST /v1/reseller/pricebook/calculate
{
"type": "port",
"basePrice": 2.00,
"days": 30,
"countryId": "optional_country_id",
"customerId": "optional_customer_id"
}{
"basePrice": 60.00,
"resellerPrice": 75.00,
"marginAmount": 15.00,
"marginPercent": 25,
"appliedRules": ["Margin: +25%", "30 days"]
}8. Webhooks
Event Types
| Category | Events |
|---|---|
| Port | port.created`, `port.deleted`, `port.expiring`, `port.expired`, `port.rotated`, `port.suspended`, `port.unsuspended |
| Customer | customer.created`, `customer.updated`, `customer.suspended`, `customer.unsuspended`, `customer.quota_warning`, `customer.quota_exceeded |
| Traffic | traffic.threshold_50`, `traffic.threshold_80`, `traffic.threshold_100 |
| Billing | balance.low`, `balance.topup`, `purchase.completed |
Create Webhook
POST /v1/reseller/webhooks
{
"name": "Production Webhook",
"url": "https://your-server.com/webhook",
"events": ["port.created", "port.expired", "customer.quota_exceeded"]
}Webhook Payload
{
"id": "delivery_id",
"event": "port.created",
"timestamp": "2026-01-19T12:00:00.000Z",
"data": {
"portId": "...",
"customerId": "...",
"details": {}
}
}HMAC Verification
const crypto = require('crypto');
function verifySignature(payload, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(JSON.stringify(payload))
.digest('hex');
return signature === `sha256=${expected}`;
}Test Webhook
POST /v1/reseller/webhooks/{webhookId}/test
{"eventType": "port.created"}9. Analytics & Reporting
Dashboard Overview
GET /v1/reseller/analytics/dashboard{
"customers": {"total": 50, "active": 45, "suspended": 5},
"ports": {"total": 500, "active": 450, "expired": 50},
"revenue": {"today": 150, "thisMonth": 4500, "total": 50000},
"topCustomers": [...]
}Revenue Reports
# Summary
GET /v1/reseller/analytics/revenue
# By period
GET /v1/reseller/analytics/revenue/by-period?period=day
# By customer
GET /v1/reseller/analytics/revenue/by-customer?limit=10Commissions
GET /v1/reseller/analytics/commissions?startDate=2026-01-01&endDate=2026-01-3110. Rate Limits
Endpoint Limits
| Category | Endpoint | Limit |
|---|---|---|
| Customer | POST /customers | 10/min |
| Customer | PATCH /customers/:id | 30/min |
| Customer | POST /customers/:id/topup | 20/min |
| Port | POST /ports | 5/10sec |
| Port | POST /ports/:id/rotate | 10/min |
| Webhook | POST /webhooks/:id/test | 5/min |
| Analytics | All GET endpoints | 30/min |
| Default | Other endpoints | 100/min |
Rate Limit Headers
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 164000000011. API Reference
Base URLs
| Environment | URL |
|---|---|
| Production | https://api.proxies.sx/v1 |
| Swagger Docs | https://api.proxies.sx/docs/seller |
| OpenAPI Spec | GET /v1/reseller/docs/openapi |
| LLM Reference | GET /v1/reseller/docs/llm |
Customers Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /reseller/customers | Create customer |
| GET | /reseller/customers | List customers |
| GET | /reseller/customers/:id | Get customer |
| PATCH | /reseller/customers/:id | Update customer |
| DELETE | /reseller/customers/:id | Delete customer |
| GET | /reseller/customers/by-external-id/:externalId | Find by external ID |
| POST | /reseller/customers/:id/suspend | Suspend customer |
| POST | /reseller/customers/:id/unsuspend | Unsuspend customer |
| POST | /reseller/customers/:id/topup | Add balance |
| PUT | /reseller/customers/:id/quota | Set quota |
| PATCH | /reseller/customers/:id/quota | Adjust quota |
| GET | /reseller/customers/:id/usage | Get usage stats |
| GET | /reseller/customers/:id/quota-status | Get quota status |
Ports Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /reseller/ports | Create port |
| GET | /reseller/ports | List all ports |
| GET | /reseller/ports/customer/:customerId | List customer ports |
| GET | /reseller/ports/expiring | List expiring ports |
| GET | /reseller/ports/summary | Port statistics |
| GET | /reseller/ports/:portId | Get port details |
| DELETE | /reseller/ports/:portId | Delete port |
| POST | /reseller/ports/:portId/rotate | Rotate port |
| POST | /reseller/ports/:portId/extend | Extend time |
| POST | /reseller/ports/:portId/suspend | Suspend port |
| POST | /reseller/ports/:portId/unsuspend | Unsuspend port |
| POST | /reseller/ports/check-quota | Check quota |
| POST | /reseller/ports/calculate-price | Calculate price |
Webhooks Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /reseller/webhooks | Create webhook |
| GET | /reseller/webhooks | List webhooks |
| GET | /reseller/webhooks/event-types | Get event types |
| GET | /reseller/webhooks/:id | Get webhook |
| PUT | /reseller/webhooks/:id | Update webhook |
| DELETE | /reseller/webhooks/:id | Delete webhook |
| POST | /reseller/webhooks/:id/test | Test webhook |
| GET | /reseller/webhooks/:id/deliveries | Get deliveries |
Pricebook Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /reseller/pricebook | Get pricebook |
| PUT | /reseller/pricebook | Update pricebook |
| POST | /reseller/pricebook/calculate | Calculate price |
| POST | /reseller/pricebook/country-override | Add override |
| DELETE | /reseller/pricebook/country-override/:id | Remove override |
Analytics Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /reseller/analytics/dashboard | Dashboard stats |
| GET | /reseller/analytics/revenue | Revenue summary |
| GET | /reseller/analytics/revenue/by-period | Revenue by period |
| GET | /reseller/analytics/revenue/by-customer | Revenue by customer |
| GET | /reseller/analytics/commissions | Commission history |
12. Admin Dashboard
Admin Endpoints for Reseller Management
Admins can manage resellers via these endpoints:
| Method | Endpoint | Description |
|---|---|---|
| GET | /admin/resellers | List all resellers |
| GET | /admin/resellers/:id | Get reseller details |
| GET | /admin/resellers/:id/customers | View reseller's customers |
| GET | /admin/resellers/:id/ports | View reseller's ports |
| POST | /admin/resellers/:id/suspend | Suspend reseller |
| POST | /admin/resellers/:id/unsuspend | Unsuspend reseller |
| POST | /admin/resellers/:id/topup | Add balance |
| PUT | /admin/resellers/:id/commission-rate | Set commission |
Admin Panel Pages
admin-panel/
├── Resellers.tsx # Reseller list
├── ResellerDetail.tsx # Detail view with tabs
├── ResellerAnalytics.tsx # Platform-wide analytics
└── ResellerWebhooks.tsx # Webhook monitoring13. Testing & Validation
Test Checklist
- Authentication works (JWT and API Key)
- Customer CRUD operations work
- Balance deductions work correctly
- Port creation deducts from reseller
- Webhooks deliver successfully
- Rate limits trigger correctly
- Analytics return data
Test Credentials (Development)
Reseller: reseller@test.com / ResellerPass123
API Key: psx_test_key_xxxxxVerified Test Results
| Category | Passed | Total |
|---|---|---|
| Customer Endpoints | 12 | 12 |
| Webhook Endpoints | 8 | 8 |
| Pricebook Endpoints | 5 | 5 |
| Analytics Endpoints | 5 | 5 |
| Port Endpoints | 6 | 13 |
| Total | 36 | 43 |
Note: 7 port tests skipped (require physical devices)
14. Troubleshooting
Common Errors
| Error | Cause | Solution |
|---|---|---|
| 401 Unauthorized | Invalid/expired token | Refresh JWT or check API key |
| 403 Forbidden | Missing role/scope | Ensure reseller role and proper scopes |
| 402 Insufficient Balance | Low reseller balance | Top up your account |
| 400 Quota Exceeded | Customer at limit | Increase quota allocation |
| 429 Too Many Requests | Rate limit hit | Wait and retry with backoff |
Debugging Tips
- Check response body for detailed error messages
- Verify API key has required scopes
- Ensure customer belongs to your reseller account
- Check balance before operations that deduct
Support
- Email: support@proxies.sx
- Documentation: docs.proxies.sx
- API Status: status.proxies.sx
15. Changelog
v1.0.0 (January 2026)
Initial Release:
- Customer management (CRUD, suspend, topup)
- Port operations (create, rotate, extend)
- Webhook system (17 event types)
- Pricing configuration (margin, fixed, multiplier)
- Analytics dashboard
- Rate limiting on all endpoints
Bug Fixes:
- Fixed customer topup not deducting from reseller balance (BUG-001)
- Fixed port creation not charging reseller (BUG-002)
16. Complete API Response Reference
Customer Responses
Create Customer (POST /reseller/customers)
{
"_id": "696dea7dadd92285d1bb784d",
"resellerId": "69344abf4e8861b9e9986744",
"email": "customer@example.com",
"name": "Customer Name",
"company": "Company Name",
"status": "active",
"allocatedPortSlots": 10,
"allocatedTrafficGB": 100,
"usedPortSlots": 0,
"usedTrafficGB": 0,
"balance": 0,
"totalSpent": 0,
"totalTopUp": 0,
"canCreatePorts": true,
"canRotatePorts": true,
"externalId": "YOUR-CRM-ID",
"isDeleted": false,
"deletedAt": null,
"createdAt": "2026-01-19T08:25:33.009Z",
"updatedAt": "2026-01-19T08:25:33.009Z",
"__v": 0,
"id": "696dea7dadd92285d1bb784d"
}List Customers (GET /reseller/customers)
{
"customers": [
{
"_id": "...",
"email": "...",
"name": "...",
"status": "active",
"allocatedPortSlots": 10,
"usedPortSlots": 2,
"balance": 100
}
],
"total": 1,
"skip": 0,
"limit": 20
}Customer Usage Stats (GET /reseller/customers/:id/usage)
{
"customer": { /* full customer object */ },
"quotaUsage": {
"portSlotsUsed": 0,
"portSlotsAllocated": 10,
"portSlotsPercent": 0,
"trafficUsedGB": 0,
"trafficAllocatedGB": 100,
"trafficPercent": 0
},
"balanceStats": {
"currentBalance": 0,
"totalTopUp": 0,
"totalSpent": 0
}
}Customer Quota Status (GET /reseller/customers/:id/quota-status)
{
"customerId": "696dea7dadd92285d1bb784d",
"portSlots": {
"used": 0,
"allocated": 10,
"available": 10,
"percentUsed": 0,
"isAtCapacity": false
},
"traffic": {
"usedGB": 0,
"allocatedGB": 100,
"availableGB": 100,
"percentUsed": 0,
"isExceeded": false
},
"canCreatePorts": true,
"canRotatePorts": true,
"warnings": []
}Delete Customer (DELETE /reseller/customers/:id)
{
"success": true,
"message": "Customer deleted successfully"
}Pricebook Responses
Get Pricebook (GET /reseller/pricebook)
{
"_id": "696cee59daf5d3936cc10f24",
"resellerId": "69344abf4e8861b9e9986744",
"pricingMode": "margin",
"portPricing": {
"marginPercent": 20
},
"trafficPricing": {
"marginPercent": 20
},
"defaultMarginPercent": 20,
"countryOverrides": [],
"customerOverrides": [],
"createdAt": "2026-01-18T14:29:45.994Z",
"updatedAt": "2026-01-18T14:29:45.994Z",
"__v": 0,
"id": "696cee59daf5d3936cc10f24"
}Calculate Price (POST /reseller/pricebook/calculate)
{
"basePrice": 60,
"resellerPrice": 72,
"marginAmount": 12,
"marginPercent": 20,
"appliedRules": [
"Margin: +20%",
"30 days"
]
}Port Responses
List Ports (GET /reseller/ports)
{
"ports": [],
"total": 0,
"skip": 0,
"limit": 20
}Port Summary (GET /reseller/ports/summary)
{
"total": 0,
"active": 0,
"expired": 0,
"suspended": 0,
"expiringIn24h": 0,
"byCustomer": []
}Webhook Responses
Create Webhook (POST /reseller/webhooks)
{
"_id": "696dea9dadd92285d1bb7a0b",
"resellerId": "69344abf4e8861b9e9986744",
"url": "https://your-server.com/webhook",
"name": "Production Webhook",
"events": ["port.created", "customer.created"],
"isActive": true,
"failureCount": 0,
"isDeleted": false,
"deletedAt": null,
"createdAt": "2026-01-19T08:26:05.320Z",
"updatedAt": "2026-01-19T08:26:05.320Z",
"__v": 0,
"id": "696dea9dadd92285d1bb7a0b"
}List Webhooks (GET /reseller/webhooks)
{
"webhooks": [],
"total": 0,
"skip": 0,
"limit": 20
}Get Event Types (GET /reseller/webhooks/event-types)
[
"port.created",
"port.deleted",
"port.expiring",
"port.expired",
"port.rotated",
"port.suspended",
"port.unsuspended",
"customer.created",
"customer.updated",
"customer.suspended",
"customer.unsuspended",
"customer.quota_warning",
"customer.quota_exceeded",
"traffic.threshold_50",
"traffic.threshold_80",
"traffic.threshold_100",
"balance.low",
"balance.topup",
"purchase.completed"
]Delete Webhook (DELETE /reseller/webhooks/:id)
{
"success": true,
"message": "Webhook deleted"
}Analytics Responses
Dashboard (GET /reseller/analytics/dashboard)
{
"customers": {
"total": 50,
"active": 45,
"suspended": 5,
"newThisMonth": 10
},
"ports": {
"totalActive": 450,
"expiringIn24h": 15
},
"revenue": {
"thisMonth": 4500.00,
"lastMonth": 4200.00,
"growthPercent": 7.14
},
"margin": {
"thisMonth": 900.00,
"lastMonth": 840.00,
"averagePercent": 20
}
}Revenue Summary (GET /reseller/analytics/revenue)
{
"totalRevenue": 50000.00,
"totalCost": 40000.00,
"totalMargin": 10000.00,
"marginPercent": 20,
"transactionCount": 500,
"byType": {
"port_purchase": 45000.00,
"port_extension": 5000.00
}
}Revenue by Period (GET /reseller/analytics/revenue/by-period?period=day)
[
{
"period": "2026-01-19",
"revenue": 150.00,
"cost": 120.00,
"margin": 30.00,
"transactions": 5
}
]Commissions (GET /reseller/analytics/commissions)
{
"commissions": [
{
"_id": "...",
"amount": 15.00,
"portId": "...",
"customerId": "...",
"type": "port_purchase",
"createdAt": "2026-01-19T..."
}
],
"total": 100,
"skip": 0,
"limit": 20
}Error Responses
400 Bad Request
{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}401 Unauthorized
{
"statusCode": 401,
"message": "Unauthorized"
}402 Insufficient Balance
{
"statusCode": 402,
"message": "Insufficient balance. Required: $60.00, Available: $45.00"
}403 Forbidden
{
"statusCode": 403,
"message": "Insufficient reseller balance"
}404 Not Found
{
"statusCode": 404,
"message": "Customer not found",
"error": "Not Found"
}429 Rate Limited
{
"statusCode": 429,
"message": "Too Many Requests"
}Document generated: January 19, 2026
API responses verified: January 19, 2026