Overview
The Events API allows you to log, update, and query baby activities. All events are associated with a baby profile and can include optional caregiver attribution, photos, and notes.Event Types
Zen Nurture supports the following event types:Feeding
FEED_BOTTLE: Bottle feeding (formula, breast milk, cow milk)FEED_BREAST: Breastfeeding sessions
Diaper
DIAPER: Diaper changes (wet, dirty, mixed)
Sleep
SLEEP: Sleep sessions with start and end times
Medicine
MED_DOSE: Medicine doses with name and amount
Growth
GROWTH_WEIGHT: Weight measurementsGROWTH_LENGTH: Length/height measurementsGROWTH_HEAD_CIRC: Head circumference
Notes
NOTE: General notes and observations
Event Schema
Create Event
Parameters
The baby profile ID this event belongs to
Event type (FEED_BOTTLE, DIAPER, SLEEP, etc.)
ISO 8601 timestamp when the event occurred
Optional caregiver who performed the activity
Event-specific data (structure varies by event type)
Array of photo IDs attached to this event
Response
The newly created event ID
Update Event
Update an existing event’s data.Parameters
The event ID to update
Updated timestamp
Updated payload data (merges with existing)
Updated photo IDs
Delete Event
Delete an event permanently.Parameters
The event ID to delete
Get Daily Aggregates
Retrieve summarized statistics for a specific date.Parameters
The baby profile ID
Date in YYYY-MM-DD format
Response
Get Range Aggregates
Retrieve aggregates for a date range.Parameters
The baby profile ID
Start timestamp (ISO 8601)
End timestamp (ISO 8601)
Response
Same structure as daily aggregates, but covering the entire range.Get Last Events by Types
Retrieve the most recent event for each specified type.Parameters
The baby profile ID
Array of event types to query
Response
Best Practices
Always use ISO 8601 timestamps
Always use ISO 8601 timestamps
Use
new Date().toISOString() to ensure consistent timestamp formatting. The API validates timestamps and rejects invalid formats.Validate payload data
Validate payload data
Each event type has specific payload requirements. Validate required fields before submission to avoid errors.
Handle timezone properly
Handle timezone properly
All timestamps are stored in UTC. The baby profile’s timezone setting is used for display purposes only.
Use caregiver IDs for attribution
Use caregiver IDs for attribution
Always include
caregiverId when logging events to properly attribute activities to the correct caregiver.Related Resources
Baby Profiles
Manage baby profiles and settings
Families
Family and caregiver management
Reminders
Set up event-based reminders
Activity Tracking
Learn about activity tracking features
