Administrative REST API for managing your AffiliatePro platform
All endpoints require a valid admin JWT token. Use the raw token — do not include a Bearer prefix.
All Admin API endpoints are relative to this base URL.
Request completed successfully
Invalid or missing token
Valid token but not admin
Validation failed
Use the User Login API with admin credentials to obtain a JWT token.
Include the raw JWT in the Authorization header (no Bearer prefix).
Send requests to https://demo2.affiliatepro.org/Admin_Api/ + endpoint path.
Every API endpoint that returns monetary values automatically includes the platform's currency settings. Use these to format amounts correctly in your app instead of hardcoding $.
| Field | Type | Example | Description |
|---|---|---|---|
currency_symbol |
string |
$ |
The default currency symbol from the platform settings |
currency_code |
string |
USD |
ISO 4217 currency code |
enable_shorten_numbers |
integer |
1 |
If 1, format large amounts as $3.9k / $1.2M. If 0, show full numbers like $3900.00 |
dashboard, users, user_details, withdrawals, wallet, reports, and the login response.
Never hardcode a currency symbol — always read it from the API response.
Retrieve admin dashboard statistics with HTTP GET request.
Returns a comprehensive overview of your platform: total users, affiliates (active non-vendor users), vendors, pending items, today's activity, admin balance with growth, store & vendor sales, commissions (admin + affiliate), click commissions, currency settings (symbol, code, shorten formatting), and recent user registrations. All data uses the same source as the web admin dashboard.
https://demo2.affiliatepro.org/Admin_Api/dashboard
| Parameter | Type | Position | Description |
|---|---|---|---|
| Authorization | string |
Header |
Admin JWT token obtained from login API |
{"status":true,"data":{"total_users":150,"total_affiliates":120,"total_vendors":30,"pending_users":5,"pending_withdrawals":3,"total_withdrawals_amount":"1250.00","admin_balance":"3900.50","admin_balance_growth":12.5,"store_sales":"8500.00","store_commission":"850.00","store_orders":42,"vendor_sales":"3200.00","vendor_commission":"320.00","vendor_orders":18,"click_commission":"450.00","total_clicks":1250,"today_clicks":45,"today_sales":8,"currency_symbol":"$","currency_code":"USD","enable_shorten_numbers":1,"recent_users":[{"id":"88","firstname":"John","lastname":"Doe","username":"johndoe","email":"john@example.com","type":"user","status":"1","created_at":"2025-06-11 16:44:16"},{"id":"87","firstname":"Jane","lastname":"Smith","username":"janesmith","email":"jane@example.com","type":"user","status":"0","created_at":"2025-06-10 14:22:08"}]}}
Manage all users/affiliates on your platform. List users with pagination and filters, view detailed user information, and update user status (approve, block, set to pending).
Retrieve a paginated list of users with optional search and status filters.
https://demo2.affiliatepro.org/Admin_Api/users
| Parameter | Type | Position | Description |
|---|---|---|---|
Authorization |
string |
Header |
Admin JWT token |
start_from |
integer |
Query |
Pagination offset (default: 0) |
limit |
integer |
Query |
Number of results per page (default: 20) |
search |
string |
Query |
Search by username, email, firstname, or lastname |
status |
string |
Query |
all, active, pending, or blocked (default: all) |
{"status":true,"data":{"users":[{"id":"88","firstname":"John","lastname":"Doe","username":"johndoe","email":"john@example.com","status":"1","is_vendor":"0","balance":"150.00","total_clicks":230,"total_sales":15}],"total_count":150,"has_more":true,"currency_symbol":"$","currency_code":"USD","enable_shorten_numbers":1}}
Retrieve detailed information for a specific user including balance, clicks, and sales.
https://demo2.affiliatepro.org/Admin_Api/user_details
| Parameter | Type | Position | Description |
|---|---|---|---|
Authorization |
string |
Header |
Admin JWT token |
user_id |
integer |
Query |
The ID of the user to retrieve (required) |
{"status":true,"data":{"id":"88","firstname":"John","lastname":"Doe","status":"1","is_vendor":"0","balance":"150.00","total_clicks":230,"total_sales":15,"total_revenue":"450.00","total_referrals":3,"recent_clicks":[],"recent_sales":[],"currency_symbol":"$","currency_code":"USD","enable_shorten_numbers":1}}
Toggle a user's account status between enabled (status=1) and disabled (status=0). Works exactly like the / button on the web admin Users List page. A disabled user cannot login.
https://demo2.affiliatepro.org/Admin_Api/update_user_status
| Parameter | Type | Required | Description |
|---|---|---|---|
Authorization |
string |
true |
Admin JWT token (Header) |
user_id |
integer |
true |
The ID of the user to toggle |
status=1 (enabled), it becomes 0 (disabled). If status=0, it becomes 1. The response includes the new_status value.
{"status":true,"message":"User status disabled successfully","new_status":0}
Manage the admin user's own profile. Get full profile details including country information and available countries list, and update profile fields including avatar upload.
Retrieve the authenticated admin's full profile details. Also returns a list of all available countries for use in country selection dropdowns.
https://demo2.affiliatepro.org/Admin_Api/profile
| Parameter | Type | Position | Description |
|---|---|---|---|
Authorization |
string |
Header |
Admin JWT token |
{ "status": true, "message": "Admin profile loaded successfully", "data": { "firstname": "John", "lastname": "Doe", "email": "admin@example.com", "username": "admin", "PhoneNumber": "+1 201-555-0123", "city": "New York", "pincode": "10001", "country_id": "231", "country_code": "US", "country_name": "United States", "country_flag": "https://yoursite.com/assets/vertical/assets/images/flags/us.png", "profile_avatar": "https://yoursite.com/assets/images/users/avatar.jpg", "role": "admin", "countries": [ {"id": "1", "name": "Afghanistan"}, {"id": "2", "name": "Albania"}, "..." ] } }
| Field | Type | Description |
|---|---|---|
firstname |
string |
Admin first name |
lastname |
string |
Admin last name |
email |
string |
Admin email address |
username |
string |
Admin username |
PhoneNumber |
string |
Phone number |
city |
string |
City name |
pincode |
string |
Postal / ZIP code |
country_id |
string |
Selected country ID |
country_code |
string |
ISO country code (e.g. US, GB) |
country_name |
string |
Full country name |
country_flag |
string |
URL to country flag image |
profile_avatar |
string |
URL to profile avatar image |
role |
string |
User role (always admin) |
countries |
array |
List of all available countries (each with id and name) |
Update the authenticated admin's profile information. Supports text fields and avatar image upload. Only provided fields will be updated.
https://demo2.affiliatepro.org/Admin_Api/update_profile
| Parameter | Type | Required | Description |
|---|---|---|---|
Authorization |
string |
true |
Admin JWT token (Header) |
firstname |
string |
true |
First name |
lastname |
string |
true |
Last name |
email |
string |
true |
Email address |
phone |
string |
false |
Phone number |
country_id |
integer |
false |
Country ID from the countries list |
city |
string |
false |
City name |
pincode |
string |
false |
Postal / ZIP code |
password |
string |
false |
New password (leave empty to keep current) |
avatar |
file |
false |
Profile image (png, gif, jpeg, jpg — max 2MB) |
{ "status": true, "message": "Profile updated successfully", "data": { "firstname": "John", "lastname": "Doe", "email": "admin@example.com", "username": "admin", "PhoneNumber": "+1 201-555-0123", "city": "New York", "pincode": "10001", "country_id": "231", "country_code": "US", "country_name": "United States", "country_flag": "https://yoursite.com/assets/vertical/assets/images/flags/us.png", "profile_avatar": "https://yoursite.com/assets/images/users/avatar.jpg", "role": "admin" } }
multipart/form-data content type. Fields firstname, lastname, and email are required; all other fields are optional.
Manage withdrawal requests from affiliates. View pending/paid/rejected requests and approve or reject them.
Retrieve a paginated list of withdrawal requests with status filter.
https://demo2.affiliatepro.org/Admin_Api/withdrawals
| Parameter | Type | Position | Description |
|---|---|---|---|
| Authorization | string | Header | Admin JWT token |
| start_from | integer | Query | Pagination offset (default: 0) |
| limit | integer | Query | Results per page (default: 20) |
| status | string | Query | unpaid, paid, or rejected (default: unpaid) |
{
"status": true,
"data": {
"requests": [
{
"id": "3",
"tran_ids": "17",
"amount": "37.5",
"status": "0",
"user_id": "4",
"payment_method": "bank_transfer",
"status_label": "Received",
"payment_details": {
"bank_name": "My Bank",
"account_number": "123456789",
"account_name": "John Doe"
},
"created_at": "2026-02-23 08:43:20",
"username": "johndoe",
"email": "john@example.com",
"firstname": "John",
"lastname": "Doe"
}
],
"total_count": 2,
"start_from": 0,
"limit": 20,
"has_more": false,
"currency_symbol": "$",
"currency_code": "USD",
"enable_shorten_numbers": 1
}
}
| Code | Label | Description |
|---|---|---|
0 | Received | Pending / waiting for admin action |
1 | Paid | Payment completed |
2 | Processing | Payment in progress |
3 | Cancelled | Request cancelled |
4 | Declined | Request declined by admin |
Approve or reject a withdrawal request by its ID. Optionally include an admin note.
https://demo2.affiliatepro.org/Admin_Api/update_withdrawal_status
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string | true | Admin JWT token (Header) |
| request_id | integer | true | The ID of the withdrawal request |
| status | string | true | paid or rejected |
| admin_note | string | false | Optional note from admin |
{"status":true,"message":"Withdrawal request approved successfully"}
Retrieve analytics data for your platform within a date range. Includes clicks by day, sales by day, and top-performing affiliates.
If no date range is provided, defaults to the current month (first day of month to today).
https://demo2.affiliatepro.org/Admin_Api/reports
| Parameter | Type | Position | Description |
|---|---|---|---|
| Authorization | string | Header | Admin JWT token |
| date_from | string | Query | Start date in YYYY-MM-DD format (default: first day of current month) |
| date_to | string | Query | End date in YYYY-MM-DD format (default: today) |
{"status":true,"data":{"date_from":"2025-06-01","date_to":"2025-06-15","clicks_by_day":[{"date":"2025-06-01","count":"12"},{"date":"2025-06-02","count":"18"},{"date":"2025-06-03","count":"25"}],"sales_by_day":[{"date":"2025-06-01","count":"3","total":"450.00"},{"date":"2025-06-02","count":"5","total":"780.00"},{"date":"2025-06-03","count":"2","total":"200.00"}],"top_affiliates":[{"id":"88","firstname":"John","lastname":"Doe","username":"johndoe","total_sales":"15","total_revenue":"3500.00"},{"id":"65","firstname":"Jane","lastname":"Smith","username":"janesmith","total_sales":"12","total_revenue":"2800.00"}],"currency_symbol":"$","currency_code":"USD","enable_shorten_numbers":1}}
Retrieve the admin wallet overview including balance, sale totals, click totals, commissions across all channels, and recent transactions.
https://demo2.affiliatepro.org/Admin_Api/wallet
| Parameter | Type | Position | Description |
|---|---|---|---|
| Authorization | string | Header | Admin JWT token |
{"status":true,"data":{"admin_balance":"12500.00","sale_localstore_total":"8500.00","sale_localstore_vendor_total":"3200.00","order_external_total":"4500.00","click_action_total":120,"click_action_commission":"360.00","click_localstore_total":450,"click_integration_total":280,"click_form_total":95,"click_localstore_commission":"225.00","click_integration_commission":"140.00","click_form_commission":"47.50","transactions":[{"id":"234","user_id":"88","amount":"150.00","type":"sale","status":"paid","created_date":"2025-06-11 14:30:00","firstname":"John","lastname":"Doe"},{"id":"233","user_id":"65","amount":"75.00","type":"click","status":"unpaid","created_date":"2025-06-10 09:15:00","firstname":"Jane","lastname":"Smith"}],"currency_symbol":"$","currency_code":"USD","enable_shorten_numbers":1}}
| Field | Type | Description |
|---|---|---|
admin_balance | string | Total admin balance |
sale_localstore_total | string | Total local store sales amount |
sale_localstore_vendor_total | string | Total local store vendor sales amount |
order_external_total | string | Total external order amount (integration campaigns) |
click_action_total | integer | Total action/lead clicks |
click_action_commission | string | Total commission from action clicks |
click_localstore_total | integer | Total local store clicks |
click_integration_total | integer | Total integration/external clicks |
click_form_total | integer | Total form/lead clicks |
click_localstore_commission | string | Total commission from local store clicks |
click_integration_commission | string | Total commission from integration clicks |
click_form_commission | string | Total commission from form clicks |
transactions | array | Recent wallet transactions (up to 50, includes user details) |
Working demos connected to your Admin API - login and see real data
| Name | Balance | Clicks | Sales | Type | Status | Action | |
|---|---|---|---|---|---|---|---|
| Connect to API first | |||||||
| User | Amount | Method | Date | Actions |
|---|---|---|---|---|
| Connect to API first | ||||
| User | Amount | Type | Status | Date |
|---|---|---|---|---|
| Connect to API first | ||||