TPM Workforce API
All endpoints + webhooks (basic but complete).
Authentication
X-Signature: <signature> origin: <domain_url>
Response Codes
200 → Success 401 → Unauthorized 404 → Not Found 422 → Validation Error 500 → Server Error
API Endpoints
POST /api/workforce/job-applicant-hired
Mark applicant as hired
{
"job_application_id": "123",
"time_stamp": "2025-09-18T12:34:56+05:30"
}
{
"status": "received"
}
GET /api/workforce/getAllApplicants
Get all applicants (non-freelance)
GET ?company_id=1
{
"success": true,
"data": [
{
"application_id": 1,
"application_status": "pending",
"user_id": 10,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"job_title": "Backend Dev"
}
]
}
GET /api/workforce/getApplicationDetails
Detailed applicant info
Headers: application_id: 1 company_id: 1
{
"success": true,
"data": {
"applicant_id": 10,
"first_name": "John",
"email": "john@example.com",
"job_title": "Backend Dev"
}
}
GET /api/workforce/live-status
{
"success": true,
"status": "live"
}
GET /api/workforce/{ticket_id}/is-freelancer-engaged
GET /api/workforce/123/is-freelancer-engaged?company_id=1
{
"success": true,
"engaged": true
}
GET /api/invoices/{assignmentId}/link
Returns invoice PDF
Content-Type: application/pdf
GET /api/workforce/freelance/job-post
Get metadata for job creation
{
"form": {...},
"options": {...},
"defaults": {...}
}
POST /api/workforce/freelance/job-post
{
"company_id": 1,
"job_title": "Fix API Bug",
"skills": ["Laravel"],
"payment_amount": 5000,
"currency": "INR",
"pay_rate_type": "lumpsum"
}
{
"success": true,
"message": "Payload received successfully"
}
POST /api/workforce/freelance/job-post-payment-status
{
"company_id": 1,
"assignment_id": 10,
"payment_status": "approved"
}
{
"message": "Payment status updated successfully"
}
ITSM Ticket Fetch (Workforce → Client)
GET /api/webhook/get-active-tickets
Headers: X-Webhook-Signature: <signature>
{
"data": [
{
"ticket_id": "TCK-123",
"created_at": "1970-01-01 00:00:01"
}
]
}
Webhooks (Workforce → Client)
assignment_created assignment_in_progress assignment_completed payment_requested payment_pending payment_approved payment_declined payment_paid
{
"event": "assignment_created",
"data": {
"assignment_id": 10,
"assignment_status": "in_progress"
...
}
...
}