[block:textarea]
{
"text": "## Request",
"sidebar": true
}
[/block]
[block:code]
{
"codes": [
{
"name": "Example Request",
"code": "POST https://api.validic.com/v1/organizations/{ORGANIZATION_ID}/users.json\\n{\\n \"user\": {\n \"uid\": \":uid\"\n },\n \"access_token\": \":access_token\"\n }",
"language": "http"
}
],
"sidebar": true
}
[/block]
[block:textarea]
{
"text": "## Results",
"sidebar": true
}
[/block]
[block:code]
{
"codes": [
{
"name": 201,
"code": " {\n \"code\": 201,\n \"message\": \"Ok\",\n \"user\": {\n \"_id\": \"{USER_ID}\",\n \"access_token\": \"{USER_ACCESS_TOKEN}\"\n }\n }",
"language": "json",
"status": 201
},
{
"name": 400,
"code": "{}",
"language": "json",
"status": 400
}
],
"sidebar": true
}
[/block]
[block:callout]
{
"type": "info",
"title": "Concept: What is a User?",
"body": "A \"user\" represents one of your end users. For example, if Jane Smith is using your wellness application, you'll need to create a user inside Validic to represent Jane. You may refer to your users as a participant, program member, patient, or subject. In our examples, we'll simply call them users or end users. \n\nRegardless of the name, it's important to remember that in order to prevent violating HIPPA guidelines, you must not send identifying information like name, social security number, date of birth, etc."
}
[/block]
There are two steps to connect your user population to Validic.
Create the user
Ask permission to use their data.
In this section, we'll focus on creating a representation of your user. This is also known as provisioning or registering users.
Provisioning Users
Provisioning users is an ID exchange process which allows user data to remain de-identified, safe and secure. Essentially, this process creates a user profile in our system and provides a unique ID to represent that user.
In the Concept shown above, we talked about an example user named Jane. To create a representation of Jane in Validic, you'd send the following:
[block:code]
{
"codes": [
{
"code": "POST https://api.validic.com/v1/organizations/55f6dd49SAMPLE00088/users.json\\n{\\n \"user\": {\n \"uid\": \"03-K64-F\" \n },\n \"access_token\": \"a86540dfb5d7817166397ba13d3b9SAMPLEdda28eb6efSAMPLE06d9\"\n }",
"language": "http",
"name": "Sample Request"
}
]
}
[/block]
In this example, "uid": "03-K64-F" is the unique identifier that represents Jane in your system.
To successfully make this request:
You must set HTTP headers to “Content-Type: application/json”.
You must include the "uid" field that represents the user ID used in your own systems. We require using non-identifiable IDs instead of emails or names in order to remain compliant with HIPAA/PHI de-identification standards.
You must include the Organization Access Token provided by our Integration Support team.
Validic would respond:
[block:code]
{
"codes": [
{
"code": "{ \n \"code\":201,\n \"message\":\"Ok\",\n \"user\":{ \n \"_id\":\"565c8821SAMPLE7000031\",\n \"uid\":\"03-K64-F\",\n \"access_token\":\"7sJ7fjFZYSamplezBcs\",\n \"profile\":null\n }\n}",
"language": "json",
"name": "Sample Response"
}
]
}
[/block]
Once this POST is made, you've exchanged Jane's ID from your system ("uid": "03-K64-F") for a unique Validic User ID. Moving forward, when you want to ask us about Jane, you'll use that unique Validic User ID (565c8821SAMPLE7000031).
For example:
[block:code]
{
"codes": [
{
"code": "GET https://api.validic.com/v1/organizations/55f6dd49SAMPLE00088/users/565c8821SAMPLE7000031/fitness/latest.json?access_tokena86540dfb5d7817166397ba13d3b9SAMPLEdda28eb6efSAMPLE06d9&start_date={START_DATE}&end_date={END_DATE}",
"language": "http",
"name": "users/565c8821SAMPLE7000031"
}
]
}
[/block]
[block:callout]
{
"type": "danger",
"title": "Tip: Store Response Fields",
"body": "It is important to store the following values from the response:\n * \"_id\"\n * \"access_token\"\n\nThese fields will be used to communicate with Validic in the future."
}
[/block]