Logo API Documentation

AffiliatePro API

Build powerful integrations with our REST API. Manage users, track campaigns, process withdrawals, and access analytics — all programmatically.

// Quick start
POST /User/login
→ { token: "eyJ..." }
GET /Admin_Api/dashboard
→ { total_users: 142, ... }
GET /User/profile
→ { firstname: "John", ... }

Getting Started

1
Authenticate

Call POST /User/login with your credentials to obtain a JWT token. This same endpoint works for both regular users and admin accounts.

POST https://demo.affiliatepro.org/User/login
Body: username, password,
       device_type, device_token
Returns: { token, role, ... }
2
Send Requests

Include the JWT token in the Authorization header of every API request. Send the raw token directly — no "Bearer" prefix needed.

GET https://demo.affiliatepro.org/Admin_Api/dashboard
Header:
 Authorization: <jwt-token>
3
Handle Responses

All endpoints return JSON. A successful response has "status": true with data. Errors return status codes (401, 403, 422) with a message.

// Success
{ "status": true, "data": { ... } }

// Error
{ "status": false, "message": "..." }

Key Information

Base URL
https://demo.affiliatepro.org/
Response Format
JSON (application/json)
Authentication
JWT Token in header
Admin Access
Requires role = "admin"

Error Codes

CodeStatusDescription
200OKRequest successful
401UnauthorizedMissing or invalid JWT token
403ForbiddenValid token but insufficient permissions (e.g. user trying admin endpoint)
422Validation ErrorMissing or invalid request parameters
500Server ErrorInternal server error