Skip to main content

Get Session (v1)

Method + Path

GET /v1/workspace/:workspaceId/sessions/:sessionId

Actual backend path: /v1/workspace/:workspaceId/sessions/:sessionId

Description

Get a single session by ID.

Authentication

Required - JWT token in Authorization header

Required Permissions:

  • sessions.view

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token: Bearer <token>

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier
sessionIdstringYesSession identifier

Response (200)

{
"session": {
"id": "507f1f77bcf86cd799439011",
"workspaceId": "507f191e810c19729de860ea",
"clientId": "507f1f77bcf86cd799439012",
"clientName": "John Doe",
"serviceIds": ["507f1f77bcf86cd799439013", "507f1f77bcf86cd799439014"],
"serviceNames": ["استشارة طبية", "فحص عام"],
"staffId": "507f1f77bcf86cd799439015",
"staffName": "Dr. Smith",
"name": "Consultation Session",
"date": "2024-01-20T00:00:00.000Z",
"startTime": "10:00",
"endTime": "11:30",
"durationMinutes": 90,
"status": "scheduled",
"fieldValues": [],
"attachments": [],
"notes": [],
"invoice": null,
"createdAt": "2024-01-15T10:00:00.000Z",
"updatedAt": "2024-01-15T10:00:00.000Z"
}
}

Common Errors

  • 401 Unauthorized: Missing or invalid authentication token
  • 403 Forbidden: Insufficient permissions (requires sessions.view)
  • 404 Not Found: Session or workspace not found
  • 500 Internal Server Error: Server error