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://demo.affiliatepro.org/Admin_Api/ + endpoint path.
The Admin API uses the same permission slugs as the website (Admin panel → Manage Roles). There is no separate mobile permission list.
users.id = 1) can call every endpoint.admin_roles.permissions).users.admin_permissions JSON behave as full access (same as the web panel).GET Admin_Api/profile is always allowed for a valid admin JWT so clients can load the account. Its data includes:
| Field | Type | Description |
|---|---|---|
admin_full_access |
bool |
true when this account is treated as unrestricted (super admin or legacy full-access rule above). |
admin_permission_slugs |
array of string |
Explicit slugs for this admin (sorted). When admin_full_access is true, this lists all defined slugs for UI convenience. |
admin_role_name |
string or omitted |
Human-readable role name from admin_roles.name when a role is assigned. |
All other Admin API methods enforce one required slug per action. If the caller lacks it, the HTTP status is still 200 with JSON like:
{
"status": false,
"message": "Access Denied! Insufficient permissions.",
"required_permission": "users"
}
Developer reference: the mapping from PHP method name → slug is in application/config/admin_permissions.php under $config['admin_api_method_permissions'], aligned with the web admin_permission_map where the feature exists on both sides.
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.
All planned optional mobile admin areas are now delivered. The Admin API described in this reference covers every endpoint the mobile app uses.
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://demo.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://demo.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) |
account |
string |
Query |
all, affiliate (non-vendor users), or vendor (is_vendor=1) |
{"status":true,"data":{"users":[{"id":"88","firstname":"John","lastname":"Doe","username":"johndoe","email":"john@example.com","status":"1","is_vendor":"0","account_type":"affiliate","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. Response includes account_type: vendor or affiliate. When is_vendor is 1, the payload also includes read-only vendor_profile_extras: store (name, slug, email, address, contact fields, meta), optional vendor_setting (commission-related columns from vendor_setting), and counts (integration_programs, integration_tools, store_products).
https://demo.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","account_type":"affiliate","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://demo.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}
Read-only views for admin panel accounts (users.type = 'admin') and admin roles, aligned with web admincontrol/admin_user and admincontrol/admin_roles. All three endpoints require the same permission as the web screens: admin.admins (Manage Admin Users). No create, update, or delete via API.
Paginated list of admin accounts with optional search (firstname, lastname, username, email). When admin_roles exists, each row includes role_name and role_slug.
https://demo.affiliatepro.org/Admin_Api/admin_staff
| Parameter | Type | Description |
|---|---|---|
Authorization | Header | Admin JWT |
start_from | int | Offset (default 0) |
limit | int | Page size, max 100 (default 20) |
search | string | Optional |
data{"staff":[],"total_count":0,"start_from":0,"limit":20,"has_more":false}
Single admin row (no password or token). Includes admin_role_label, admin_permissions (slug array when resolved from role), and is_super_admin when id === 1, same resolution as web helper when admin_roles exists.
https://demo.affiliatepro.org/Admin_Api/admin_staff_details
Authorization | Header — Admin JWT |
user_id | Required — admin user id |
status: false — missing user_id, not found, forbidden without admin.admins, or not an admin account.
All rows from admin_roles with permissions as a JSON array of slugs and admin_user_count (admins assigned to that role). If the table is missing, admin_roles_table_exists is false and roles is empty.
https://demo.affiliatepro.org/Admin_Api/admin_roles
Authorization header only.
data{"admin_roles_table_exists":true,"roles":[{"id":"1","name":"Support","slug":"support","permissions":["dashboard"],"admin_user_count":2,"created_at":""}]}
Rows where notification_viewfor = 'admin' in the notification table. Titles and descriptions are sanitized for API clients. admin_web_url points at the web admin (admincontrol/…) when the stored link is relative.
https://demo.affiliatepro.org/Admin_Api/notifications
| Parameter | Type | Description |
|---|---|---|
| Authorization | Header | Admin JWT |
| start_from | integer | Offset (default 0) |
| limit | integer | Page size, max 100 (default 20) |
| search | string | Title, description, or type |
| read | string | all, unread, or read |
| type | string | all or exact notification_type |
When start_from is 0, the response includes counts: all, unread, and read (same search / type scope as the list). Omitted on later pages to avoid extra aggregate queries while paginating.
https://demo.affiliatepro.org/Admin_Api/notification_details?notification_id=
https://demo.affiliatepro.org/Admin_Api/notification_read
JSON body: notification_id (integer).
https://demo.affiliatepro.org/Admin_Api/notifications_mark_all_read
No body. Updates every admin notification where notification_is_read is not 1.
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. GET profile also returns role permission slugs for sub-admins (see Introduction → Sub-admin roles).
Retrieve the authenticated admin's full profile details. Also returns a list of all available countries for use in country selection dropdowns.
https://demo.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/template/images/flags/us.png", "profile_avatar": "https://yoursite.com/assets/images/users/avatar.jpg", "role": "admin", "admin_full_access": false, "admin_permission_slugs": [ "dashboard", "users" ], "admin_role_name": "Support", "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) |
admin_full_access |
boolean |
true if this account bypasses slug checks (super admin or full-access rule). See Sub-admin roles. |
admin_permission_slugs |
array |
List of permission slugs for this admin (same strings as web Manage Roles). |
admin_role_name |
string or null |
Assigned role display name from admin_roles, if any. |
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. Requires the settings permission slug for sub-admins (same as general settings access on the web).
https://demo.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/template/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://demo.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://demo.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://demo.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://demo.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) |
Browse and inspect integration programs (vendor affiliate programs). Each program defines commission rules for sales and clicks that apply to its campaigns.
Retrieve a paginated, searchable list of integration programs with optional status filter.
https://demo.affiliatepro.org/Admin_Api/programs
| Parameter | Type | Position | Description |
|---|---|---|---|
| Authorization | string | Header | Admin JWT token |
| start_from | integer | Query | Pagination offset (default: 0) |
| limit | integer | Query | Results per page, max 100 (default: 20) |
| search | string | Query | Search by program name or vendor username |
| status | string | Query | all, active, or inactive (default: all) |
{
"status": true,
"data": {
"programs": [
{
"id": "5",
"name": "Fashion Affiliate Program",
"status": "1",
"vendor_id": "12",
"username": "vendor_user",
"commission_type": "percentage",
"commission_sale": "10",
"sale_status": "1",
"click_status": "0",
"associate_programns": "3"
}
],
"total_count": 12,
"start_from": 0,
"limit": 20,
"has_more": false,
"currency_symbol": "$",
"currency_code": "USD",
"enable_shorten_numbers": 1
}
}
| Code | Label | Description |
|---|---|---|
0 | In Review | Awaiting admin approval |
1 | Approved / Active | Program is live |
2 | Denied | Rejected by admin |
3 | Ask to Edit | Returned to vendor for changes |
Retrieve full details for a single program including commission settings and vendor information.
https://demo.affiliatepro.org/Admin_Api/program_details
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string | true | Admin JWT token (Header) |
| program_id | integer | true | The ID of the program |
{
"status": true,
"data": {
"id": "5",
"name": "Fashion Affiliate Program",
"status": "1",
"vendor_id": "12",
"username": "vendor_user",
"email": "vendor@example.com",
"vendor_name": "John Doe",
"firstname": "John",
"lastname": "Doe",
"commission_type": "percentage",
"commission_sale": "10",
"sale_status": "1",
"click_status": "0",
"tools_count": 3,
"currency_symbol": "$",
"currency_code": "USD"
}
}
Browse and inspect integration campaigns (marketing tools / ads). Each campaign belongs to a program and inherits commission settings from that program.
Retrieve a paginated, searchable list of integration campaigns (integration_tools) with optional status filter.
https://demo.affiliatepro.org/Admin_Api/campaigns
| Parameter | Type | Position | Description |
|---|---|---|---|
| Authorization | string | Header | Admin JWT token |
| start_from | integer | Query | Pagination offset (default: 0) |
| limit | integer | Query | Results per page, max 100 (default: 20) |
| search | string | Query | Search by campaign name, program name, or vendor username |
| status | string | Query | all, active, or inactive (default: all) |
{
"status": true,
"data": {
"campaigns": [
{
"id": "18",
"program_id": "5",
"vendor_id": "12",
"name": "Summer Sale Banner",
"type": "banner_ads",
"tool_type": "banner",
"status": "1",
"created_at": "2025-06-01 10:00:00",
"program_name": "Fashion Affiliate Program",
"vendor_username": "vendor_user",
"stat_sales_count": "12",
"stat_clicks_count": "340",
"stat_orders_total": "1250.50"
}
],
"total_count": 45,
"start_from": 0,
"limit": 20,
"has_more": true,
"currency_symbol": "$",
"currency_code": "USD",
"enable_shorten_numbers": 1
}
}
List rows include stat_sales_count (rows in integration_orders), stat_clicks_count (_af_product_click in integration_clicks_action), and stat_orders_total (sum of integration_orders.total).
Retrieve full details for a single campaign including ad creatives, program commission fields, and vendor info.
https://demo.affiliatepro.org/Admin_Api/campaign_details
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string | true | Admin JWT token (Header) |
| campaign_id | integer | true | The ID of the campaign (integration_tools.id) |
{
"status": true,
"data": {
"id": "18",
"name": "Summer Sale Banner",
"type": "banner_ads",
"tool_type": "banner",
"status": "1",
"program_id": "5",
"program_name": "Fashion Affiliate Program",
"vendor_id": "12",
"vendor_name": "John Doe",
"username": "vendor_user",
"commission_type": "percentage",
"commission_sale": "10",
"sale_status": "1",
"commission": {},
"ads": [],
"created_at": "2025-06-01 10:00:00",
"currency_symbol": "$",
"currency_code": "USD"
}
}
Read-only list and detail for integration marketing categories (integration_category). Used to classify programs in the integration marketplace.
Paginated list with optional search on category or parent name. Timestamps are returned as stored in the database (ISO-style strings).
https://demo.affiliatepro.org/Admin_Api/categories
| Parameter | Type | Position | Description |
|---|---|---|---|
| Authorization | string | Header | Admin JWT token |
| start_from | integer | Query | Pagination offset (default: 0) |
| limit | integer | Query | Results per page, max 100 (default: 20) |
| search | string | Query | Search by category name or parent category name |
{
"status": true,
"data": {
"categories": [
{
"id": 3,
"name": "Electronics",
"parent_id": 0,
"created_at": "2025-01-15 12:30:00",
"parent_name": null
}
],
"total_count": 8,
"start_from": 0,
"limit": 20,
"has_more": false,
"currency_symbol": "$",
"currency_code": "USD",
"enable_shorten_numbers": 1
}
}
Single category row plus children_count (direct child categories).
https://demo.affiliatepro.org/Admin_Api/category_details
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string | true | Admin JWT token (Header) |
| category_id | integer | true | integration_category.id |
{
"status": true,
"data": {
"id": 3,
"name": "Electronics",
"parent_id": 0,
"created_at": "2025-01-15 12:30:00",
"parent_name": null,
"children_count": 2,
"currency_symbol": "$",
"currency_code": "USD",
"enable_shorten_numbers": 1
}
}
Read-only combined view of local store orders (order) and integration / external orders (integration_orders). List rows are lightweight; use order_details for line items and history.
Each row includes order_type: store (local store) or ex (integration). external_reference is the payment / external reference (txn_id for store, order_id for integration).
https://demo.affiliatepro.org/Admin_Api/orders
| Parameter | Type | Position | Description |
|---|---|---|---|
| Authorization | string | Header | Admin JWT token |
| start_from | integer | Query | Pagination offset (default: 0) |
| limit | integer | Query | Results per page, max 100 (default: 20) |
| search | string | Query | Search id, references, customer username / email / name; for ex also base_url and script_name |
| type | string | Query | all, store, or ex (default: all) |
| status | string | Query | all or numeric order status code (same field on both order types) |
{
"status": true,
"data": {
"orders": [
{
"order_type": "store",
"id": 120,
"status": 1,
"user_id": 45,
"total": "99.00",
"currency_code": "USD",
"payment_method": "stripe",
"external_reference": "pi_abc123",
"created_at": "2025-06-10 14:22:01",
"firstname": "Jane",
"lastname": "Doe",
"username": "jane",
"email": "jane@example.com"
},
{
"order_type": "ex",
"id": 88,
"status": 1,
"user_id": 12,
"total": "45.00",
"currency_code": "USD",
"payment_method": "",
"external_reference": "EXT-7788",
"created_at": "2025-06-09 09:15:00",
"firstname": "John",
"lastname": "Smith",
"username": "john",
"email": "john@example.com"
}
],
"total_count": 200,
"start_from": 0,
"limit": 20,
"has_more": true,
"currency_symbol": "$",
"currency_code": "USD",
"enable_shorten_numbers": 1
}
}
For store, includes products, decoded files / comment where applicable, and payment / order history. For ex, includes integration fields, optional campaign_name and program_name, and decoded custom_data.
https://demo.affiliatepro.org/Admin_Api/order_details
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string | true | Admin JWT token (Header) |
| order_type | string | true | store or ex (must match list row) |
| id | integer | true | Primary key in order or integration_orders |
Order_model::$status (complete, pending, refunded, etc.).status column; meaning aligns with your integration / wallet workflow.List and manage support tickets (tickets, tickets_reply, tickets_subject). GET endpoints are read-only; POST ticket_reply and ticket_status mirror web admin behaviour (email + in-app notifications where configured).
Lookup list for filter dropdowns (id + subject label).
https://demo.affiliatepro.org/Admin_Api/ticket_subjects
{
"status": true,
"data": {
"subjects": [ { "id": 1, "subject": "Billing" } ],
"currency_symbol": "$",
"currency_code": "USD",
"enable_shorten_numbers": 1
}
}
https://demo.affiliatepro.org/Admin_Api/tickets
| Parameter | Type | Description |
|---|---|---|
| Authorization | Header | Admin JWT |
| start_from | integer | Offset (default 0) |
| limit | integer | Page size, max 100 (default 20) |
| search | string | Ticket id, user name, email, username, subject text |
| status | string | all or 1 open, 2 pending, 3 closed |
| subject_id | string | all or numeric tickets_subject.id |
Returns ticket (header row) and replies in chronological order. user_type on a reply: 1 = admin/staff, 2 = end user. attachments exposes safe filenames + absolute url (web uploads).
https://demo.affiliatepro.org/Admin_Api/ticket_details?ticket_id=
Plain-text body only (no multipart upload). Re-opens a closed ticket to open when the admin replies, same as web admin.
https://demo.affiliatepro.org/Admin_Api/ticket_reply
JSON body: ticket_id (string), message (string).
Sets tickets.status and triggers the same mail / notification hooks as the web admin.
https://demo.affiliatepro.org/Admin_Api/ticket_status
JSON body: ticket_id (string), status — 1 open, 2 pending, 3 closed.
Read-only overview of public-safe configuration (no SMTP secrets, payment keys, or Telegram tokens). Intended for the mobile admin app. Access: valid admin JWT and admin user type — same as other Admin API GET endpoints.
Returns grouped site, store, modules, and default language, merged with the same currency helpers as other admin endpoints: currency_symbol, currency_code, enable_shorten_numbers.
Most module and store flags are string "0" / "1" as stored in settings — clients should map them to labels (off/on) if needed. site.favicon_url is only present when a favicon is configured.
https://demo.affiliatepro.org/Admin_Api/settings_summary
| Parameter | Type | Position | Description |
|---|---|---|---|
| Authorization | string | Header | Admin JWT token |
{
"status": true,
"data": {
"summary": {
"site": {
"name": "My Store",
"time_zone": "UTC",
"session_timeout": "1800",
"hide_currency_from": "0",
"block_click_across_browser": "0",
"cookies_consent": "0",
"notify_email": "admin@example.com",
"telegram_enable": "0",
"favicon_url": "https://example.com/assets/images/site/favicon.ico"
},
"store": {
"status": "1",
"theme": "0",
"store_mode": "cart",
"affiliate_cookie": "30",
"registration_status": "1",
"registration_approval": "0",
"mail_verifiy": "0"
},
"modules": {
"market_tools": "1",
"referlevel": "1",
"membership": "0",
"award_level": "0",
"vendor_store": "1",
"vendor_deposit": "0",
"market_vendor_status": "1",
"saas_enable": "1"
},
"language": { "id": "1", "name": "English", "code": "en" }
},
"currency_symbol": "$",
"currency_code": "USD",
"enable_shorten_numbers": 0
}
}
Language object: id is the internal database primary key for the default language row (for integrations/debug only). End-user apps often show only name and, when present, code (included if your language table has a code column).
Read-only access to membership plans and purchase orders. Permission: reports.orders (same as web admin Membership Orders). Super admin (id 1) always has access.
Returns all membership plans in the database (no paging — the list is typically small). Sorted newest-first.
https://demo.affiliatepro.org/Admin_Api/membership_plans
| Parameter | Type | Position | Description |
|---|---|---|---|
| Authorization | string | Header | Admin JWT token |
{
"status": true,
"data": {
"plans": [
{
"id": 2,
"name": "Pro Monthly",
"price": "29.00",
"special_price": "19.00",
"bonus": "5.00",
"total_day": 30,
"billing_period": "monthly",
"billing_label": "Per Month",
"is_lifetime": 0,
"has_trial": 1,
"trial_days": 7,
"plan_level": 2,
"status": 1
}
],
"total": 1
}
}
| Field | Type | Description |
|---|---|---|
id | int | Plan ID |
name | string | Plan name |
price | string | Regular price |
special_price | string|null | Discounted price when set |
bonus | string | Wallet bonus on activation |
total_day | int | Plan duration in days (0 = lifetime) |
billing_period | string | Raw period key (e.g. monthly, yearly, lifetime_free, custom) |
billing_label | string | Human-readable period label |
is_lifetime | int | 1 when billing_period is lifetime_free |
has_trial | int | 1 when a trial period is configured |
trial_days | int | Number of free trial days |
plan_level | int|null | Award level number linked to this plan |
status | int | Plan status: 1 = active |
Paginated membership purchase history with user and plan info. Mirrors web admin → Membership → Orders.
https://demo.affiliatepro.org/Admin_Api/membership_orders
| Parameter | Type | Position | Description |
|---|---|---|---|
| Authorization | string | Header | Admin JWT token |
| start_from | int | Query | Offset (default 0) |
| limit | int | Query | Page size, max 100 (default 20) |
| search | string | Query | Search by user name / username |
| status | string | Query | all (default) or a numeric status_id: 0=pending, 1=active, 3=denied, 4=expired, 5=failed, 7=processed, 8=refunded |
| user_id | int | Query | Filter orders for a specific user |
{
"status": true,
"data": {
"orders": [
{
"id": 14,
"user_id": 3,
"user_name": "Jane Doe",
"user_username": "jane",
"plan_id": 2,
"plan_name": "Pro Monthly",
"plan_billing": "monthly",
"total": "19.00",
"bonus_commission": "5.00",
"status_id": 1,
"status_label": "active",
"is_active": 1,
"is_lifetime": 0,
"total_day": 30,
"payment_method": "stripe",
"started_at": "2026-03-01 10:00:00",
"expire_at": "2026-04-01 10:00:00",
"created_at": "2026-03-01 09:59:45"
}
],
"total": 1,
"has_more": false
}
}
Read-only access to the integration click log (integration_clicks_logs). Permission: reports.statistics (same as web admin Income Report). Super admin (id 1) always has access.
Paginated log of all affiliate link clicks / actions / views. Newest-first. Each row includes visitor device and geo info joined to the affiliate user.
https://demo.affiliatepro.org/Admin_Api/click_logs
| Parameter | Type | Position | Description |
|---|---|---|---|
| Authorization | string | Header | Admin JWT token |
| start_from | int | Query | Offset (default 0) |
| limit | int | Query | Page size, max 100 (default 20) |
| search | string | Query | Search by user name, username, IP, or country code |
| type | string | Query | all (default), click, action, view |
| user_id | int | Query | Filter logs for a specific affiliate |
{
"status": true,
"data": {
"logs": [
{
"id": 501,
"click_type": "click",
"ip": "203.0.113.42",
"country_code": "US",
"browser": "Chrome",
"is_mobile": 0,
"mobile_name": "",
"link": "https://example.com/product-page",
"page_open_time": "1.23",
"created_at": "2026-03-19 14:22:01",
"user_id": 5,
"user_name": "John Smith",
"user_username": "johnsmith"
}
],
"total": 2048,
"has_more": true
}
}
| Field | Type | Description |
|---|---|---|
id | int | Log entry ID |
click_type | string | click | action | view |
ip | string | Visitor IP address |
country_code | string | 2-letter ISO country (empty if not resolved) |
browser | string | Browser name |
is_mobile | int | 1 if visitor used a mobile device |
mobile_name | string | Mobile device name when is_mobile = 1 |
link | string | Destination URL of the click |
page_open_time | string | Time the page was open (seconds), if captured |
created_at | string | Timestamp of the click |
user_id | int | Affiliate user ID |
user_name | string | Affiliate full name |
user_username | string | Affiliate username |
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 | ||||