Updates an existing student record. All fields are optional; only provided fields will be updated.
Path Parameters
The unique identifier of the student to update
Request Body
All fields are optional. Only include the fields you want to update.
Link to an existing user account (if the student has a user account)
Type of identification document. Valid values: TI, RC, CC, CE, NUIP, PASSPORT
Identification document number
Date of birth in YYYY-MM-DD format
Additional custom data for the student. This will completely replace the existing extra_data
PIAR data for students with special educational needs. This will completely replace the existing piar_data
Whether the student is currently active
Array of guardian objects to associate with this student. Important: Providing this field will completely replace all existing guardian relationships. If you want to keep existing guardians, you must include them in the array.See the Create Student endpoint for the complete guardian object schema.
Response
Returns the updated student object with associated guardians.
See the Get Student endpoint for the complete response schema.
Guardian Replacement Behavior
When you provide the guardians field, all existing guardian relationships for this student will be deleted and replaced with the provided guardians.
- If a guardian with the same
document_type and document_number already exists in the school, that guardian record will be updated and linked to the student
- If the guardian doesn’t exist, a new guardian record will be created
- The relationship properties (
relationship, is_primary, priority, can_pickup, is_emergency_contact) are specific to each student-guardian link
Permissions Required
One of the following permissions:
write:enrollment
write:all
curl -X PATCH "https://api.athena-erp.com/students/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"full_name": "Juan Carlos Pérez García",
"extra_data": {
"blood_type": "O+",
"allergies": ["Penicilina", "Maní"]
}
}'
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"school_id": "123e4567-e89b-12d3-a456-426614174000",
"user_id": null,
"document_type": "TI",
"document_number": "1234567890",
"full_name": "Juan Carlos Pérez García",
"birth_date": "2010-05-15",
"gender": "M",
"is_active": true,
"extra_data": {
"blood_type": "O+",
"allergies": ["Penicilina", "Maní"]
},
"piar_data": {},
"guardians": [
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"document_type": "CC",
"document_number": "98765432",
"full_name": "María García",
"phone": "+57 300 1234567",
"email": "[email protected]",
"address": "Calle 123 #45-67",
"occupation": "Ingeniera",
"workplace": "Tech Corp",
"is_active": true,
"relationship": "Mother",
"is_primary": true,
"priority": 1,
"can_pickup": true,
"is_emergency_contact": true,
"link_id": "770e8400-e29b-41d4-a716-446655440002",
"created_at": "2024-01-15T10:30:00Z"
}
],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-03-10T15:20:00Z"
}
Example: Updating Guardian Relationships
{
"guardians": [
{
"document_type": "CC",
"document_number": "98765432",
"full_name": "María García",
"relationship": "Mother",
"phone": "+57 300 1234567",
"email": "[email protected]",
"is_primary": true,
"priority": 1,
"can_pickup": true,
"is_emergency_contact": true
},
{
"document_type": "CC",
"document_number": "11223344",
"full_name": "Ana López",
"relationship": "Grandmother",
"phone": "+57 300 9876543",
"is_primary": false,
"priority": 3,
"can_pickup": true,
"is_emergency_contact": false
}
]
}