General Collaborators API
Endpoints for managing collaborators and external partners.
List Collaborators
Get a list of collaborators.
Endpoint: GET /v1/collaborators
Authentication: Required
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number for pagination |
page_size | integer | No | Number of items per page |
type | string | No | Filter by collaborator type |
status | string | No | Filter by collaborator status |
organization | string | No | Filter by organization |
Example Request
GET /v1/collaborators?type=school&status=active HTTP/1.1
Content-Type: application/json
X-User-Token: your_token_hereCreate Collaborator
Endpoint: POST /v1/collaborators
Authentication: Required
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
collaborator | object | Yes | Collaborator data object |
collaborator.first_name | string | Yes | First name |
collaborator.last_name | string | Yes | Last name |
collaborator.email | string | Yes | Email address |
collaborator.phone | string | No | Phone number |
collaborator.organization | string | Yes | Organization name |
collaborator.title | string | No | Job title |
collaborator.type | string | Yes | Collaborator type |
collaborator.specialization | string | No | Area of specialization |
Example Request
POST /v1/collaborators HTTP/1.1
Content-Type: application/json
X-User-Token: your_token_here
{
"collaborator": {
"first_name": "Sarah",
"last_name": "Johnson",
"email": "[email protected]",
"phone": "+1-555-987-6543",
"organization": "Lincoln Elementary School",
"title": "School Counselor",
"type": "school",
"specialization": "behavioral_support"
}
}Update Collaborator
Endpoint: PUT /v1/collaborators/{id}
Authentication: Required
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Collaborator ID |
Request Body Parameters
Same as Create Collaborator endpoint, but all fields are optional.
Get Collaborator Details
Endpoint: GET /v1/collaborators/{id}
Authentication: Required
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Collaborator ID |
Example Request
GET /v1/collaborators/123 HTTP/1.1
Content-Type: application/json
X-User-Token: your_token_hereDelete Collaborator
Endpoint: DELETE /v1/collaborators/{id}
Authentication: Required
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Collaborator ID |
Collaborator Assessments
Create Collaborator Assessment
Endpoint: POST /v1/collaborator_assessments
Authentication: Required
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
collaborator_assessment | object | Yes | Assessment data object |
collaborator_assessment.collaborator_id | integer | Yes | Collaborator ID |
collaborator_assessment.patient_id | integer | Yes | Patient ID |
collaborator_assessment.assessment_type | string | Yes | Type of assessment |
collaborator_assessment.responses | array | Yes | Array of assessment responses |
Example Request
POST /v1/collaborator_assessments HTTP/1.1
Content-Type: application/json
X-User-Token: your_token_here
{
"collaborator_assessment": {
"collaborator_id": 123,
"patient_id": 1049,
"assessment_type": "behavioral_observation",
"responses": [
{
"question_id": 1,
"answer": "Often"
},
{
"question_id": 2,
"answer": "Moderate improvement"
}
]
}
}Get Assessment Token
Get a secure token for collaborator assessment access.
Endpoint: GET /v1/collaborator_assessments/token
Authentication: Required
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
collaborator_id | integer | Yes | Collaborator ID |
patient_id | integer | Yes | Patient ID |
assessment_type | string | Yes | Assessment type |
Example Request
GET /v1/collaborator_assessments/token?collaborator_id=123&patient_id=1049&assessment_type=behavioral_observation HTTP/1.1
Content-Type: application/json
X-User-Token: your_token_hereResponse Format
Collaborator Response
{
"id": 123,
"first_name": "Sarah",
"last_name": "Johnson",
"email": "[email protected]",
"phone": "+1-555-987-6543",
"organization": "Lincoln Elementary School",
"title": "School Counselor",
"type": "school",
"specialization": "behavioral_support",
"status": "active",
"created_at": "2023-10-20T10:00:00.000Z",
"updated_at": "2023-10-20T15:30:00.000Z"
}Collaborator Assessment Response
{
"id": 456,
"collaborator_id": 123,
"patient_id": 1049,
"assessment_type": "behavioral_observation",
"status": "completed",
"responses": [
{
"question_id": 1,
"question_text": "How often does the student display disruptive behavior?",
"answer": "Often",
"score": 3
}
],
"completed_at": "2023-10-27T14:30:00.000Z",
"created_at": "2023-10-27T14:00:00.000Z"
}Assessment Token Response
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_at": "2023-10-28T14:30:00.000Z",
"assessment_url": "https://assessments.example.com/collaborate/abc123"
}Collaborator Types
school- School personnel (teachers, counselors, etc.)therapist- External therapistsphysician- Medical doctorssocial_worker- Social workerscase_manager- Case managersfamily_member- Family membersother- Other types of collaborators
Collaborator Status Values
active- Collaborator is activeinactive- Collaborator is inactivepending- Collaborator invitation pendingdeclined- Collaborator declined invitationsuspended- Collaborator access suspended
Assessment Types
behavioral_observation- Behavioral observation assessmentacademic_performance- Academic performance evaluationsocial_skills- Social skills assessmentprogress_report- Progress reportincident_report- Incident or behavior reporttreatment_feedback- Treatment feedback
Specializations
behavioral_support- Behavioral support specialistacademic_support- Academic support specialistspeech_therapy- Speech and language therapyoccupational_therapy- Occupational therapyphysical_therapy- Physical therapyspecial_education- Special educationgeneral_education- General education
Error Responses
422 Unprocessable Entity
{
"errors": {
"email": ["can't be blank", "has already been taken"],
"organization": ["can't be blank"],
"type": ["is not included in the list"]
}
}404 Not Found
{
"errors": "Collaborator not found"
}403 Forbidden
{
"errors": "You are not authorized to access this collaborator"
}Notes
- Collaborators provide external perspectives on patient progress
- Assessment tokens provide secure, time-limited access for external assessments
- Different collaborator types may have access to different assessment tools
- All collaborator interactions are logged for audit and compliance purposes
- Collaborator assessments help provide comprehensive patient evaluations
- Organizations help group collaborators for easier management
- Specializations help match collaborators with appropriate assessment types