Summary Object

Each response contains a summary object which displays important information about your request. While these fields are self-explanatory, it's important to note one significant function and that is Pagination.

Pagination
When making API calls, within a given scope, “start_date” and “end_date” (inclusive) of an API call, you may receive a large number of records. To make this easier to manage, only 100 records per page will be included in the response by default. You can receive up to a maximum of 1,000 records per page by adding a “limit” parameter.

Next URI

"next":"https://api.validic.com/v1/organizations/51adfcfd6dedSAMPLE0001/sleep/latest?access_token=b193142c7a907738ac762cbc70edd4780SAMPLE43e26232d0a3d080dSAMPLE4&end_date=2015-12-03T08%3A54%3A27Z&expanded=0&limit=200&page=2&start_date=2015-12-01T08%3A44%3A29Z",

Each response will contain a Next URI, which directs to the next page of records. Once the final page is reached, the Next URI will be null.

JSON

{ "summary":{ "status":200, "message":"Ok", "results":15567, "start_date":"2015-12-01T08:44:29+00:00", "end_date":"2015-12-03T08:54:27+00:00", "offset":0, "limit":200, "previous":null, "next":"https://api.validic.com/v1/organizations/51adfcfd6dedSAMPLE00001/sleep/latest?access_token=b193142c7a907738ac762cbc70edd4780SAMPLE43e26232d0a3d080dSAMPLE4&end_date=2015-12-03T08%3A54%3A27Z&expanded=0&limit=200&page=2&start_date=2015-12-01T08%3A44%3A29Z", "params":{ "start_date":"2015-12-01T08:44:29+00:00", "end_date":"2015-12-03T08:54:27+00:00", "offset":0, "limit":200 } },

The following table displays the Return Values found in the summary object.

Return Value

Type

Description

Return Value

Type

Description

status

Integer

The HTTP header response code returned.

message

String

The HTTP header response code message returned.

results

Integer

The total number of records returned across all pages.

start_date

String

The optional start timestamp of the activities you wish to pull in the ISO 8601 standard format”YYYY-MM-DDThh:mm:ssZ” (e.g., “2013-03-28T14:32:00+00:00″ where “+00:00″ is the UTC offset). Defaults to yesterday’s start of day (e.g., “2013-03-27T00:00:00+00:00″). May be set in GET request (e.g., &start_date=2013-03-28T14:32:00+00:00).

end_date

String

The optional end timestamp of the activities you wish to pull in the ISO 8601 standard format”YYYY-MM-DDThh:mm:ssZ” (e.g., “2013-03-28T14:32:00+00:00″ where “+00:00″ is the UTC offset). Defaults to yesterday’s end of day (e.g., “2013-03-27T23:59:59+00:00″). May be set in GET request (e.g., &end_date=2013-03-28T14:32:00+00:00).

offset

Integer

Record offset for retrieving paginated records. Default is 0. May be set in GET requests.

limit

Integer

Limit of records returned per page. Default is 100. Must be an integer between 1 and 1000. May be set in GET request.

previous

String

The URI of the previous page in the feed.

next

String

The URI of the next page in the feed.