Session Management

Manage consultation sessions, track lifecycle, and handle session operations

GET
/consultations/sessions
List Sessions
Get all sessions with filtering and pagination

Query Parameters

Query Parameters
page=1&limit=20&status=Scheduled

Response

Response (200 OK)
{
  "data": {
    "sessions": [
      {
        "id": "ses_123456",
        "referenceId": "SES_123456",
        "consultationTitle": "Fitness Consultation",
        "status": "Scheduled",
        "startTime": "2024-01-15T10:00:00Z",
        "endTime": "2024-01-15T11:00:00Z",
        "participantCount": 1
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 1
    }
  },
  "message": "Sessions retrieved successfully",
  "success": true
}
POST
/consultations/sessions/{id}/start
Start Session
Start a scheduled session

Request Body

Request
{
  "actualStartTime": "2024-01-15T10:05:00Z",
  "notes": "Session started 5 minutes late"
}

Response

Response (200 OK)
{
  "data": {
    "sessionId": "ses_123456",
    "status": "In Progress",
    "startedAt": "2024-01-15T10:05:00Z"
  },
  "message": "Session started successfully",
  "success": true
}
POST
/consultations/sessions/{id}/end
End Session
End an active session with summary

Request Body

Request
{
  "actualEndTime": "2024-01-15T11:00:00Z",
  "notes": "Session completed successfully",
  "sessionSummary": "Discussed fitness goals",
  "nextSteps": "Follow up in 2 weeks"
}

Response

Response (200 OK)
{
  "data": {
    "sessionId": "ses_123456",
    "status": "Completed",
    "endedAt": "2024-01-15T11:00:00Z",
    "duration": 55
  },
  "message": "Session ended successfully",
  "success": true
}
POST
/consultations/sessions/{id}/no-show
Mark as No-Show
Mark a session as no-show when client doesn't attend

Request Body

Request
{
  "notes": "Client did not show up",
  "attemptedContact": true,
  "contactMethod": "email"
}

Response

Response (200 OK)
{
  "data": {
    "sessionId": "ses_123456",
    "status": "No Show",
    "markedAt": "2024-01-15T10:30:00Z"
  },
  "message": "Session marked as no-show",
  "success": true
}