Add Single Salary Advance Employee/Staff API
Onboard New Staff - POST REQUEST
Test API Endpoint
POST http://apitest.fedacash./salaryadvance/v1/test/onboard-new-staff
Live API Endpoint
POST http://api.fedacash./salaryadvance/v1/test/onboard-new-staff
Request Headers
Authorization: Bearer your_secret_keyContent-Type: application/json
Sample Curl Request Body
curl -X POST "http://apitest.fedacash./salaryadvance/v1/test/onboard-new-staff" \-H "Content-Type: application/json" \-H "Authorization: Bearer your_secret_key" \-d '{ "email": "newuser@example.com", "onboard_url": "http://example.com/onboard", "role_token": "role-token-123", "job_title": "Software Engineer", "department": "Engineering", "hire_date": "2024-06-15", "current_salary": 60000}'Success Response
{ "success": true, "data": { "id": 1, "email": "john.doe@example.com", "profile_id": "profile-id-123", "organization_token": "org-token-123", "role": "salary advance staff", "salary_advance_company": "Example Company", "company_name": "Example Company", "created_at": "2024-06-19T12:00:00.000000Z", "updated_at": "2024-06-19T12:00:00.000000Z" }, "message": "User Onboarded Successfully"}Error Response
{ "success": false, "message": "An error occurred!", "error": "Invalid data supplied!"}Complete Onboarding Staff - POST REQUEST
Test API Endpoint
POST http://apitest.fedacash./salaryadvance/v1/test/complete-staff-onboarding
Live API Endpoint
POST http://api.fedacash./salaryadvance/v1/test/complete-staff-onboarding
Sample Curl
curl -X POST "http://apitest.fedacash./salaryadvance/v1/test/complete-staff-onboarding" \-H "Content-Type: application/json" \-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \-d '{ "first_name": "John", "last_name": "Doe", "phone_number": "1234567890", "password": "Password123!", "job_title": "Software Engineer", "department": "Engineering", "hire_date": "2024-06-15", "current_salary": 60000, "profile_id": "profile-id-123"}'Success Response
{ "success": true, "data": { "first_name": "John", "last_name": "Doe", "phone_number": "1234567890", "password": "$2y$10$...", "job_title": "Software Engineer", "department": "Engineering", "hire_date": "2024-06-15", "current_salary": 60000, "profile_id": "profile-id-123", "active_status": 1, "verification_status": 1, "on_wait_list": 1, "status": 1, "company_name": "John Doe", "role": "Salary Advance HR Manager" }, "message": "Onboarding Completed Successfully"}Error Response
{ "success": false, "message": "An error occurred!", "error": "Invalid data supplied!"}