🔐 Authentication Quick Start
The API uses Laravel Sanctum with Bearer tokens. Send Authorization: Bearer <token> on protected endpoints. withCredentials is not required unless you use cookie-based auth.
1. Login
2. Use Token in Subsequent Requests
3. Logout
🌐 CORS & Headers
• Allowed origins are configured via
config/cors.php
• Send
Authorization: Bearer <token> on protected endpoints
•
withCredentials is only needed for cookie-based auth
• On
401, prompt login and refresh token
📡 API Endpoints
Below is a categorized overview of major endpoints. For complete details, request/response schemas, and interactive testing, use the Swagger UI.
Authentication
User authentication and session management
-
POST
/auth/login
Login and get access token -
GET
/auth/me
Get current authenticated user -
POST
/auth/logout
Logout and revoke token
Talents
TikTok talent management
-
GET
/talents
List all talents (paginated) -
POST
/talents
Create new talent -
GET
/talents/{id}
Get talent details -
PUT
/talents/{id}
Update talent -
DELETE
/talents/{id}
Delete talent
Groups
Talent group management
-
GET
/groups
List all groups -
POST
/groups
Create new group -
GET
/groups/{id}/members
List group members -
POST
/groups/{id}/members
Add member to group
Revenue
Diamond and affiliate revenue tracking
-
GET
/revenue/diamond
List diamond revenues -
POST
/revenue/diamond
Record diamond revenue -
GET
/revenue/affiliate
List affiliate revenues -
POST
/revenue/affiliate
Record affiliate revenue
Periods
Accounting period management
-
GET
/periods
List all periods -
POST
/periods
Create new period -
POST
/periods/{id}/lock
Lock period -
POST
/periods/{id}/unlock
Unlock period
Payouts
Talent payout generation and approval
-
GET
/payouts
List all payouts -
POST
/payouts/generate
Generate payout for period -
POST
/payouts/{id}/submit
Submit for approval -
POST
/payouts/{id}/approve
Approve payout
HR Management
Employee, department, attendance, and leave management
-
GET
/employees
List employees -
GET
/departments
List departments -
GET
/attendance
List attendance logs -
GET
/leave-requests
List leave requests -
GET
/contracts
List contracts
Finance & Accounting
General ledger, journal entries, and reconciliation
-
GET
/coa-accounts
List chart of accounts -
GET
/journal-entries
List journal entries -
POST
/journal-entries/{id}/post
Post to GL -
GET
/reconciliations
List reconciliations
Payroll
Employee and talent payroll processing
-
GET
/payroll-periods
List payroll periods -
GET
/employee-payroll
List employee payrolls -
GET
/talent-payroll
List talent payrolls -
POST
/employee-payroll/{id}/approve
Approve payroll
Bank & Cash
Bank account and cash management
-
GET
/bank-accounts
List bank accounts -
GET
/bank-transactions
List bank transactions -
GET
/cash-boxes
List cash boxes -
GET
/cash-transactions
List cash transactions
Fixed Assets
Asset tracking and depreciation
-
GET
/assets
List fixed assets -
GET
/asset-categories
List asset categories -
GET
/depreciation-runs
List depreciation runs -
POST
/depreciation-runs
Run depreciation
Content & Campaigns
Content calendar and campaign management
-
GET
/content-calendar
List content calendar -
GET
/content-items
List content items -
GET
/campaigns
List campaigns -
GET
/tasks
List tasks
Reports & Exports
Reporting and data export
-
GET
/reports/talent-revenue
Talent revenue report -
GET
/reports/payroll-summary
Payroll summary report -
POST
/exports
Request data export -
GET
/exports/{id}
Get export status
📝 Response Format
Success Response
Error Response
• Auth endpoints: 5 requests/minute
• All other endpoints: 60 requests/minute