Sending Users Data
Use /samples
endpoint to sync users' data with our API. You will need to split data points (samples) into batches of 1000 elements in size. It's okay to send such batches in parallel.
Considering that you'll be sending us numerous batches, we recommend that you create a system to track samples that have already been submitted. As an example, the simplest method to accomplish this is by sending batches in chronological order and keeping a record of the most recent synchronized batch for each device.
POST
https://api-b2b.gerosense.ai/api/v2.2/samples
Headers
Authorization*
String
Bearer <token>
Content-Type*
String
application/json
Request Body
user_id*
String
User's unique identifier
data_type*
String
Samples type.
Either steps
or bpm
(for heart rate)
data*
Sample[]
An array of samples like heart rate measurements or steps.
The minimal accepted size is 3
elements. The maximum accepted size is 1000
elements.
Each Sample
in the data
field must follow the following structure:
device_name*
String
A unique device name like iPhone
or Apple Watch
device_version
String
The version of the device or firmware
start_date*
String
Sample's start timestamp in ISO 8601 format
end_date
String
Sample's end timestamp in ISO 8601 format.
It must not be earlier than start_date
unit*
String
Sample's unit.
Either count
, count/min
, or count/s
value*
Number
Sample's value.
It must be bigger than 0
.
It must be less than or equal to 30000
when unit
is count
.
It must be less than or equal to 300
when unit
is count/min
.
See the full example in the json-file below:
Last updated