Validic Inform

Validic Inform Developer Hub

Welcome to the Validic Inform developer hub. You'll find comprehensive guides and documentation to help you start working with Validic Inform as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started
Suggest Edits

Provision a User

Creates the user and returns an id, uid, marketplace information, and created_at parameters for the user.

POST /organizations/:org_id/users?token=:token

 
posthttps://api.v2.validic.com/organizations/org_id/users?token=token
curl --request POST \
  --url 'https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users?token=6f46db36dd6543d2b82d91698fcd0896' \
  --header 'content-type: application/json' \
  --data '{  
   "uid":"277040620-wcwflair",
   "location":{  
      "timezone":"America/New_York",
      "country_code":"US"
   }
}'
require 'uri'
require 'net/http'

url = URI("https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users?token=6f46db36dd6543d2b82d91698fcd0896")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{  \n   \"uid\":\"277040620-wcwflair\",\n   \"location\":{  \n      \"timezone\":\"America/New_York\",\n      \"country_code\":\"US\"\n   }\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users"

querystring = {"token":"6f46db36dd6543d2b82d91698fcd0896"}

payload = "{  \n   \"uid\":\"277040620-wcwflair\",\n   \"location\":{  \n      \"timezone\":\"America/New_York\",\n      \"country_code\":\"US\"\n   }\n}"
headers = {'content-type': 'application/json'}

response = requests.request("POST", url, data=payload, headers=headers, params=querystring)

print(response.text)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users?token=6f46db36dd6543d2b82d91698fcd0896"

	payload := strings.NewReader("{  \n   \"uid\":\"277040620-wcwflair\",\n   \"location\":{  \n      \"timezone\":\"America/New_York\",\n      \"country_code\":\"US\"\n   }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users?token=6f46db36dd6543d2b82d91698fcd0896",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{  \n   \"uid\":\"277040620-wcwflair\",\n   \"location\":{  \n      \"timezone\":\"America/New_York\",\n      \"country_code\":\"US\"\n   }\n}",
  CURLOPT_HTTPHEADER => array(
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
A binary file was returned

You couldn't be authenticated

{
    "id": "598518fd8a5da50001578157",
    "uid": "277040620-wcwflair",
    "marketplace": {
        "token": "c7ff3922e30c048f6e2fbd099ee1358d5871e3861419c16d195b0fc313b09c47",
        "url": "https://syncmydevice.com/?token=c7ff3922e30c048f6e2fbd099ee1358d5871e3861419c16d195b0fc313b09c47"
    },
    "location": {
        "timezone": "America/New_York",
        "country_code": "US"
    },
    "sources": [],
    "created_at": "2017-08-05T01:01:49Z",
    "updated_at": "2017-08-05T01:01:49Z"
}
{
    "message": "An error occurred and an error response has been sent with details."
}
{
    "errors": [
        "Token is not authorized to access organization"
    ]
}
Indicates that there was an error with request

Path Params

org_id
string
required

Organization ID provided to you by Validic.

token
string
required

Developer Key as supplied by Validic.

Body Params

uid
string

The UID you defined when provisioning the client.

 

The following table outlines the possible fields which can be expected in the API response.

Name
Type
Description

id

string

Validic user ID

uid

string

Customer’s user identifier.

marketplace > token

Unique marketplace identifier.

marketplace > url

string

The user’s marketplace URL. Requesting this URL with the ‘Accept’ header as ‘application/json’ will provide a JSON representation of the marketplace. Otherwise an HTML representation will be presented.

location > timezone

string

Default user timezone. When retrieving data from a source that provides no UTC offset information the default timezone will be used to calculate the UTC offset.

location > country_code

string

User’s country identified as a two character country code using the ISO 3166-1 standard. Validic uses this information for integrations that provide data access based upon the user’s country.

sources

string

List of sources the user has connected to including the connection time in UTC.

created_at

string

The date and time the resource was created.

updated_at

string

The date and time the resource was updated.

Supported Timezones
Validic supports over 400 Olson format timezones. When setting a default timezone for a user the value must match one of the timezones listed in the table found in our support section.

Suggest Edits

Get User Profile

Returns an end users profile and connected devices, based on the uid of the user for the organization.

GET /organizations/:org_id/users/:uid?token=:token

 
gethttps://api.v2.validic.com/organizations/org_id/users/uid?token=token
curl --request GET \
  --url 'https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/?token=6f46db36dd6543d2b82d91698fcd0896' \
  --header 'content-type: application/json'
require 'uri'
require 'net/http'

url = URI("https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/?token=6f46db36dd6543d2b82d91698fcd0896")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["content-type"] = 'application/json'

response = http.request(request)
puts response.read_body
import requests

url = "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/"

querystring = {"token":"6f46db36dd6543d2b82d91698fcd0896"}

headers = {'content-type': 'application/json'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/?token=6f46db36dd6543d2b82d91698fcd0896"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/?token=6f46db36dd6543d2b82d91698fcd0896",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
A binary file was returned

You couldn't be authenticated

{
    "id": "59b02bdef758800001e13e8c",
    "uid": "277040620-sel",
    "marketplace": {
        "token": "4deee4c7c81e9b652d22c8999beaf7c972daa513c6cf6aaa6af636f8117bf929",
        "url": "https://syncmydevice.com/?token=4deee4c7c81e9b652d22c8999beaf7c972daa513c6cf6aaa6af636f8117bf929"
    },
    "mobile": {
        "token": "facbce6ccd524cc68fdfd024ee0d96d2"
    },
    "location": {
        "timezone": "America/New_York",
        "country_code": null
    },
    "sources": [
        {
            "type": "strava",
            "connected_at": "2017-09-06T20:55:22Z"
        },
        {
            "type": "polar",
            "connected_at": "2017-09-06T18:48:29Z"
        },
        {
            "type": "tomtom",
            "connected_at": "2017-09-06T18:45:53Z"
        },
        {
            "type": "omron",
            "connected_at": "2017-09-06T18:42:31Z"
        },
        {
            "type": "jawbone",
            "connected_at": "2017-09-06T18:39:27Z"
        },
        {
            "type": "ihealth",
            "connected_at": "2017-09-06T18:39:09Z"
        },
        {
            "type": "misfit",
            "connected_at": "2017-09-06T18:38:37Z"
        },
        {
            "type": "nokia",
            "connected_at": "2017-09-06T18:34:21Z"
        },
        {
            "type": "garmin",
            "connected_at": "2017-09-06T18:32:04Z"
        },
        {
            "type": "fitbit",
            "connected_at": "2017-09-06T18:23:10Z"
        }
    ],
    "created_at": "2017-09-06T17:09:50Z",
    "updated_at": "2017-09-06T18:35:19Z"
}
An error occurred and an error response has been sent with details.

Path Params

org_id
string
required

Organization ID provided to you by Validic.

uid
string
required

The UID you defined when provisioning the client.

token
string
required

Developer Key as supplied by Validic.

 

The following table outlines the possible fields which can be expected in the API response.

Name
Type
Description

id

string

Validic user ID

uid

string

Customer’s user identifier.

marketplace > token

Unique marketplace identifier.

marketplace > url

string

The user’s marketplace URL. Requesting this URL with the ‘Accept’ header as ‘application/json’ will provide a JSON representation of the marketplace. Otherwise an HTML representation will be presented.

mobile > token

string

Unique identifier used to connect users to the Validic mobile solution.

location > timezone

string

Default user timezone. When retrieving data from a source that provides no UTC offset information the default timezone will be used to calculate the UTC offset.

location > country_code

string

User’s country identified as a two character country code using the ISO 3166-1 standard. Validic uses this information for integrations that provide data access based upon the user’s country.

sources

string

List of sources the user has connected to including the connection time in UTC.

created_at

string

The date and time the resource was created.

updated_at

string

The date and time the resource was updated.

Suggest Edits

Update User

Updates users profile information and return an id, uid, marketplace information, and created_at parameters for the user.

PUT /organizations/:org_id/users/:uid/

 
puthttps://api.v2.validic.com/organizations/org_id/users/uid?token=token
curl -X PUT \
  'https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel?token=6f46db36dd6543d2b82d91698fcd0896' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 2d101c97-769c-39a1-13b6-f49a0895ee11' \
  -d '{
  "location": {
    "timezone": "America/New_York",
    "country_code": "US"
  }
}
'
require 'uri'
require 'net/http'

url = URI("https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel?token=6f46db36dd6543d2b82d91698fcd0896")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request["postman-token"] = 'd7ca6024-b749-0057-7372-287379565566'
request.body = "{\n  \"location\": {\n    \"timezone\": \"America/New_York\",\n    \"country_code\": \"US\"\n  }\n}\n"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.v2.validic.com")

payload = "{\n  \"location\": {\n    \"timezone\": \"America/New_York\",\n    \"country_code\": \"US\"\n  }\n}\n"

headers = {
    'content-type': "application/json",
    'cache-control': "no-cache",
    'postman-token': "4ae61f50-78a1-cf25-0ae9-2c6e6b082f05"
    }

conn.request("PUT", "/organizations/597752338a5da500014a1f9a/users/277040620-sel?token=6f46db36dd6543d2b82d91698fcd0896", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel?token=6f46db36dd6543d2b82d91698fcd0896"

	payload := strings.NewReader("{\n  \"location\": {\n    \"timezone\": \"America/New_York\",\n    \"country_code\": \"US\"\n  }\n}\n")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("cache-control", "no-cache")
	req.Header.Add("postman-token", "c7d2110a-a568-3e89-a482-59a9ff30d3f7")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
<?php

$request = new HttpRequest();
$request->setUrl('https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel');
$request->setMethod(HTTP_METH_PUT);

$request->setQueryData(array(
  'token' => '6f46db36dd6543d2b82d91698fcd0896'
));

$request->setHeaders(array(
  'postman-token' => '5869bff7-ecc2-be4d-c8d4-9e2c51f8fab4',
  'cache-control' => 'no-cache',
  'content-type' => 'application/json'
));

$request->setBody('{
  "location": {
    "timezone": "America/New_York",
    "country_code": "US"
  }
}
');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
PUT /organizations/597752338a5da500014a1f9a/users/277040620-sel?token=6f46db36dd6543d2b82d91698fcd0896 HTTP/1.1
Host: api.v2.validic.com
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: 1eee6c40-8268-6661-3bf7-3b9ba5d10a95

{
  "location": {
    "timezone": "America/New_York",
    "country_code": "US"
  }
}
A binary file was returned

You couldn't be authenticated

{
    "id": "597769108a5da500014a1fa8",
    "uid": "277040620-sel",
    "marketplace": {
        "token": "4deee4c7c81e9b652d22c8999beaf7c972daa513c6cf6aaa6af636f8117bf929",
        "url": "https://syncmydevice.com/?token=4deee4c7c81e9b652d22c8999beaf7c972daa513c6cf6aaa6af636f8117bf929"
    },
    "location": {
        "timezone": "America/New_York",
        "country_code": "US"
    },
    "sources": [
        {
            "type": "strava",
            "connected_at": "2017-07-26T18:49:24Z"
        },
        {
            "type": "misfit",
            "connected_at": "2017-07-25T15:57:30Z"
        },
        {
            "type": "withings",
            "connected_at": "2017-07-25T15:52:36Z"
        },
        {
            "type": "jawbone",
            "connected_at": "2017-07-25T15:52:16Z"
        }
    ],
    "created_at": "2017-07-25T15:51:44Z",
    "updated_at": "2017-07-25T15:51:44Z"
}
{
    "message": "Invalid authentication credentials"
}
{
    "errors": [
        "Token is not authorized to access organization"
    ]
}
Indicates that there was an error with request

Path Params

org_id
string
required

Organization ID provided to you by Validic.

uid
string
required

The UID you defined when provisioning the client.

token
string
required

Developer Key as supplied by Validic.

Body Params

timezone
array

Used to populate timezone and country_code

country_code
array
 

The following table outlines the possible fields which can be expected in the API response.

Name
Type
Description

id

string

Validic user ID

uid

string

Customer’s user identifier.

marketplace > token

Unique marketplace identifier.

marketplace > url

string

The user’s marketplace URL. Requesting this URL with the ‘Accept’ header as ‘application/json’ will provide a JSON representation of the marketplace. Otherwise an HTML representation will be presented.

location > timezone

string

Default user timezone. When retrieving data from a source that provides no UTC offset information the default timezone will be used to calculate the UTC offset.

location > country_code

string

User’s country identified as a two character country code using the ISO 3166-1 standard. Validic uses this information for integrations that provide data access based upon the user’s country.

sources

string

List of sources the user has connected to including the connection time in UTC.

created_at

string

The date and time the resource was created.

updated_at

string

The date and time the resource was updated.

Suggest Edits

Delete User

Deletes a user. Deleting a user will permanently remove user data access. Her HIPAA guidelines, data is retained for 7 years and is available upon special request.

DELETE /organizations/:org_id/users/:uid?token=:token

 
deletehttps://api.v2.validic.com/organizations/org_id/users/uid?token=token
curl --request DELETE \
  --url 'https://api.v2.validic.com/organizations//597752338a5da500014a1f9a/users/277040620-wcwflair?token=6f46db36dd6543d2b82d91698fcd0896' \
  --header 'content-type: application/json'
require 'uri'
require 'net/http'

url = URI("https://api.v2.validic.com/organizations//597752338a5da500014a1f9a/users/277040620-wcwflair?token=6f46db36dd6543d2b82d91698fcd0896")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["content-type"] = 'application/json'

response = http.request(request)
puts response.read_body
import requests

url = "https://api.v2.validic.com/organizations//597752338a5da500014a1f9a/users/277040620-wcwflair"

querystring = {"token":"6f46db36dd6543d2b82d91698fcd0896"}

payload = ""
headers = {'content-type': 'application/json'}

response = requests.request("DELETE", url, data=payload, headers=headers, params=querystring)

print(response.text)
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.v2.validic.com/organizations//597752338a5da500014a1f9a/users/277040620-wcwflair?token=6f46db36dd6543d2b82d91698fcd0896"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.v2.validic.com/organizations//597752338a5da500014a1f9a/users/277040620-wcwflair?token=6f46db36dd6543d2b82d91698fcd0896",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
A binary file was returned

You couldn't be authenticated

{
    "id": "598518fd8a5da50001578157",
    "uid": "277040620-wcwflair",
    "marketplace": {
        "token": "c7ff3922e30c048f6e2fbd099ee1358d5871e3861419c16d195b0fc313b09c47",
        "url": "https://syncmydevice.com/?token=c7ff3922e30c048f6e2fbd099ee1358d5871e3861419c16d195b0fc313b09c47"
    },
    "location": {
        "timezone": "America/New_York",
        "country_code": "US"
    },
    "sources": [],
    "created_at": "2017-08-05T01:01:49Z",
    "updated_at": "2017-08-05T01:01:49Z",
    "deleted_at": "2017-08-05T01:16:23Z"
}
{
    "message": "Invalid authentication credentials"
}
{
    "errors": [
        "Token is not authorized to access organization"
    ]
}
Indicates that there was an error with request

Path Params

org_id
string
required

Organization ID provided to you by Validic.

uid
string
required

The UID you defined when provisioning the client.

token
string
required

Developer Key as supplied by Validic.

 

The following table outlines the possible fields which can be expected in the API response.

Name
Type
Description

id

string

Validic user ID

uid

string

Customer’s user identifier.

marketplace > token

Unique marketplace identifier.

marketplace > url

string

The user’s marketplace URL. Requesting this URL with the ‘Accept’ header as ‘application/json’ will provide a JSON representation of the marketplace. Otherwise an HTML representation will be presented.

location > timezone

string

Default user timezone. When retrieving data from a source that provides no UTC offset information the default timezone will be used to calculate the UTC offset.

location > country_code

string

User’s country identified as a two character country code using the ISO 3166-1 standard. Validic uses this information for integrations that provide data access based upon the user’s country.

sources

string

List of sources the user has connected to including the connection time in UTC.

created_at

string

The date and time the resource was created.

updated_at

string

The date and time the resource was updated.

deleted_at

string

The date and time the resource was deleted.

Suggest Edits

Refresh Marketplace Token

Generates a new Marketplace token and URL for the user. A user's existing connected sources are not impacted. Any previous Marketplace tokens or URLs persisted by the customer will need to be updated.

POST /organizations/:org_id/users/:uid/marketplace?token=:token

 
posthttps://api.v2.validic.com/organizations/org_id/users/uid/marketplace?token=token
curl --request POST \
  --url 'https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/marketplace?token=6f46db36dd6543d2b82d91698fcd0896' \
  --header 'content-type: application/json'
require 'uri'
require 'net/http'

url = URI("https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/marketplace?token=6f46db36dd6543d2b82d91698fcd0896")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'

response = http.request(request)
puts response.read_body
import requests

url = "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/marketplace"

querystring = {"token":"6f46db36dd6543d2b82d91698fcd0896"}

payload = ""
headers = {'content-type': 'application/json'}

response = requests.request("POST", url, data=payload, headers=headers, params=querystring)

print(response.text)
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/marketplace?token=6f46db36dd6543d2b82d91698fcd0896"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/marketplace?token=6f46db36dd6543d2b82d91698fcd0896",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
PUT /organizations/597752338a5da500014a1f9a/users/277040620-sel?token=6f46db36dd6543d2b82d91698fcd0896 HTTP/1.1
Host: api.v2.validic.com
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: 1eee6c40-8268-6661-3bf7-3b9ba5d10a95

{
  "location": {
    "timezone": "America/New_York",
    "country_code": "US"
  }
}
A binary file was returned

You couldn't be authenticated

{
    "marketplace": {
        "token": "17f3aa037e431cc9bc40a94393d38d108d344e7a1bb0a057dbe2359cef8bcd31",
        "url": "https://syncmydevice.com/?token=17f3aa037e431cc9bc40a94393d38d108d344e7a1bb0a057dbe2359cef8bcd31"
    }
}
{
    "message": "Invalid authentication credentials"
}
{
    "errors": [
        "Token is not authorized to access organization"
    ]
}
Indicates that there was an error with request

Path Params

org_id
string
required

Organization ID provided to you by Validic.

uid
string
required

The UID you defined when provisioning the client.

token
string
required

Developer Key as supplied by Validic.

 

Response Fields

The following table outlines the possible fields which can be expected in the API response.

Name
Type
Description

marketplace > token

string

Unique marketplace identifier.

marketplace > url

string

The user’s marketplace URL. Requesting this URL with the ‘Accept’ header as ‘application/json’ will provide a JSON representation of the marketplace. Otherwise an HTML representation will be presented.

Suggest Edits

Summaries

Returns a list of summaries for a given user.

GET /organizations/:org_id/users/:uid/summaries

 
gethttps://api.v2.validic.com/organizations/org_id/users/uid/summaries?token=token
curl --request GET \
  --url 'https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/summaries?start_date=2017-03-29&token=6f46db36dd6543d2b82d91698fcd0896'
require 'uri'
require 'net/http'

url = URI("https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/summaries?start_date=2017-03-29&token=6f46db36dd6543d2b82d91698fcd0896")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
import requests

url = "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/summaries"

querystring = {"start_date":"2017-03-29","token":"6f46db36dd6543d2b82d91698fcd0896"}

response = requests.request("GET", url, params=querystring)

print(response.text)
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/summaries?start_date=2017-03-29&token=6f46db36dd6543d2b82d91698fcd0896"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/summaries?start_date=2017-03-29&token=6f46db36dd6543d2b82d91698fcd0896",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
A binary file was returned

You couldn't be authenticated

{
    "data": [
        {
            "id": "563da205bf8fe47736cba157345e31b6",
            "type": "summary",
            "user": {
                "uid": "277040620-sel",
                "user_id": "597769108a5da500014a1fa8",
                "organization_id": "597752338a5da500014a1f9a"
            },
            "log_id": "2017-07-26",
            "source": {
                "type": "fitbit"
            },
            "metrics": [
                {
                    "type": "basal_energy_burned",
                    "unit": "kcal",
                    "value": 0,
                    "origin": "device"
                }
            ],
            "version": "1.0",
            "category": "daily",
            "checksum": "116007cf0a08ad70a115145c982b29d5",
            "end_time": "2017-07-27T03:59:59Z",
            "segments": [],
            "created_at": "2017-07-26T00:09:50.931Z",
            "deleted_at": null,
            "start_time": "2017-07-26T04:00:00Z",
            "user_notes": [],
            "utc_offset": -14400,
            "offset_origin": "profile"
        }
    ]
}
{
    "message": "Invalid authentication credentials"
}
{
    "errors": [
        "Token is not authorized to access organization"
    ]
}
Indicates that there was an error with request

Path Params

org_id
string
required

Organization ID provided to you by Validic.

uid
string
required

The UID you defined when provisioning the client.

token
string
required

Developer Key as supplied by Validic.

Query Params

start_date
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
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
string

Used to filter records to source(s). Example: “...?source=fitbit,garmin” or “...?source=fitbit”

 

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 id for 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.

category

string

The category of the summary. Valid values: daily.

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.

Suggest Edits

Workouts

Returns a list of workouts for a given user.

GET /organizations/:org_id/users/:uid/workouts

 
gethttps://api.v2.validic.com/organizations/org_id/users/uid/workouts?token=token
curl --request GET \
  --url 'https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/workouts?token=6f46db36dd6543d2b82d91698fcd0896'
require 'uri'
require 'net/https'

url = URI("https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/workouts?token=6f46db36dd6543d2b82d91698fcd0896")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["content-type"] = 'application/json'

response = http.request(request)
puts response.read_body
import requests

url = "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/workouts"

querystring = {"token":"6f46db36dd6543d2b82d91698fcd0896"}

response = requests.request("GET", url, params=querystring)

print(response.text)
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/workouts?token=6f46db36dd6543d2b82d91698fcd0896"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/workouts?token=6f46db36dd6543d2b82d91698fcd0896",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
A binary file was returned

You couldn't be authenticated

{  
   "data":[  
      {  
         "id":"1054ab5dc1c0721ba3f54cb5b5b2d7a5",
         "name":"Weight Lifting",
         "type":"workout",
         "user":{  
            "uid":"277040620-sel",
            "user_id":"597769108a5da500014a1fa8",
            "organization_id":"597752338a5da500014a1f9a"
         },
         "log_id":"qFouZtKHRpNYtkRmeyi4MELcPxTR-dXn",
         "source":{  
            "type":"jawbone"
         },
         "metrics":[  
            {  
               "type":"active_duration",
               "unit":"s",
               "value":0.0,
               "origin":"unknown"
            },
            {  
               "type":"basal_energy_burned",
               "unit":"kcal",
               "value":98.9841459358,
               "origin":"unknown"
            },
            {  
               "type":"distance",
               "unit":"m",
               "value":0.0,
               "origin":"unknown"
            },
            {  
               "type":"energy_burned",
               "unit":"kcal",
               "value":1164.0,
               "origin":"unknown"
            },
            {  
               "type":"steps",
               "unit":"count",
               "value":0,
               "origin":"unknown"
            }
         ],
         "version":"1.0",
         "category":"other",
         "checksum":"6ae43604057e2f61e9d06384c6c78a39",
         "end_time":"2017-07-25T20:24:19Z",
         "segments":[  

         ],
         "created_at":"2017-07-25T20:24:40.869Z",
         "deleted_at":null,
         "start_time":"2017-07-25T19:24:19Z",
         "user_notes":[  

         ],
         "utc_offset":-14400,
         "offset_origin":"source"
      }
   ]
}
{
    "message": "Invalid authentication credentials"
}
{
    "errors": [
        "Token is not authorized to access organization"
    ]
}
Indicates that there was an error with request

Path Params

org_id
string
required

Organization ID provided to you by Validic.

uid
string
required

The UID you defined when provisioning the client.

token
string
required

Developer Key as supplied by Validic.

Query Params

start_date
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
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
string

Used to filter records to source(s). Example: “...?source=fitbit,garmin” or “...?source=fitbit”

 

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 id for 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.

category

string

The category of the workout. Valid values: biking, cardio, running, strength, swimming, walking, other.

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.

Suggest Edits

Measurements

Returns a list of measurements for a given user

GET /organizations/:org_id/users/:uid/measurements

 
gethttps://api.v2.validic.com/organizations/org_id/users/uid/measurements?token=token
curl --request GET \
  --url 'https://api.v2.validic.com/organizations/59b02bbdfSample0001e13e75/users/vpt12345sp/measurements?token=6f46db36d54sample91698fcd0896'
require 'uri'
require 'net/http'

url = URI("https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/demotestuser1/measurements?token=6f46db36dd6543d2b82d91698fcd0896")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
import requests

url = "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/demotestuser1/measurements"

querystring = {"token":"6f46db36dd6543d2b82d91698fcd0896"}

response = requests.request("GET", url, params=querystring)

print(response.text)
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/demotestuser1/measurements?token=6f46db36dd6543d2b82d91698fcd0896"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/demotestuser1/measurements?token=6f46db36dd6543d2b82d91698fcd0896",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
A binary file was returned

You couldn't be authenticated

{
    "data": [
        {
            "checksum": "34ab64755a60139b164430d8c209f33a",
            "created_at": "2017-10-23T19:31:18.950Z",
            "deleted_at": null,
            "end_time": "2017-10-23T04:00:00Z",
            "id": "793b24594992f0f72f2afd48f20d6389",
            "log_id": "x139fe5e-59ed6940",
            "metrics": [
                {
                    "type": "body_weight",
                    "origin": "unknown",
                    "unit": "kg",
                    "value": 57.832
                }
            ],
            "offset_origin": "source",
            "source": {
                "type": "garmin",
                "device": null
            },
            "start_time": "2017-10-23T04:00:00Z",
            "type": "measurement",
            "user": {
                "organization_id": "59b02bbdfSample0001e13e75",
                "user_id": "59b02bdef758800001e13e8c",
                "uid": "vpt12345sp"
            },
            "user_notes": [],
            "utc_offset": -14400,
            "version": "1.0"
        }
    ]
}
{
    "message": "Invalid authentication credentials"
}
{
    "errors": [
        "Token is not authorized to access organization"
    ]
}
Indicates that there was an error with request

Path Params

org_id
string
required

Organization ID provided to you by Validic.

uid
string
required

The UID you defined when provisioning the client.

token
string
required

Developer Key as supplied by Validic.

Query Params

start_date
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
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
string

Used to filter records to source(s). Example: “...?source=fitbit,garmin” or “...?source=fitbit”

 

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 id for 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.

Suggest Edits

Nutrition

Returns a list of nutrition for specified user
GET /organizations/:org_id/users/:uid/nutrition

 
gethttps://api.v2.validic.com/organizations/org_id/users/uid/nutrition?token=token
curl --request GET \
  --url 'https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/demotestuser1/nutrition?token=6f46db36dd6543d2b82d91698fcd0896'
require 'uri'
require 'net/http'

url = URI("https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/demotestuser1/nutrition?token=6f46db36dd6543d2b82d91698fcd0896")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
import requests

url = "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/demotestuser1/nutrition"

querystring = {"token":"6f46db36dd6543d2b82d91698fcd0896"}

response = requests.request("GET", url, params=querystring)

print(response.text)
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/demotestuser1/nutrition?token=6f46db36dd6543d2b82d91698fcd0896"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/demotestuser1/nutrition?token=6f46db36dd6543d2b82d91698fcd0896",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
A binary file was returned

You couldn't be authenticated

{
    "data": [
        {
            "id": "8fda25b831bb334b53c5b2ab3a7a7732",
            "name": "Banana, Caesar Salad with Romaine and Coffee",
            "type": "nutrition",
            "user": {
                "uid": "demotestuser1",
                "user_id": "58dbc8668a5da50001e6b7c7",
                "customer_id": "5953eb328a5da50001379e4e",
                "organization_id": "5953eb328a5da50001379e4e"
            },
            "log_id": "nzi_7fYj9yavkQgwsF2J5sd2ZoCreKp4",
            "source": {
                "type": "jawbone"
            },
            "metrics": [
                {
                    "type": "carbohydrate",
                    "unit": "g",
                    "value": 10.76,
                    "origin": "manual"
                },
                {
                    "type": "cholesterol",
                    "unit": "mg",
                    "value": 43,
                    "origin": "manual"
                },
                {
                    "type": "dietary_fiber",
                    "unit": "g",
                    "value": 2,
                    "origin": "manual"
                },
                {
                    "type": "energy_consumed",
                    "unit": "kcal",
                    "value": 200,
                    "origin": "manual"
                },
                {
                    "type": "protein",
                    "unit": "g",
                    "value": 5.81,
                    "origin": "manual"
                },
                {
                    "type": "saturated_fat",
                    "unit": "g",
                    "value": 2.89,
                    "origin": "manual"
                },
                {
                    "type": "sodium",
                    "unit": "mg",
                    "value": 284,
                    "origin": "manual"
                },
                {
                    "type": "sugars",
                    "unit": "g",
                    "value": 3.34,
                    "origin": "manual"
                },
                {
                    "type": "unsaturated_fat",
                    "unit": "g",
                    "value": 11.774,
                    "origin": "manual"
                }
            ],
            "version": "1.0",
            "category": "meal",
            "checksum": "ea56d9e4af2b81486ef639738a9cbe4c",
            "end_time": "2017-08-06T16:20:00Z",
            "segments": [],
            "created_at": "2017-08-07T15:30:03.773Z",
            "deleted_at": null,
            "start_time": "2017-08-06T16:20:00Z",
            "user_notes": [],
            "utc_offset": -14400,
            "offset_origin": "source"
        }
    ]
}
{
    "message": "Invalid authentication credentials"
}
{
    "errors": [
        "Token is not authorized to access organization"
    ]
}
Indicates that there was an error with request

Path Params

org_id
string
required

Organization ID provided to you by Validic.

uid
string
required

The UID you defined when provisioning the client.

token
string
required

Developer Key as supplied by Validic.

Query Params

start_date
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
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
string

Used to filter records to source(s). Example: “...?source=fitbit,garmin” or “...?source=fitbit”

 

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 id for 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.

category

string

The category of the meal. Valid values: food, meal, other.

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.

Suggest Edits

Sleep

Returns a list of sleep records for a given user
GET /organizations/:org_id/users/:uid/sleep

 
gethttps://api.v2.validic.com/organizations/org_id/users/uid/sleep?token=token
curl --request GET \
  --url 'https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/demotestuser1/sleep?token=6f46db36dd6543d2b82d91698fcd0896'
require 'uri'
require 'net/http'

url = URI("https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/demotestuser1/sleep?token=6f46db36dd6543d2b82d91698fcd0896")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
import requests

url = "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/demotestuser1/sleep"

querystring = {"token":"6f46db36dd6543d2b82d91698fcd0896"}

response = requests.request("GET", url, params=querystring)

print(response.text)
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/demotestuser1/sleep?token=6f46db36dd6543d2b82d91698fcd0896"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/demotestuser1/sleep?token=6f46db36dd6543d2b82d91698fcd0896",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
A binary file was returned

You couldn't be authenticated


{
  "data": [
    {
      "id": "a481fd92c3c3f6f5a1e671f2504b6a61",
      "type": "sleep",
      "user": {
        "uid": "demotestuser1",
        "user_id": "58dbc86SAMPLE001e6b7c7",
        "organization_id": "58cb5SAMPLEda50001f75db3"
      },
      "log_id": "14211334061",
      "source": {
        "type": "fitbit"
      },
      "metrics": [
        {
          "type": "awake_count",
          "unit": "count",
          "value": 2,
          "origin": "unknown"
        },
        {
          "type": "awake_duration",
          "unit": "s",
          "value": 1680,
          "origin": "unknown"
        },
        {
          "type": "sleep_score",
          "unit": "percent",
          "value": 93,
          "origin": "unknown"
        },
        {
          "type": "time_to_fall_asleep",
          "unit": "s",
          "value": 0,
          "origin": "unknown"
        },
        {
          "type": "restless_count",
          "unit": "count",
          "value": 16,
          "origin": "unknown"
        },
        {
          "type": "in_bed_duration",
          "unit": "s",
          "value": 23160,
          "origin": "unknown"
        }
      ],
      "user_notes": [],
      "version": "1.0",
      "checksum": "70279a488188bad1bc62306b818d9621",
      "end_time": "2017-03-29T11:36:00Z",
      "created_at": "2017-03-29T14:54:03.548Z",
      "start_time": "2017-03-29T05:10:00Z",
      "utc_offset": -14400,
      "offset_origin": "profile"
    }
  ]
}
{
    "message": "Invalid authentication credentials"
}
{
    "errors": [
        "Token is not authorized to access organization"
    ]
}
Indicates that there was an error with request

Path Params

org_id
string
required

Organization ID provided to you by Validic.

uid
string
required

The UID you defined when provisioning the client.

token
string
required

Developer Key as supplied by Validic.

Query Params

start_date
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
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
string

Used to filter records to source(s). Example: “...?source=fitbit,garmin” or “...?source=fitbit”

 

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 id for 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.

Suggest Edits

Create a Stream

Before connecting to the Stream endpoint, a customer will need to create a stream. Validic allows a customer to create up to 5 streams (note that this number is the number of streams, not the number of client connections to the stream). Attempting to create more than the allowed number will result in an error. Please note that optional filters need to be assigned when creating a stream. This allows Validic to apply the filters for each client that connects to the created stream’s connect endpoint, ensuring all clients receive a consistent view of the stream.

 
posthttps://streams.v2.validic.com/streams?token=token
POST https://streams.v2.validic.com/streams?token=6f46db3SAMPLEb82d91698fcd0896

{
  "name": "customer_meaningful_name",
  "start_date": "2017-01-01",
  "resource_filter": ["summary", "measurement"]
}
curl --request POST \
  --url 'https://streams.v2.validic.com/streams?token=6f46db36dd6543d2b82d91698fcd0896' \
  --header 'content-type: application/json' \
  --data '{
  "name": "customer-meaningful-name",
  "start_date": "2017-07-25",
  "resource_filter": ["summary", "measurement"]
}'
require 'uri'
require 'net/http'

url = URI("https://streams.v2.validic.com/streams?token=6f46db36dd6543d2b82d91698fcd0896")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"name\": \"customer-meaningful-name\",\n  \"start_date\": \"2017-07-25\",\n  \"resource_filter\": [\"summary\", \"measurement\"]\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://streams.v2.validic.com/streams"

querystring = {"token":"6f46db36dd6543d2b82d91698fcd0896"}

payload = "{\n  \"name\": \"customer-meaningful-name\",\n  \"start_date\": \"2017-07-25\",\n  \"resource_filter\": [\"summary\", \"measurement\"]\n}"
headers = {'content-type': 'application/json'}

response = requests.request("POST", url, data=payload, headers=headers, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://streams.v2.validic.com/streams?token=6f46db36dd6543d2b82d91698fcd0896",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n  \"name\": \"customer-meaningful-name\",\n  \"start_date\": \"2017-07-25\",\n  \"resource_filter\": [\"summary\", \"measurement\"]\n}",
  CURLOPT_HTTPHEADER => array(
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://streams.v2.validic.com/streams?token=6f46db36dd6543d2b82d91698fcd0896"

	payload := strings.NewReader("{\n  \"name\": \"customer-meaningful-name\",\n  \"start_date\": \"2017-07-25\",\n  \"resource_filter\": [\"summary\", \"measurement\"]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
A binary file was returned

You couldn't be authenticated

{
    "id": "59778dSAMPLE70001565a2d",
    "name": "customer_meaningful_name",
    "resource_filter": [
        "summary",
        "measurement"
    ],
    "start_date": "2017-07-25",
    "group": "stream_59778d430b11e70001565a2d",
    "members": 0,
    "created_at": "2017-07-25T18:26:11Z",
    "updated_at": "2017-07-25T18:26:11Z"
}

Path Params

token
string
required

Developer Key as supplied by Validic.

Body Params

name
string
required

A unique name for the stream.

start_date
string
resource_filter
string

Optional resource filter that is applied which will only send events if the event resource type is in the provided list. Supported Values: measurement, nutrition, sleep, summary, workout

 

HTTP Response Status

Response Code
Description

201 (Created)

Indicates the request was received and the object was created successfully.

422 (Unprocessable Entity)

An error occurred and an error response has been sent with details.

Response Field Descriptions

id

string

Unique identifier for the stream.

name

string

The name of the stream provided by the customer.

group

string

Validic name for the stream.

members

integer

The number of clients currently connected.

start_date

string

Only events with start times on or after this field are sent.

resource_filter

array<string>

Only events with resource types included in this list are sent.

created_at

string

The date and time the resource was created.

updated_at

string

The date and time the resource was updated.

Suggest Edits

Get a Stream

Returns a list of customer streams for the authenticated customer. The streams are returned sorted by creation date with the most recent streams appearing first.m.

 
gethttps://streams.v2.validic.com/streams?token=token
https://streams.v2.validic.com/streams?token=6f46db36ddSAMPLE2d91698fcd0896&q=&sort=created_at
curl --request GET \
  --url 'https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/?token=6f46db36dd6543d2b82d91698fcd0896' \
  --header 'content-type: application/json'
require 'uri'
require 'net/http'

url = URI("https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/?token=6f46db36dd6543d2b82d91698fcd0896")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["content-type"] = 'application/json'

response = http.request(request)
puts response.read_body
import requests

url = "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/"

querystring = {"token":"6f46db36dd6543d2b82d91698fcd0896"}

headers = {'content-type': 'application/json'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.v2.validic.com/organizations/597752338a5da500014a1f9a/users/277040620-sel/?token=6f46db36dd6543d2b82d91698fcd0896"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://streams.v2.validic.com/streams?token=6f46db36dd6543d2b82d91698fcd0896"

	payload := strings.NewReader("{\n  \"name\": \"customer-meaningful-name\",\n  \"start_date\": \"2017-07-25\",\n  \"resource_filter\": [\"summary\", \"measurement\"]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
A binary file was returned

You couldn't be authenticated

{
  "streams": [
    {
      "id": "5978bfe10b11e70001748518",
      "name": "RDWest",
      "resource_filter": [
        "summary",
        "measurement"
      ],
      "start_date": "2017-07-25",
      "group": "stream_5978bfe10b11e70001748518",
      "members": 0,
      "created_at": "2017-07-26T16:14:25Z",
      "updated_at": "2017-07-26T16:14:25Z"
    },
    {
      "id": "5978b73b0b11e70001645780",
      "name": "hospital2",
      "resource_filter": [],
      "start_date": null,
      "group": "stream_5978b73b0b11e70001645780",
      "members": 0,
      "created_at": "2017-07-26T15:37:31Z",
      "updated_at": "2017-07-26T15:37:31Z"
    },
    {
      "id": "59778d430b11e70001565a2d",
      "name": "hospital1",
      "resource_filter": [
        "summary",
        "measurement"
      ],
      "start_date": "2017-07-25",
      "group": "stream_59778d430b11e70001565a2d",
      "members": 0,
      "created_at": "2017-07-25T18:26:11Z",
      "updated_at": "2017-07-25T18:26:11Z"
    }
  ],
  "meta": {
    "offset": 0,
    "limit": 25,
    "total": 3,
    "sort": [
      "created_at DESC"
    ]
  }
}

Path Params

token
string
required

Developer Key as supplied by Validic.

Query Params

q
string

Used to query for a customer's streams. Ex: ?q=name=a

sort
string

Used to sort the results. Ex: ?sort[]=-created_at or ?sort[]=updated_at

 

HTTP Response Status

Response Code
Description

201 (Created)

Indicates the request was received and the object was created successfully.

Response Field Descriptions

id

string

Unique identifier for the stream.

name

string

The name of the stream provided by the customer.

group

string

Validic name for the stream.

members

integer

The number of clients currently connected.

start_date

string

Only events with start times on or after this field are sent.

resource_filter

array<string>

Only events with resource types included in this list are sent.

created_at

string

The date and time the resource was created.

updated_at

string

The date and time the resource was updated.

Suggest Edits

Get a Stream By ID

Returns a list of customer streams for the authenticated customer. The streams are returned sorted by creation date with the most recent streams appearing first.m.

 
gethttps://streams.v2.validic.com/streams/id?token=token
curl --request GET \
  --url 'https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896'
require 'uri'
require 'net/http'

url = URI("https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
import requests

url = "https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b"

querystring = {"token":"6f46db36dd6543d2b82d91698fcd0896"}

response = requests.request("GET", url, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
A binary file was returned

You couldn't be authenticated

{
    "id": "5978dc880b11e700010ae88b",
    "name": "test1223",
    "resource_filter": [],
    "start_date": null,
    "group": "stream_5978dc880b11e700010ae88b",
    "members": 0,
    "created_at": "2017-07-26T18:16:40Z",
    "updated_at": "2017-07-26T18:16:40Z"
}

Path Params

token
string
required

Developer Key as supplied by Validic.

id
string
required

ID of stream defined when the stream was created

 

HTTP Response Status

Response Code
Description

200 (Created)

Indicates the request was received and the object was created successfully.

Response Field Descriptions

id

string

Unique identifier for the stream.

name

string

The name of the stream provided by the customer.

group

string

Validic name for the stream.

members

integer

The number of clients currently connected.

start_date

string

Only events with start times on or after this field are sent.

resource_filter

array<string>

Only events with resource types included in this list are sent.

created_at

string

The date and time the resource was created.

updated_at

string

The date and time the resource was updated.

Suggest Edits

Update a Stream

Returns a list of customer streams for the authenticated customer. The streams are returned sorted by creation date with the most recent streams appearing first.

 
puthttps://streams.v2.validic.com/streams/id?token=token
curl --request PUT \
  --url 'https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896' \
  --header 'content-type: application/json' \
  --data '{
  "name": "WilcoMemorial"
}
require 'uri'
require 'net/http'

url = URI("https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"name\": \"WilcoMemorial\"\n}\n"

response = http.request(request)
puts response.read_body
import requests

url = "https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b"

querystring = {"token":"6f46db36dd6543d2b82d91698fcd0896"}

payload = "{\n  \"name\": \"WilcoMemorial\"\n}\n"
headers = {'content-type': 'application/json'}

response = requests.request("PUT", url, data=payload, headers=headers, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\n  \"name\": \"WilcoMemorial\"\n}\n",
  CURLOPT_HTTPHEADER => array(
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896"

	payload := strings.NewReader("{\n  \"name\": \"WilcoMemorial\"\n}\n")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
A binary file was returned

You couldn't be authenticated

{
    "id": "5978dc880b11e700010ae88b",
    "name": "WilcoMemorial",
    "resource_filter": [],
    "start_date": null,
    "group": "stream_5978dc880b11e700010ae88b",
    "members": 0,
    "created_at": "2017-07-26T18:16:40Z",
    "updated_at": "2017-08-04T16:38:22Z"
}

Path Params

token
string
required

Developer Key as supplied by Validic.

id
string
required

ID of stream defined when the stream was created

Body Params

name
string
required

A unique name for the stream.

 

HTTP Response Status

Response Code
Description

200 (Created)

Indicates the request was received and the object was created successfully.

422 (Unprocessable Entity)

An error occurred and an error response has been sent with details.

Response Field Descriptions

id

string

Unique identifier for the stream.

name

string

The name of the stream provided by the customer.

group

string

Validic name for the stream.

members

integer

The number of clients currently connected.

start_date

string

Only events with start times on or after this field are sent.

resource_filter

array<string>

Only events with resource types included in this list are sent.

created_at

string

The date and time the resource was created.

updated_at

string

The date and time the resource was updated.

Suggest Edits

Delete a Stream

Deletes a stream. Once a stream has been deleted it cannot be restored. You may create a new stream.

 
deletehttps://streams.v2.validic.com/streams/id?token=token
curl --request DELETE \
  --url 'https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896' \
  --header 'content-type: application/json'
require 'uri'
require 'net/http'

url = URI("https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["content-type"] = 'application/json'

response = http.request(request)
puts response.read_body
import requests

url = "https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b"

querystring = {"token":"6f46db36dd6543d2b82d91698fcd0896"}

payload = ""
headers = {'content-type': 'application/json'}

response = requests.request("DELETE", url, data=payload, headers=headers, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
A binary file was returned

You couldn't be authenticated

{
    "id": "5978dc880b11e700010ae88b",
    "name": "WilcoMemorial",
    "resource_filter": [],
    "start_date": null,
    "group": "stream_5978dc880b11e700010ae88b",
    "members": 0,
    "created_at": "2017-07-26T18:16:40Z",
    "updated_at": "2017-08-04T16:38:22Z",
    "deleted_at": "2017-08-04T17:02:11Z"
}

Path Params

token
string
required

Developer Key as supplied by Validic.

id
string
required

ID of stream defined when the stream was created

 

HTTP Response Status

Response Code
Description

200 (Ok)

Indicates the request was received and the object was deleted successfully.

404 (Not Found)

Indicates that the stream could not be found.

Response Field Descriptions

id

string

Unique identifier for the stream.

name

string

The name of the stream provided by the customer.

group

string

Validic name for the stream.

members

integer

The number of clients currently connected.

start_date

string

Only events with start times on or after this field are sent.

resource_filter

array<string>

Only events with resource types included in this list are sent.

created_at

string

The date and time the resource was created.

updated_at

string

The date and time the resource was updated.

Conventional HTTP response codes are used to indicate success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, a charge failed, etc.), and codes in the 5xx range indicate a server error.

Attributes

errors

A array of human-readable message giving more details about the error.

HTTP Status Code Summary

Code
Description

200 - OK

Everything worked as expected.

400 - Bad Request

Invalid request headers.

401 - Unauthorized

No valid API key provided.

402 - Request Failed

No valid API key provided.

404 - Not Found

No valid API key provided.

50n - Server Error

Something went wrong on server side

Example Error

{
  "errors": [
    "unable to find organization for requested id."
  ]
}
{
  "errors": {
    "type": [
      "invalid source type"
    ]
  }
}
Suggest Edits

API Features

How to work with the Validic APIs

 

The following guides will help you understand how to use various features found in the Inform APIs. This section is found in the Getting Started Guide, however, we've listed them here for your convenience.