Complete REST API Reference for Childcare Management System
Authenticate a user and receive a JWT token
{
"email": "admin@p-b.app",
"password": "Admin@2025"
}
{
"success": true,
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMTAiLCJyb2xlIjoic3VwZXJfYWRtaW4iLCJleHAiOjE3MzcxNjgwMDB9.abc123...",
"user": {
"id": "20a100c8-ece2-11f0-b1c2-00163e8be9bd",
"email": "admin@p-b.app",
"role": "super_admin",
"first_name": "Admin",
"last_name": "User"
}
}
Authorization: Bearer {token}
Get all children (filtered by user's centre/permissions)
{
"success": true,
"data": [
{
"child_id": "40e100c8-ece2-11f0-b1c2-00163e8be9bd",
"first_name": "Ava",
"last_name": "Jones",
"date_of_birth": "2022-03-20",
"preferred_name": "Ava",
"room_id": "60a100c8-ece2-11f0-b1c2-00163e8be9bd",
"centre_id": "10772f8c-ece2-11f0-b1c2-00163e8be9bd",
"is_active": true,
"dietary_requirements": "No dairy",
"allergies": "Peanuts"
},
{
"child_id": "41e100c8-ece2-11f0-b1c2-00163e8be9bd",
"first_name": "Liam",
"last_name": "Smith",
"date_of_birth": "2021-08-15",
"room_id": "60a100c8-ece2-11f0-b1c2-00163e8be9bd",
"centre_id": "10772f8c-ece2-11f0-b1c2-00163e8be9bd",
"is_active": true
}
]
}
Get detailed information about a specific child
{
"success": true,
"data": {
"child_id": "40e100c8-ece2-11f0-b1c2-00163e8be9bd",
"first_name": "Ava",
"last_name": "Jones",
"preferred_name": "Ava",
"date_of_birth": "2022-03-20",
"room_id": "60a100c8-ece2-11f0-b1c2-00163e8be9bd",
"room_name": "Toddler Room",
"centre_id": "10772f8c-ece2-11f0-b1c2-00163e8be9bd",
"is_active": true,
"dietary_requirements": "No dairy products",
"allergies": "Peanuts, tree nuts",
"medical_conditions": null,
"emergency_contact_name": "Sarah Jones",
"emergency_contact_phone": "+1234567890"
}
}
Update child profile information
{
"dietary_requirements": "No dairy products, vegetarian",
"allergies": "Peanuts, tree nuts, eggs",
"preferred_name": "Ava"
}
{
"success": true,
"message": "Child profile updated successfully",
"data": {
"child_id": "40e100c8-ece2-11f0-b1c2-00163e8be9bd",
"dietary_requirements": "No dairy products, vegetarian",
"allergies": "Peanuts, tree nuts, eggs",
"preferred_name": "Ava"
}
}
Get all parents/guardians linked to a child
{
"success": true,
"data": [
{
"parent_id": "50a100c8-ece2-11f0-b1c2-00163e8be9bd",
"first_name": "Sarah",
"last_name": "Jones",
"relationship": "mother",
"email": "sarah.jones@example.com",
"phone": "+1234567890",
"is_primary_contact": true,
"can_pickup": true
},
{
"parent_id": "51a100c8-ece2-11f0-b1c2-00163e8be9bd",
"first_name": "Michael",
"last_name": "Jones",
"relationship": "father",
"email": "michael.jones@example.com",
"phone": "+1234567891",
"is_primary_contact": false,
"can_pickup": true
}
]
}
Get all observations (filtered by permissions)
{
"success": true,
"data": [
{
"observation_id": "70a100c8-ece2-11f0-b1c2-00163e8be9bd",
"child_id": "40e100c8-ece2-11f0-b1c2-00163e8be9bd",
"child_name": "Ava Jones",
"description": "Ava showed excellent problem-solving skills while building with blocks. She demonstrated spatial awareness and persistence.",
"observation_type": "learning_moment",
"created_by": "Emily Smith",
"created_at": "2026-01-12T10:30:00Z"
},
{
"observation_id": "71a100c8-ece2-11f0-b1c2-00163e8be9bd",
"child_id": "41e100c8-ece2-11f0-b1c2-00163e8be9bd",
"child_name": "Liam Smith",
"description": "Liam displayed great creativity in art class today.",
"observation_type": "achievement",
"created_by": "Emily Smith",
"created_at": "2026-01-12T09:15:00Z"
}
]
}
Create a new observation for a child
{
"child_id": "40e100c8-ece2-11f0-b1c2-00163e8be9bd",
"centre_id": "10772f8c-ece2-11f0-b1c2-00163e8be9bd",
"description": "Ava showed excellent problem-solving skills while building with blocks. She demonstrated spatial awareness and persistence when constructing a tall tower.",
"observation_type": "learning_moment"
}
{
"success": true,
"message": "Observation created successfully",
"data": {
"observation_id": "70a100c8-ece2-11f0-b1c2-00163e8be9bd",
"child_id": "40e100c8-ece2-11f0-b1c2-00163e8be9bd",
"centre_id": "10772f8c-ece2-11f0-b1c2-00163e8be9bd",
"description": "Ava showed excellent problem-solving skills while building with blocks...",
"observation_type": "learning_moment",
"created_by_id": "30a100c8-ece2-11f0-b1c2-00163e8be9bd",
"created_at": "2026-01-12T10:30:00Z"
}
}
Get all observations for a specific child
{
"success": true,
"data": [
{
"observation_id": "70a100c8-ece2-11f0-b1c2-00163e8be9bd",
"description": "Showed excellent problem-solving skills",
"observation_type": "learning_moment",
"created_by": "Emily Smith",
"created_at": "2026-01-12T10:30:00Z"
}
]
}
Update an existing observation
{
"description": "Updated observation: Ava showed even more advanced problem-solving today.",
"observation_type": "achievement"
}
{
"success": true,
"message": "Observation updated successfully",
"data": {
"observation_id": "70a100c8-ece2-11f0-b1c2-00163e8be9bd",
"description": "Updated observation: Ava showed even more advanced problem-solving today.",
"observation_type": "achievement",
"updated_at": "2026-01-12T11:00:00Z"
}
}
Delete an observation
{
"success": true,
"message": "Observation deleted successfully"
}
Get all incidents
Create a new incident report
Get all incidents for a specific child
Update an existing incident
Delete an incident
Create a new medication record
Get all medications for a child
Update medication details
Delete a medication record
Get today's attendance for a centre
Check in a child
Get attendance history for a child
Get currently napping children
Start a nap for a child
Get news feed posts
{
"success": true,
"data": [
{
"post_id": "c0a100c8-ece2-11f0-b1c2-00163e8be9bd",
"centre_id": "10772f8c-ece2-11f0-b1c2-00163e8be9bd",
"post_type": "announcement",
"title": "Important Centre Closure Notice",
"content": "The centre will be closed on Friday, January 20th for staff training.",
"visibility": "all_parents",
"created_by": "Emily Smith",
"created_at": "2026-01-12T09:00:00Z"
},
{
"post_id": "c1a100c8-ece2-11f0-b1c2-00163e8be9bd",
"post_type": "celebration",
"title": "Birthday Celebration",
"content": "Join us in celebrating Ava's 4th birthday!",
"visibility": "all_parents",
"created_by": "Emily Smith",
"created_at": "2026-01-11T14:00:00Z"
}
]
}
Create a new post
Update a post
Delete a post
Get all events
{
"success": true,
"data": [
{
"event_id": "d0a100c8-ece2-11f0-b1c2-00163e8be9bd",
"centre_id": "10772f8c-ece2-11f0-b1c2-00163e8be9bd",
"event_type": "celebration",
"title": "Spring Family Picnic",
"description": "Join us for a fun family picnic in the park!",
"start_date": "2026-03-15",
"end_date": "2026-03-15",
"start_time": "11:00:00",
"end_time": "14:00:00",
"location": "Central Park",
"created_by": "Emily Smith",
"created_at": "2026-01-10T10:00:00Z"
}
]
}
Create a new event
Update an event
Delete an event
Get all message conversations for the current user
Send a new message
Get all notifications for the current user
Get count of unread notifications
{
"success": true,
"count": 5
}
Get all staff members
Get all parents
Get all rooms/classrooms
Create a new developmental assessment
Get all assessments for a child