get https://api.v2.validic.com/organizations//users//sleep?token=
Returns a list of sleep records for a given user
GET /organizations/:org_id/users/:uid/sleep
Request Information
Request Parameters
| Name | Required Field | Type | Description | 
|---|---|---|---|
| start_date | optional | string | The start date to retrieve user data for. Format: YYYY-MM-DD. Default is current UTC day. Max date range is 30 days. | 
| end_date | optional | string | The end date to retrieve user data for. Format: YYYY-MM-DD. Default is current UTC day. Max date range is 30 days. | 
| source | optional | string | Used to filter records to source(s). Example: “...?source=fitbit,garmin” or “...?source=fitbit” | 
HTTP Response Status
| Response Code | Description | 
|---|---|
| 200 (Ok) | Indicates the request was received and a result was returned. | 
| 400 (Bad Request) | Indicates that there was an error with request | 
Field Description
| version | string | Indicates the resource payload version. Validic will make future updates to the structure of the resource payload where breaking changes will receive a new version. | 
| id | string | Unique identifier for the record. | 
| checksum | string | A derived value useful when comparing records with the same idfor data updates. | 
| type | string | The Validic Resource type. For Measurement records the type will be measurements. | 
| start_time | string | The start time of the event represented in UTC. Format: YYYY-MM-DDThh:mm:ssZ. | 
| end_time | string | The end time of the event represented in UTC. Format: YYYY-MM-DDThh:mm:ssZ. | 
| utc_offset | integer | The offset in seconds from UTC. | 
| offset_origin | string | The source of the UTC offset. Valid values: source(UTC offset received from the original record),profile(UTC offset received from the source's user profile),user_defined(UTC offset provided by user's time zone selection upon authorization through the Validic Marketplace) | 
| user | object | A User object that contains identifiers related to the user. | 
| user>uid | string | The customer's user ID. | 
| user>user_id | string | Validic user ID. | 
| user>organization_id | string | Validic organization ID. | 
| log_id | string | The unique identifier for the record provided by the source. | 
| source | A source object that contains source specific information. | |
| source>type | string | The source Validic retrieved the data from. | 
| source>device | object | A device object containing information about the device that generated the data if available. | 
| source>device>name | string | The name of the device. | 
| source>device>type | string | The type of the device. | 
| name | string | A free form field that defines the meal type or food type for the record. | 
| metrics | array | An array of Metrics. Refer to the Metrics documentation for further information. | 
| segments | array | An array of Segments. A more granular view of the items that compose the nutrition event. | 
| segment>name | string | A free form field that defines the food type for the segment. | 
| segment>metrics | array | Metrics for the given segment. | 
| created_at | string | The record processed time represented in UTC. Format: YYYY-MM-DDThh:mm:ssZ. | 
