Sync Sdk Data
Changed onImport health data from SDK provider asynchronously via Celery.
Supports Apple HealthKit and Samsung Health SDK formats (identical payloads):
{
"provider": "apple",
"sdkVersion": "1.0.0",
"syncTimestamp": "2021-01-01T00:00:00Z",
"data": {
"records": [...],
"sleep": [...],
"workouts": [...]
}
}
Args: user_id: SDK user identifier body: Health data payload auth: SDK authentication (Bearer token or API key)
Returns: UploadDataResponse with 202 status and task queued message
Raises: HTTPException: 403 if token doesn't match user_id, 400 if provider unsupported. Payload validation runs async in the worker, not here.
Request
- Base URL: https://api.openwearables.io (the document declares no server; this is the origin it was published from)
- URL: https://api.openwearables.io/api/v1/sdk/users/{user_id}/sync
- Auth: OAuth 2 (password, token URL /api/v1/auth/login)
Path parameters
Headers
Request body
Example request
{
"data": {
"records": [
{
"endDate": "2026-02-24T08:30:00Z",
"id": "abc-xyz-123-sys",
"parentId": "abc-xyz-123",
"source": {
"appId": "com.sec.android.app.shealth",
"deviceId": "R9ZW30ABC12",
"deviceManufacturer": "Samsung",
"deviceModel": "SM-R960",
"deviceName": "Galaxy Watch7",
"deviceType": "watch"
},
"startDate": "2026-02-24T08:30:00Z",
"type": "BLOOD_PRESSURE_SYSTOLIC",
"unit": "mmHg",
"value": 122,
"zoneOffset": "+01:00"
}
],
"sleep": [
{
"endDate": "2026-02-24T00:00:00Z",
"id": "slp-001-s0-0",
"parentId": "slp-001",
"source": {
"appId": "com.sec.android.app.shealth",
"deviceId": "R9ZW30ABC12",
"deviceManufacturer": "Samsung",
"deviceModel": "SM-R960",
"deviceName": "Galaxy Watch7",
"deviceType": "watch"
},
"stage": "light",
"startDate": "2026-02-23T23:10:00Z",
"values": [
{
"type": "sleepScore",
"unit": "score",
"value": 82
}
],
"zoneOffset": "+01:00"
}
],
"workouts": [
{
"endDate": "2026-02-24T06:45:00Z",
"id": "wrk-001-s0",
"notes": "Morning run in the park",
"parentId": "wrk-001",
"route": [
{
"altitudeM": 142,
"horizontalAccuracyM": 3.5,
"latitude": 52.229676,
"longitude": 21.012229,
"timestamp": "2026-02-24T06:01:00Z"
}
],
"samples": [
{
"timestamp": "2026-02-24T06:01:00Z",
"type": "heartRate",
"unit": "bpm",
"value": 110
},
{
"timestamp": "2026-02-24T06:01:00Z",
"type": "cadence",
"unit": "spm",
"value": 155
},
{
"timestamp": "2026-02-24T06:01:00Z",
"type": "speed",
"unit": "m/s",
"value": 1.8
}
],
"source": {
"appId": "com.sec.android.app.shealth",
"deviceId": "R9ZW30ABC12",
"deviceManufacturer": "Samsung",
"deviceModel": "SM-R960",
"deviceName": "Galaxy Watch7",
"deviceType": "watch"
},
"startDate": "2026-02-24T06:00:00Z",
"type": "RUNNING",
"values": [
{
"type": "duration",
"unit": "ms",
"value": 2700000
},
{
"type": "calories",
"unit": "kcal",
"value": 345.5
},
{
"type": "distance",
"unit": "m",
"value": 5234
},
{
"type": "meanHeartRate",
"unit": "bpm",
"value": 142.3
},
{
"type": "maxHeartRate",
"unit": "bpm",
"value": 178
},
{
"type": "minHeartRate",
"unit": "bpm",
"value": 95
},
{
"type": "meanSpeed",
"unit": "m/s",
"value": 1.5
},
{
"type": "maxSpeed",
"unit": "m/s",
"value": 3.2
},
{
"type": "meanCadence",
"unit": "spm",
"value": 165
},
{
"type": "maxCadence",
"unit": "spm",
"value": 182
},
{
"type": "altitudeGain",
"unit": "m",
"value": 45
},
{
"type": "altitudeLoss",
"unit": "m",
"value": 42
},
{
"type": "maxAltitude",
"unit": "m",
"value": 185
},
{
"type": "minAltitude",
"unit": "m",
"value": 140
},
{
"type": "vo2Max",
"unit": "mL/kg/min",
"value": 42.5
}
],
"zoneOffset": "+01:00"
}
]
},
"provider": "samsung",
"sdkVersion": "0.1.0",
"syncTimestamp": "2026-02-24T10:00:00Z"
}Response
Successful Response
Changes
- info
added the new
HKQuantityTypeIdentifierHeartRateVariabilityRMSSDenum value to the request property////
- info
- info
added the new
DIETARY_BIOTINenum value to the request property//// - info
added the new
DIETARY_CAFFEINEenum value to the request property//// - info
added the new
DIETARY_CALCIUMenum value to the request property//// - info
added the new
DIETARY_CARBOHYDRATEenum value to the request property//// - info
added the new
DIETARY_CHLORIDEenum value to the request property//// - info
added the new
DIETARY_CHOLESTEROLenum value to the request property//// - info
added the new
DIETARY_CHROMIUMenum value to the request property//// - info
added the new
DIETARY_COPPERenum value to the request property//// - info
added the new
DIETARY_ENERGYenum value to the request property//// - info
added the new
DIETARY_ENERGY_FROM_FATenum value to the request property//// - info
added the new
DIETARY_FIBERenum value to the request property//// - info
added the new
DIETARY_FOLATEenum value to the request property//// - info
added the new
DIETARY_FOLIC_ACIDenum value to the request property//// - info
added the new
DIETARY_IODINEenum value to the request property//// - info
added the new
DIETARY_IRONenum value to the request property//// - info
added the new
DIETARY_MAGNESIUMenum value to the request property//// - info
added the new
DIETARY_MANGANESEenum value to the request property//// - info
added the new
DIETARY_MOLYBDENUMenum value to the request property//// - info
added the new
DIETARY_MONOUNSATURATED_FATenum value to the request property//// - info
added the new
DIETARY_NIACINenum value to the request property//// - info
added the new
DIETARY_PANTOTHENIC_ACIDenum value to the request property//// - info
added the new
DIETARY_PHOSPHORUSenum value to the request property//// - info
added the new
DIETARY_POLYUNSATURATED_FATenum value to the request property//// - info
added the new
DIETARY_POTASSIUMenum value to the request property//// - info
added the new
DIETARY_PROTEINenum value to the request property//// - info
added the new
DIETARY_RIBOFLAVINenum value to the request property//// - info
added the new
DIETARY_SATURATED_FATenum value to the request property//// - info
added the new
DIETARY_SELENIUMenum value to the request property//// - info
added the new
DIETARY_SODIUMenum value to the request property//// - info
added the new
DIETARY_SUGARenum value to the request property//// - info
added the new
DIETARY_THIAMINenum value to the request property//// - info
added the new
DIETARY_TOTAL_FATenum value to the request property//// - info
added the new
DIETARY_TRANS_FATenum value to the request property//// - info
added the new
DIETARY_UNSATURATED_FATenum value to the request property//// - info
added the new
DIETARY_VITAMIN_Aenum value to the request property//// - info
added the new
DIETARY_VITAMIN_B12enum value to the request property//// - info
added the new
DIETARY_VITAMIN_B6enum value to the request property//// - info
added the new
DIETARY_VITAMIN_Cenum value to the request property//// - info
added the new
DIETARY_VITAMIN_Denum value to the request property//// - info
added the new
DIETARY_VITAMIN_Eenum value to the request property//// - info
added the new
DIETARY_VITAMIN_Kenum value to the request property//// - info
added the new
DIETARY_ZINCenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryBiotinenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryCaffeineenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryCalciumenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryCarbohydratesenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryChlorideenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryCholesterolenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryChromiumenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryCopperenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryEnergyConsumedenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryFatMonounsaturatedenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryFatPolyunsaturatedenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryFatSaturatedenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryFatTotalenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryFiberenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryFolateenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryIodineenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryIronenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryMagnesiumenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryManganeseenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryMolybdenumenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryNiacinenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryPantothenicAcidenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryPhosphorusenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryPotassiumenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryProteinenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryRiboflavinenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietarySeleniumenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietarySodiumenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietarySugarenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryThiaminenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryVitaminAenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryVitaminB12enum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryVitaminB6enum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryVitaminCenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryVitaminDenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryVitaminEenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryVitaminKenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryWaterenum value to the request property//// - info
added the new
HKQuantityTypeIdentifierDietaryZincenum value to the request property//// - info
added the optional property
to the response with the status
- info