Handled with bearer token in the headers:
Authorization: Bearer <token> where <token> is the api_key provisioned by Comply Group.
POST /api/v1/received_samples
params = {
"samples": [
{"uid": "123456", "received_at": "2021-09-23T01:45:02Z"},
{"uid": "987654", "received_at": "2021-09-23T01:45:02Z"}
]
}
where uid is the TestResult.sample_uid and received_at is in iso8601 format.
Curl example:
curl -X POST -H "Authorization: Bearer <api_key>" -H "Content-Type: application/json" -d '{"samples":[{"uid": "123456", "received_at": "2021-09-23T01:45:02Z"},{"uid": "987654", "received_at": "2021-09-23T01:45:02Z"}]}' https://staging.covidaware.e.opscare.io/api/v1/received_samples
Response:
{
"samples": [
{"uid": "123456", "quantity": 1},
{"uid": "987654", "quantity": 0}
]
}
where quantity is the number of matching TestResult with that sample_uid.
POST /api/v1/processed_samples
params = {
"samples": [
{
"uid": "ABC123",
"processed_at": "2021-09-23T01:45:02Z",
"sample_assay": "this_field_is_optional",
"sample_ct_value": "this_field_is_optional",
"sample_result": "positive"
}
]
}
where uid is the TestResult.sample_uid and processed_at is in iso8601 format.
Curl example:
curl -X POST -H "Authorization: Bearer <api_key>" -H "Content-Type: application/json" -d '{"samples":[{"uid": "ABC123","processed_at": "2021-09-23T01:45:02Z","sample_assay": "not_sure_what_this_should_be","sample_ct_value": "another_unknown","sample_result": "positive"}]}' https://staging.covidaware.e.opscare.io/api/v1/processed_samples
Response: same as sample received above