Posting Covariates
Add covariate data to user
Path Parameters
Name
Type
Description
Headers
Name
Type
Description
Request Body
Name
Type
Description
{ "success": true }// One of the following messages:
{ "message": "Malformed input." }
{ "message": "Step values contain negative value." }
{ "message": "Timestamps ('start' or 'end') are not in UNIX seconds" }
{ "message": "End time greater than start time for a step data point." }Code Sample:
curl --location --request POST "https://cardiogr.am/heart/oauth/users/1/covariates" \
--header "Content-Type: application/json" \
--data "{
\"dateOfBirth\": \"1980-01-01\",
\"height\": \"175\",
\"heightUnit\": \"cm\",
\"weight\": \"70\",
\"weightUnit\": \"kg\",
\"isOnBetaBlocker\": false
}"var settings = {
"url": "https://cardiogr.am/heart/oauth/users/1/covariates",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
"data": "{
\"dateOfBirth\": \"1980-01-01\",
\"height\": \"175\",
\"heightUnit\": \"cm\",
\"weight\": \"70\",
\"weightUnit\": \"kg\",
\"isOnBetaBlocker\": false
}",
};
$.ajax(settings).done(function (response) {
console.log(response);
});Last updated
Was this helpful?