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
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <token> |
Content-Type* | String | application/json |
Request Body
Name | Type | Description |
---|---|---|
user_id* | String | User's unique identifier |
data_type* | String | Samples type.
Either |
data* | Sample[] | An array of samples like heart rate measurements or steps.
The minimal accepted size is |
Each Sample
in the data
field must follow the following structure:
Field | Type | Description |
---|---|---|
device_name* | String | A unique device name like |
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 |
unit* | String | Sample's unit.
Either |
value* | Number | Sample's value.
It must be bigger than |
See the full example in the json-file below:
Last updated