API Documentation
Complete REST API reference for the ShiftPro healthcare workforce management platform.
đ Postman Collection
Test all 80+ endpoints instantly. Includes Auth, Admin, Hospital & Professional APIs.
https://shiftnew.jain.software/shift-api/public/api/v1
đ Authentication
All protected endpoints require a Bearer token. Include it in the header:
Authorization: Bearer YOUR_TOKEN
Request Body
Request Body
Response
Authenticate using phone number and either a Passcode (MPIN) or Firebase ID Token (for first-time/OTP login).
Request Body
Response
đ Dashboard
Response
đĨ Hospitals
Query Parameters
| Parameter | Description |
|---|---|
| page integer |
Page number for pagination. Default: 1
|
| per_page integer |
Records per page. Default: 15
|
| search string |
Search by name, email, or phone
|
| status string |
Filter by status:
active,
inactive, pending
|
| kyc_status string |
Filter by KYC status:
verified,
pending, rejected
|
| city string |
Filter by city name
|
Response
Request Body
Request Body
đ¨ââī¸ Professionals
Query Parameters
| Parameter | Description |
|---|---|
| page integer |
Page number (Default: 1)
|
| search string |
Search by name, email, phone
|
| status string |
active, inactive,
pending
|
| profession_type string |
e.g.
nurse, doctor |
Response
đ Shifts
Query Parameters
| Parameter | Description |
|---|---|
| page integer |
Page number (Default: 1)
|
| hospital_id integer |
Filter by Hospital ID
|
| status string |
draft, published,
completed, cancelled
|
| date_from date |
YYYY-MM-DD start range
|
Response
đ° Finance
Query Parameters
| Parameter | Description |
|---|---|
| page integer |
Page number
|
| type string |
credit, debit,
refund
|
| status string |
completed, pending,
failed
|
Request Body
âī¸ Settings
đ Roster Management (Admin)
Query Parameters
| Parameter | Description |
|---|---|
| hospital_id integer |
Filter by Hospital ID
|
| start_date date |
Filter by start date
|
Request Body
Request Body
file (CSV/Excel)đĨ Hospital Portal - Profile & KYC
Response
Request Body (form-data)
| Field | Type | Description |
|---|---|---|
| name | string | Hospital name |
| hospital_type | string | government|private|multi_specialty|clinic |
| facilities | JSON array | ["ICU", "OT", "Emergency"] |
| logo | file | Image: jpeg,png,jpg max 2MB |
| latitude | decimal | -90 to 90 |
| longitude | decimal | -180 to 180 |
Request Body (form-data)
| Field | Type | Description |
|---|---|---|
| registration_document | file | PDF/Image max 5MB |
| license_document | file | Hospital License |
| gst_number | file | GST Certificate |
| pan_number | file | PAN Card |
Response
đ Hospital Portal - Dashboard
Response
Response
đ Hospital Portal - Shifts
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | No | Page number (default: 1) |
| per_page | integer | No | Items per page (default: 15) |
| limit | integer | No | Alias for per_page |
| status | string | No | draft|published|in_progress|completed|cancelled |
| filter_status | string | No | today_shift|upcoming |
| shift_date | date | No | Filter by date (YYYY-MM-DD) |
| profession_type | string | No | Filter by profession type |
| search | string | No | Search title, description, shift_code |
| sort_by | string | No | Sort field (default: shift_date) |
| sort_order | string | No | asc|desc (default: asc) |
Response
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | Yes | Shift title, max 255 |
| shift_date | date | Yes | YYYY-MM-DD, today or future |
| start_time | string | Yes | HH:mm (24hr format) |
| end_time | string | Yes | HH:mm (after start_time) |
| profession_type | string | Yes | doctor|nurse|technician|staff|paramedic |
| department_id | integer | No | Department ID |
| positions_required | integer | Yes | Min: 1 |
| pay_type | string | Yes | hourly|fixed |
| pay_rate | decimal | Yes | Amount per hour/shift |
| priority | string | No | normal|urgent|critical |
| is_night_shift | boolean | No | Default: false |
| is_emergency | boolean | No | Default: false |
| subscription_id | integer | No | Active Sub ID (Auto-detected if omitted) |
Response
Update shift details. Handles wallet transactions when facility pay changes:
âĸ If extra_amount_to_pay > 0: Deducts immediately from wallet
âĸ If amount_to_refund > 0: Creates pending refund (credited after 7 days)
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | No | Shift title, max 255 |
| facility_pay | decimal | No | New facility payment amount |
| service_charge_amount | decimal | No | Service charge amount |
| extra_amount_to_pay | decimal | No | Extra amount to deduct from wallet (when new > old facility_pay) |
| amount_to_refund | decimal | No | Amount to refund (when old > new facility_pay). Refund credited after 7 days. |
Response (with Deduction)
Response (with Pending Refund)
Error Response (Insufficient Balance)
Response
Response
đĸ Hospital Portal - Departments
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | e.g., "Cardiology" |
| description | string | No | Dept description |
Response
đĨ Hospital Portal - Vacancies
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| per_page | integer | No | Items per page (default: 10) |
| page | integer | No | Page number |
Response
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| role | string | Yes | Job role (e.g. nurse, doctor, technician) |
| employment_type | string | Yes | Full-time, Part-time, Contract, etc. |
| job_title | string | Yes | Title of the job |
| job_description | string | Yes | Detailed description |
| state | string | Yes | State |
| city | string | Yes | City |
| minimum_salary | double | Yes | Min salary |
| maximum_salary | double | Yes | Max salary |
| experience | integer | Yes | Years of experience required |
| requirements | string | Yes | Job requirements |
| benefits | string | Yes | Job benefits |
| subscription_id | integer | No | Active Sub ID (Auto-detected if omitted) |
Response
Response
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| role | string | No | Job role |
| employment_type | string | No | Full-time, Part-time, etc. |
| job_title | string | No | Title of the job |
| job_description | string | No | Detailed description |
| state | string | No | State |
| city | string | No | City |
| minimum_salary | double | No | Min salary |
| maximum_salary | double | No | Max salary |
| experience | integer | No | Years of experience required |
| requirements | string | No | Job requirements |
| benefits | string | No | Job benefits |
| status | string | No | active | closed |
Response
Response
Response
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| status | string | Yes | shortlisted | accepted | rejected |
hired
|
Response
Uses authenticated hospital's ID to fetch applications across ALL vacancies. Each application includes full vacancy and professional details.
Request Body (all optional filters)
| Field | Type | Required | Description |
|---|---|---|---|
| status | string|array | No | Filter: applied, shortlisted, accepted,
rejected, hired
|
| vacancy_id | integer | No | Optionally filter to a specific vacancy |
| search | string | No | Search by professional name, email, or vacancy title/role |
| from_date | date | No | Applied from (YYYY-MM-DD) |
| to_date | date | No | Applied to (YYYY-MM-DD) |
| per_page | integer | No | Items per page (default: 10) |
| page | integer | No | Page number |
Response
đŗ Hospital Portal - Subscription
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| plan_id | integer | Yes | ID of the plan |
| duration_months | integer | Yes | 1, 6, or 12 |
Response
â Hospital Portal - Attendance
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | No | Page number (default: 1) |
| per_page | integer | No | Items per page (default: 15) |
| limit | integer | No | Alias for per_page |
| date | date | No | Filter by specific date (YYYY-MM-DD) |
| date_from | date | No | Filter from date |
| date_to | date | No | Filter to date |
| status | string | No | pending|checked_in|completed|no_show |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| shift_id | integer | Yes | Shift ID |
| professional_id | integer | Yes | Professional ID |
| status | string | Yes | checked_in|completed|no_show |
| remarks | string | No | Attendance notes |
Response
đ Shift Extensions
Request Body
Request Body
đ° Hospital Portal - Wallet
Response
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| type | string | No | credit | debit |
| category | string | No | shift_payment, wallet_topup, refund, etc.
|
| date_from | date | No | YYYY-MM-DD |
| date_to | date | No | YYYY-MM-DD |
| per_page | integer | No | Default 20 |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| amount | decimal | Yes | Amount to add (Min 100) |
Response
Step 1 (Pending): Send only razorpay_order_id +
amount â creates pending transaction.
Step 2 (Complete): Send all 4 params â finds existing pending
record and completes it, or creates a new completed record.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| razorpay_order_id | string | Yes | From create-topup-order |
| razorpay_payment_id | string | No | From Razorpay SDK (omit for pending flow) |
| razorpay_signature | string | No | From Razorpay SDK (omit for pending flow) |
| amount | decimal | Yes | Amount paid |
Response (Pending)
Response (Completed)
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| amount | decimal | Yes | Min 100 |
| payment_method | string | Yes | bank_transfer | upi |
| bank_name | string | No* | Bank name (* required for bank_transfer) |
| account_number | string | No* | Account number (* required for bank_transfer) |
| ifsc_code | string | No* | IFSC code (* required for bank_transfer) |
| account_holder_name | string | No | Account holder name |
| upi_id | string | No* | UPI ID (* required for upi) |
Response
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| per_page | integer | No | Items per page (default: 15) |
Response
đ° Wallet Refunds
Track pending and completed refunds from shift edits. Refunds are credited to wallet after a 7-day waiting period.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | No | pending|processing|completed|cancelled|failed |
| per_page | integer | No | Items per page (default: 15) |
Response
Refund Status Lifecycle
| Status | Description |
|---|---|
pending |
Refund created, waiting for 7-day period |
processing |
Refund is being processed |
completed |
Refund credited to wallet |
cancelled |
Refund was cancelled |
failed |
Refund processing failed |
đ Hospital Portal - Roster Management
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| roster_name | string | Yes | Name of roster |
| start_date | date | Yes | YYYY-MM-DD |
| end_date | date | Yes | YYYY-MM-DD |
| roster_type | string | Yes | daily|weekly|monthly|custom |
| department_id | integer | No | Department ID |
| subscription_id | integer | No | Active Sub ID (Auto-detected if omitted) |
| created_roster | array | No | Array of roster entries |
đ¨ Hospital Portal - Emergency SOS
Hospitals can create urgent shift requests with extra pay incentives. Professionals who respond within the urgency deadline receive bonus pay on shift completion. The extra amount is deducted from the hospital wallet upfront.
Returns the admin-configured urgency tiers with their extra pay percentages. Use this to populate the tier selection dropdown when creating an Emergency SOS.
Response
Creates an emergency SOS tied to a specific shift. The system calculates extra pay based on the selected urgency tier percentage à professional_receive à remaining positions, then deducts the total from the hospital wallet. Professionals within range are notified.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| shift_id | integer | Yes | The shift that needs urgent staffing |
| urgency_tier | string | Yes | under_2_hours | under_1_hour |
under_30_mins (from tiers endpoint) |
| radius_km | integer | Yes | KM range for professional notifications (1-500) |
| additional_message | string | No | Optional message to professionals (max 1000 chars) |
| subscription_id | integer | No | Active Sub ID (auto-detected if omitted) |
Response (201)
Error Responses
| Code | Description |
|---|---|
400 |
Shift already has active SOS / All positions filled |
402 |
Insufficient wallet balance (returns required vs available) |
403 |
Free SOS limit exhausted, subscription required |
422 |
Invalid urgency tier |
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| per_page | integer | No | Default: 10 |
Response
Returns the SOS details along with all applications linked to this SOS, showing which professionals are eligible for extra pay.
Response
Hospital can request a refund for the extra amount paid for an Emergency SOS when no professional has applied. The request will be reviewed by admin.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| transaction_id | string | Yes | The wallet transaction_id from SOS creation (e.g. TXN-ABCDEF123456)
|
| shift_id | integer | Yes | Shift ID linked to the SOS |
| refund_amount | decimal | Yes | Amount to refund (cannot exceed original transaction) |
| description | string | Yes | Reason for refund request (max 1000 chars) |
Response (201)
When professional applies: If the shift has an active Emergency SOS, the
system checks if the application is within the urgency deadline. The
eligible_for_extra_pay and extra_pay_amount (per day) fields are
set on the application automatically.
On shift completion: After all attendance days
are completed, the professional receives their regular shift payment plus the
emergency extra pay (if eligible) as a separate emergency_sos_extra_pay wallet
transaction.
Application response includes:
đ¤ Professional Portal - Profile & KYC
Key Fields (form-data)
| Field | Type | Description |
|---|---|---|
| qualifications | JSON array | ["MBBS", "MD"] |
| certifications | JSON array | ["ACLS", "BLS"] |
| skills | JSON array | ["IV Therapy"] |
| available_days | JSON array | ["monday","friday"] |
| profile_photo | file | Image max 2MB |
| face_id_photo | file | Face verification photo |
đ Professional Portal - Dashboard
Response
đ Professional Portal - Find Shifts
Response
đ Professional Portal - Applications
đ¨ââī¸ Professional Portal - Vacancies
Request Body (all optional filters)
| Field | Type | Required | Description |
|---|---|---|---|
| search | string | No | Search in job_title, role, or hospital name |
| role | string|array | No | Filter by role |
| employment_type | string|array | No | Filter by employment type |
| state | string|array | No | Filter by state |
| city | string|array | No | Filter by city |
| min_salary | decimal | No | Minimum salary filter |
| max_salary | decimal | No | Maximum salary filter |
| from_date | date | No | Created from (YYYY-MM-DD) |
| to_date | date | No | Created to (YYYY-MM-DD) |
| per_page | integer | No | Items per page (default: 10) |
Response
Response
Response
Request Body (optional filters)
| Field | Type | Required | Description |
|---|---|---|---|
| status | string|array | No | Filter: applied, shortlisted, accepted,
rejected, hired
|
| per_page | integer | No | Items per page (default: 10) |
| page | integer | No | Page number |
Response
â Professional Portal - Check-in/out
Request Body
đ° Professional Portal - Earnings
Response
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| amount | decimal | Yes | Amount to withdraw |
| payment_method | string | Yes | bank_transfer|upi |
Response
đ Shift Extensions
Request Body
Request Body
âšī¸ Content & Support
đ Notifications
The system sends push notifications via Firebase Cloud Messaging (FCM). Ensure
fcm_token is updated for the user.
Notification Categories & Logic
| Type (Key) | Trigger | Recipient |
|---|---|---|
new_shift |
Hospital publishes a shift | Professionals (Verified, Role, City, Rated) |
new_vacancy |
Hospital creates a vacancy | Professionals (Verified, Role) |
roster |
Roster created/published | Assigned Staff |
attendance |
Check-in/out & Reminders | Hospital & Professional |
sos |
Emergency SOS | Professionals (City/Location) |
extension |
Shift Extension | Hospital & Professional |
admin_action |
Verification / Status | User |
support_ticket |
Ticket updates | Creator |
application_message |
Chat / Staff Request | Recipient |
shift_application |
App Accept/Reject | Applicant / Hospital |
vacancy_application |
App Updates | Applicant / Hospital |
â ī¸ Error Handling
All error responses follow this format:
| Status Code | Description |
|---|---|
200 |
Success |
201 |
Created |
400 |
Bad Request - Invalid parameters |
401 |
Unauthorized - Invalid or missing token |
403 |
Forbidden - Insufficient permissions |
404 |
Not Found - Resource doesn't exist |
422 |
Validation Error |
500 |
Server Error |
đ Face ID Management
Store and manage face IDs (embeddings) for biometric verification during check-in/check-out.
User Self-Management
Response
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| face_data | array|object | Yes | Face embeddings - single object or array of objects |
| primary_face_image | file | No | Primary face photo (max 5MB) |
Example Request
Admin Management
| Field | Type | Required | Description |
|---|---|---|---|
| face_data | array|object | Yes | Face embeddings |
| primary_face_image | file | No | Primary face photo (max 5MB) |
| notes | string | No | Admin notes (max 500 chars) |
Simplified Face ID API (Google ML)
For Google ML face recognition. Stores face_id as JSON array in longtext column.
Response
| Field | Type | Required | Description |
|---|---|---|---|
| face_id | array|string | Yes | Face ID(s) to store (JSON encoded) |
| append | boolean | No | If true, append to existing. Default: replace all |
| Query Param | Type | Required | Description |
|---|---|---|---|
| index | integer | No | Delete specific index only. Otherwise deletes all. |
Admin Endpoints
đŦ Messaging
Response
Request Body
Response
Response
Request Body
đ Common - Vacancies (By Hospital ID)
These endpoints allow any authenticated user to fetch vacancy data for a specific hospital. Useful for viewing a hospital's open vacancies.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| hospital_id | integer | Yes | Hospital User ID |
| status | string|array | No | Filter: active, closed |
| search | string | No | Search in job_title and role |
| role | string|array | No | Filter by role (e.g. nurse, doctor) |
| employment_type | string|array | No | Filter by employment type |
| state | string|array | No | Filter by state |
| city | string|array | No | Filter by city |
| min_salary | decimal | No | Minimum salary filter |
| max_salary | decimal | No | Maximum salary filter |
| from_date | date | No | Created from (YYYY-MM-DD) |
| to_date | date | No | Created to (YYYY-MM-DD) |
| per_page | integer | No | Items per page (default: 10) |
| page | integer | No | Page number |
Response
Response
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| hospital_id | integer | Yes | Hospital User ID |
| status | string|array | No | Filter: applied, shortlisted, accepted,
rejected, hired
|
| vacancy_id | integer | No | Filter by specific vacancy ID |
| search | string | No | Search by professional name or vacancy title/role |
| from_date | date | No | Applied from (YYYY-MM-DD) |
| to_date | date | No | Applied to (YYYY-MM-DD) |
| per_page | integer | No | Items per page (default: 10) |
| page | integer | No | Page number |
Response
đ Webhooks
Public webhook endpoints for third-party payment callbacks. These routes do not require authentication â signature verification is handled internally.
Webhook signature is verified using X-Razorpay-Signature header and the
RAZORPAY_WEBHOOK_SECRET env variable configured in Razorpay Dashboard.
Webhook URL for Razorpay Dashboard
Supported Events
| Event | Description |
|---|---|
payment.captured |
Processes confirmed payment â finds or creates transaction, credits wallet |
Flow
| Step | Action |
|---|---|
| 1 | Verifies webhook signature from X-Razorpay-Signature header |
| 2 | Extracts order_id, payment_id, amount
from payload |
| 3 | Finds existing transaction by order_id:âĸ Pending â updates to completed, credits wallet âĸ Already completed â returns success (idempotent) âĸ Not found â creates new completed transaction using hospital_id
from notes |
| 4 | Sends wallet recharge notification to user |
Response
đĻ Data Models & Field Types
The following fields are JSON arrays and should be sent/received as arrays:
Hospital Model - Array Fields
| Field | Type | Example |
|---|---|---|
| facilities | string[] | ["ICU", "OT", "Emergency", "Pharmacy"] |
| departments | string[] | ["Cardiology", "Neurology"] (legacy) |
| images | string[] | ["path/to/img1.jpg", "path/to/img2.jpg"] |
Professional Model - Array Fields
| Field | Type | Example |
|---|---|---|
| qualifications | string[] | ["MBBS", "MD - Cardiology"] |
| certifications | string[] | ["ACLS", "BLS", "PALS"] |
| skills | string[] | ["IV Therapy", "Ventilator", "ECG"] |
| available_days | string[] | ["monday", "tuesday", "friday"] |
| additional_documents | string[] | ["path/cert1.pdf", "path/cert2.pdf"] |
Enum Field Values
| Field | Model | Valid Values |
|---|---|---|
| hospital_type | Hospital | government | private | multi_specialty | clinic |
| kyc_status | Both | pending | verified | rejected |
| status | Both | pending | active | suspended |
| profession_type | Professional | doctor | nurse | technician | staff | paramedic |
| experience_level | Professional | junior | mid | senior | expert |
| availability_status | Professional | available | busy | unavailable |
| gender | Professional | male | female | other |
| id_proof_type | Professional | aadhaar | pan | passport | driving_license | voter_id |
| shift.status | Shift | draft | published | in_progress | completed | cancelled |
| shift.pay_type | Shift | hourly | fixed |
| shift.priority | Shift | normal | urgent | critical |
| attendance.status | Attendance | pending | checked_in | completed | no_show |
đ¤ Referrals (Admin)
Response
Request Body
đĻ Virtual Accounts (Admin)
Request Body
â ī¸ Low Amount Alerts (Admin)
Request Body
ShiftPro API v1.0 âĸ Last updated: December 2025