The Genetics resource is a simplified version of the genetic model data we store. Today it returns a list of genetic traits for a user.
Overview
Property | Type | Description |
---|---|---|
user_code | String | The global Id of the user |
trait | String | The most likely present trait |
description | String | A description/name of the trait |
possible_traits | String | A list of all the possible values for a specific trait, for easy comparison |
source | String | The name of the originating service |
created_at | Datetime with Timezone | The time the measurement was created on the ZivaCare API server |
updated_at | Datetime with Timezone | The time the measurement was updated on the ZivaCare API server |
Example
GET https://api.zivacare.com/api/v2/human/genetics?access_token=demo
{
"genetics": [
{
"code": "cd0c6ded-de38-4953-b7c3-007e17c519f4",
"user_code": "e231e984-2209-4a10-b634-2257b89c200f",
"description": "Earwax Type",
"trait": "Wet",
"possible_traits": "Dry, Wet",
"created_at": "22014-09-10 11:39:04+00",
"updated_at": "2014-09-10 11:42:04+00"
},
{
"code": "a13a11d5-8219-43d4-882a-dd76b16987fd",
"user_code": "e231e984-2209-4a10-b634-2257b89c200f",
"description": "Eye Color",
"trait": "Likely Blue",
"possible_traits": "Likely Blue",
"created_at": "2014-09-10 11:39:04+00",
"updated_at": "2014-09-10 11:40:04+00"
}
],
"total": 2
}
curl -X POST -H 'Content-Type: application/json' https://api.zivacare.com/api/v2/human/genetics?access_token=demo
-d '{ "trait": "brown", "description": "brown", "possible_traits": "test 1", "source": "fitbit" }'
GET https://api.zivacare.com/api/v2/human/genetics/a13a11d5-8219-43d4-882a-dd76b16987fd?access_token=demo
{
"genetic":
{
"code": "cd0c6ded-de38-4953-b7c3-007e17c519f4",
"user_code": "e231e984-2209-4a10-b634-2257b89c200f",
"description": "Earwax Type",
"trait": "Wet",
"possible_traits": "Dry, Wet",
"created_at": "22014-09-10 11:39:04+00",
"updated_at": "2014-09-10 11:42:04+00"
}
}
curl -X PUT -H 'Content-Type: application/json' https://api.zivacare.com/api/v2/human/genetics/a13a11d5-8219-43d4-882a-dd76b16987fd?access_token=demo
-d '{ "trait": "brown", "description": "brown", "possible_traits": "test 1", "source": "fitbit" }'