Guide · 4 steps
Building a Family Portal
In this guide, you'll build a simple family portal that displays a resident's profile, their family connections, and recent photos and messages.
Prerequisites
- LifeLoop API service token
- Basic cURL or HTTP client knowledge
- Tenant: sunrise-001
1Step 1
Fetch the resident
Start by retrieving the resident profile you want to render at the top of the portal.
Request
curl https://api.lifeloop.com/api/v1/sunrise-001/residents/res-001 \
-H "Authorization: Bearer YOUR_SERVICE_TOKEN"Response · 200 OK
{
"id": "res-001",
"firstName": "Aileen",
"lastName": "Edmond",
"facilityId": "fac-001",
"dateOfBirth": "1945-03-15",
"roomNumber": "204B"
}2Step 2
Get the resident's connections
List the family members linked to the resident — typically rendered as the portal's audience.
Request
curl https://api.lifeloop.com/api/v1/sunrise-001/connections?residentId=res-001 \
-H "Authorization: Bearer YOUR_SERVICE_TOKEN"Response · 200 OK
{
"data": [
{
"id": "conn-001",
"residentId": "res-001",
"name": "Sarah Edmond",
"relationship": "Daughter",
"email": "sarah@example.com"
},
{
"id": "conn-002",
"residentId": "res-001",
"name": "Michael Edmond",
"relationship": "Son",
"email": "michael@example.com"
}
]
}3Step 3
Retrieve recent photos
Pull the latest photos to show in a gallery section. Limit the page size for the initial render.
Request
curl https://api.lifeloop.com/api/v1/sunrise-001/photos?residentId=res-001&limit=5 \
-H "Authorization: Bearer YOUR_SERVICE_TOKEN"Response · 200 OK
{
"data": [
{
"id": "photo-001",
"residentId": "res-001",
"url": "https://cdn.lifeloop.com/photos/photo-001.jpg",
"caption": "Spring garden activity",
"createdAt": "2026-06-20T14:30:00Z"
}
]
}4Step 4
Fetch recent messages
Finally, pull the most recent caregiver messages for the activity feed.
Request
curl https://api.lifeloop.com/api/v1/sunrise-001/messages?residentId=res-001&limit=3 \
-H "Authorization: Bearer YOUR_SERVICE_TOKEN"Response · 200 OK
{
"data": [
{
"id": "msg-001",
"residentId": "res-001",
"subject": "Great day at music therapy!",
"body": "Aileen enjoyed singing along today.",
"createdAt": "2026-06-21T10:15:00Z"
}
]
}Next steps
- Style the data in your custom UI
- Add pagination for photos and messages
- Set up webhooks to get real-time updates when new photos or messages are posted
More guides