10 endpoints in this category.
GET/get-upcomming-visits
Get Upcoming Visits
Get today's visits and upcoming scheduled visits.
Authentication:Required — Authorization: Bearer <token>
Query Parameters
| Name | Type | Required | Description |
|---|
per_page | integer | No | Results per page |
filter | string | No | Filter type |
filter_date | string | No | Filter by date (YYYY-MM-DD) |
Response Fields
| Name | Type | Required | Description |
|---|
today_visit | Visit[] | Yes | Today's visits |
upcomming_visit | Visit[] | Yes | Future scheduled visits |
Error Codes
| Status | Meaning |
|---|
401 | Unauthorized |
Code Examples
curl -X GET 'https://visitnote-api-production.up.railway.app/api/therapist/v1/get-upcomming-visits' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN'
GET/get-visit-history
Get Visit History
Get past visits with optional filtering by note status.
Authentication:Required — Authorization: Bearer <token>
Query Parameters
| Name | Type | Required | Description |
|---|
per_page | integer | No | Results per page |
record_type | string | No | 'all' or 'with_notes' |
Response Fields
| Name | Type | Required | Description |
|---|
data | Visit[] | Yes | Array of past visits |
Error Codes
| Status | Meaning |
|---|
401 | Unauthorized |
Code Examples
curl -X GET 'https://visitnote-api-production.up.railway.app/api/therapist/v1/get-visit-history' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN'
GET/visit-details/:scheduleUuid
Get Visit Details
Get full details for a specific visit including SOAP notes if completed.
Authentication:Required — Authorization: Bearer <token>
Path Parameters
| Name | Type | Required | Description |
|---|
scheduleUuid | string | Yes | Visit schedule UUID |
Response Fields
| Name | Type | Required | Description |
|---|
data | Visit | Yes | Complete visit object with notes |
Error Codes
| Status | Meaning |
|---|
404 | Visit not found |
Code Examples
curl -X GET 'https://visitnote-api-production.up.railway.app/api/therapist/v1/visit-details/:scheduleUuid' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN'
POST/schedule-visit-request-save
Schedule Visit
Create a new visit request / schedule a visit.
Authentication:Required — Authorization: Bearer <token>
Request Body
| Name | Type | Required | Description |
|---|
patient_uuid | string | No | Patient UUID (if existing patient) |
visit_date | string | Yes | Date (YYYY-MM-DD) |
start_time | string | Yes | Start time (HH:MM) |
notes | string | No | Visit notes |
address | string | No | Visit address |
Response Fields
| Name | Type | Required | Description |
|---|
uuid | string | Yes | Created visit UUID |
Error Codes
| Status | Meaning |
|---|
422 | Missing required fields or invalid date/time |
Code Examples
curl -X POST 'https://visitnote-api-production.up.railway.app/api/therapist/v1/schedule-visit-request-save' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"patient_uuid": "your_patient_uuid",
"visit_date": "your_visit_date",
"start_time": "your_start_time",
"notes": "your_notes",
"address": "your_address"
}'
POST/visit-audio-upload
Upload Visit Audio
Upload an audio recording for a visit. Uses multipart form data.
Authentication:Required — Authorization: Bearer <token>
Use multipart/form-data content type. Max file size: 50MB.
Request Body
| Name | Type | Required | Description |
|---|
audio | File | Yes | Audio file (m4a, wav, mp3) |
schedule_uuid | string | Yes | Visit schedule UUID |
Response Fields
| Name | Type | Required | Description |
|---|
url | string | Yes | S3 URL of uploaded audio |
Error Codes
| Status | Meaning |
|---|
413 | File too large |
422 | Invalid file type |
Code Examples
curl -X POST 'https://visitnote-api-production.up.railway.app/api/therapist/v1/visit-audio-upload' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: multipart/form-data' \
-F 'audio=@/path/to/file' \
-F 'schedule_uuid=value'
POST/visit-timer-events
Sync Timer Events
Upload visit timer events with GPS coordinates for visit tracking.
Authentication:Required — Authorization: Bearer <token>
Timer event types: start_travel, arrive, start_documentation, complete. Each event includes GPS coordinates and accuracy in meters.
Request Body
| Name | Type | Required | Description |
|---|
schedule_uuid | string | Yes | Visit schedule UUID |
events | TimerEvent[] | Yes | Array of timer events |
Error Codes
| Status | Meaning |
|---|
422 | Invalid event data |
Code Examples
curl -X POST 'https://visitnote-api-production.up.railway.app/api/therapist/v1/visit-timer-events' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"schedule_uuid": "your_schedule_uuid",
"events": "[{\"event_type\": \"start_travel\", \"event_time\": \"2026-03-01T08:30:00Z\", \"latitude\": 29.7604, \"longitude\": -95.3698, \"accuracy\": 10.5}]"
}'
POST/patient-referral-end-visit-note
Submit SOAP Note
Submit a completed SOAP note for a visit. Includes subjective, objective, assessment, plan, vitals, and signature.
Authentication:Required — Authorization: Bearer <token>
Request Body
| Name | Type | Required | Description |
|---|
schedule_uuid | string | Yes | Visit schedule UUID |
subjective | string | Yes | Subjective section |
objective | string | Yes | Objective section |
assessment | string | Yes | Assessment section |
plan | string | Yes | Plan section |
vital_signs | object | No | Vital signs data |
signature | string | No | Base64-encoded signature image |
Error Codes
| Status | Meaning |
|---|
404 | Visit not found |
422 | Missing required SOAP sections |
Code Examples
curl -X POST 'https://visitnote-api-production.up.railway.app/api/therapist/v1/patient-referral-end-visit-note' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"schedule_uuid": "your_schedule_uuid",
"subjective": "your_subjective",
"objective": "your_objective",
"assessment": "your_assessment",
"plan": "your_plan",
"vital_signs": "your_vital_signs",
"signature": "your_signature"
}'
POST/register-fcm-token
Register FCM Token
Register a Firebase Cloud Messaging token for push notifications.
Authentication:Required — Authorization: Bearer <token>
Request Body
| Name | Type | Required | Description |
|---|
fcm_token | string | Yes | Firebase FCM device token |
Error Codes
| Status | Meaning |
|---|
422 | Invalid token |
Code Examples
curl -X POST 'https://visitnote-api-production.up.railway.app/api/therapist/v1/register-fcm-token' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"fcm_token": "your_fcm_token"
}'
POST/scheduling/optimize
Optimize Day Route
Compute the visit order that minimizes drive time for a given day, using traffic-aware routing. Returns a suggested order with realistic suggested times (visit durations + buffers + drive legs), total drive time and miles, and the estimated savings versus the current order. Suggest-only — nothing is rescheduled until the client applies changes via the reschedule endpoint.
Authentication:Required — Authorization: Bearer <token>
Uses the clinician's home base as the route start/end when one is set in the scheduling policy. Falls back to open routing data when live traffic is unavailable.
Request Body
| Name | Type | Required | Description |
|---|
date | string | Yes | Day to optimize (YYYY-MM-DD) |
lock_first | boolean | No | Keep the first visit fixed and optimize the rest |
Error Codes
| Status | Meaning |
|---|
422 | Fewer than 3 geocodable visits on that day, or more than 12 visits (routing API limit) |
Code Examples
curl -X POST 'https://visitnote-api-production.up.railway.app/api/therapist/v1/scheduling/optimize' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"date": "2026-08-14",
"lock_first": "your_lock_first"
}'
PUT/visit/:uuid/mileage
Update Visit Mileage
Write mileage for a visit — the total, optionally split into travel vs. on-site miles. Used for reimbursement and year-end tax reporting.
Authentication:Required — Authorization: Bearer <token>
Path Parameters
| Name | Type | Required | Description |
|---|
uuid | string | Yes | Visit UUID |
Request Body
| Name | Type | Required | Description |
|---|
total_miles | number | Yes | Total miles for the visit |
travel_miles | number | No | Miles driven between visits (business miles) |
onsite_miles | number | No | Miles driven on-site |
Error Codes
| Status | Meaning |
|---|
404 | Visit not found (including cross-tenant access attempts) |
422 | Invalid mileage values |
Code Examples
curl -X PUT 'https://visitnote-api-production.up.railway.app/api/therapist/v1/visit/:uuid/mileage' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"total_miles": "12.4",
"travel_miles": "your_travel_miles",
"onsite_miles": "your_onsite_miles"
}'