Overview
Triggers data synchronization from a wearable provider (Garmin, Strava, Polar, Suunto, Whoop) for a user. Supports both asynchronous (recommended) and synchronous execution modes.
Provider-Specific Behavior:
Garmin : Data arrives primarily via webhooks. This endpoint triggers a 30-day backfill.
Polar : Supports workouts only (no 24/7 data).
Suunto : Supports both workouts and 24/7 data with full pagination.
Whoop : Supports workouts and 24/7 data (sleep/recovery).
Strava : Activities are synced via webhooks.
Authentication
Requires a valid API key in the X-API-Key header.
Path Parameters
Data provider name: garmin, strava, polar, suunto, or whoop
UUID of the user to sync data for
Query Parameters
General Parameters
Type of data to sync:
workouts: Activities/exercises only
247: 24/7 data (sleep, recovery, activity samples)
all: All available data types
Run sync asynchronously via Celery worker. Set to false for synchronous execution (may timeout for large datasets).
Suunto-Specific Parameters
Unix timestamp to synchronize data since. Use 0 for all available data.
Maximum number of items per request (max 100)
filter_by_modification_time
Filter by modification time instead of creation time
Polar-Specific Parameters
Include sample data (heart rate, speed, etc.)
Include heart rate zones data
Garmin-Specific Parameters
Activity start time as Unix timestamp or ISO 8601 date
Activity end time as Unix timestamp or ISO 8601 date
Response (Async Mode)
When async=true (default), returns immediately with task information.
Always true when task is queued successfully
Indicates async mode is active (always true in this mode)
Celery task ID for tracking sync progress
Human-readable status message
Response (Sync Mode)
When async=false, waits for completion and returns detailed results.
true if all data types synced successfully
Per-data-type sync results:
workouts: Result of workout sync
data_247: Result of 24/7 data sync
Example Requests
Async (Recommended)
Sync with Date Range
Suunto with Pagination
Python - Async
JavaScript - Async
curl -X POST "https://api.openwearables.com/api/v1/garmin/users/550e8400-e29b-41d4-a716-446655440000/sync?data_type=all&async=true" \
-H "X-API-Key: your_api_key_here"
Example Responses
200 - Async Mode (Success)
{
"success" : true ,
"async" : true ,
"task_id" : "a1b2c3d4-e5f6-7890-abcd-ef1234567890" ,
"message" : "Sync task queued for garmin. Check task status for results."
}
200 - Sync Mode (Success)
{
"success" : true ,
"details" : {
"workouts" : true ,
"data_247" : true
}
}
200 - Sync Mode (Partial Success)
{
"success" : false ,
"details" : {
"workouts" : true ,
"data_247" : false
}
}
{
"detail" : "Invalid or missing API key"
}
404 - Connection Not Found
{
"detail" : "No active connection found for provider"
}
{
"detail" : "Provider 'polar' does not support 247 data (sleep/recovery/activity)"
}
Data Type Support by Provider
Provider Workouts 24/7 Data Notes Garmin ✓ ✓ Webhook-based, 30-day backfill Strava ✓ ✗ Webhook-based Polar ✓ ✗ Exercises only Suunto ✓ ✓ Full pagination support Whoop ✓ ✓ Sleep and recovery included
Async vs Sync Mode
Async Mode (Recommended)
Returns immediately with task ID
Prevents timeout errors on large datasets
Allows parallel processing of multiple users
Check task status using Celery task ID
Sync Mode
Waits for completion before returning
Risk of timeout for large date ranges
Useful for testing and small data requests
Returns detailed success/failure per data type
Error Handling
The endpoint returns HTTP 200 even for partial failures in sync mode. Check the success field and details object to determine if all data types synced successfully.
For async mode, errors are logged in the Celery task. Use task monitoring tools to track failures.
Rate Limits
Provider API rate limits apply:
Garmin : Webhook-based, no direct API limits
Strava : 100 requests per 15 minutes, 1000 per day
Polar : No documented limits
Suunto : 100 requests per 15 minutes
Whoop : No documented limits