Create observation
curl --request POST \
--url https://api.clinikapi.com/v1/observations \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"code": "<string>",
"patientId": "<string>",
"encounterId": "<string>",
"performerId": "<string>",
"effectiveDateTime": "2023-11-07T05:31:56Z",
"issued": "2023-11-07T05:31:56Z",
"valueQuantity": {
"value": 123,
"unit": "<string>",
"system": "<string>",
"code": "<string>"
},
"valueString": "<string>",
"valueCodeableConcept": {
"system": "<string>",
"code": "<string>",
"display": "<string>"
},
"component": [
{
"code": "<string>",
"valueQuantity": {
"value": 123,
"unit": "<string>"
},
"valueString": "<string>"
}
],
"category": "<string>",
"interpretation": "<string>",
"referenceRange": {
"low": {
"value": 123,
"unit": "<string>"
},
"high": {
"value": 123,
"unit": "<string>"
},
"text": "<string>"
},
"bodySite": "<string>",
"method": "<string>",
"specimenId": "<string>",
"deviceId": "<string>",
"note": "<string>"
}
'import requests
url = "https://api.clinikapi.com/v1/observations"
payload = {
"code": "<string>",
"patientId": "<string>",
"encounterId": "<string>",
"performerId": "<string>",
"effectiveDateTime": "2023-11-07T05:31:56Z",
"issued": "2023-11-07T05:31:56Z",
"valueQuantity": {
"value": 123,
"unit": "<string>",
"system": "<string>",
"code": "<string>"
},
"valueString": "<string>",
"valueCodeableConcept": {
"system": "<string>",
"code": "<string>",
"display": "<string>"
},
"component": [
{
"code": "<string>",
"valueQuantity": {
"value": 123,
"unit": "<string>"
},
"valueString": "<string>"
}
],
"category": "<string>",
"interpretation": "<string>",
"referenceRange": {
"low": {
"value": 123,
"unit": "<string>"
},
"high": {
"value": 123,
"unit": "<string>"
},
"text": "<string>"
},
"bodySite": "<string>",
"method": "<string>",
"specimenId": "<string>",
"deviceId": "<string>",
"note": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
code: '<string>',
patientId: '<string>',
encounterId: '<string>',
performerId: '<string>',
effectiveDateTime: '2023-11-07T05:31:56Z',
issued: '2023-11-07T05:31:56Z',
valueQuantity: {value: 123, unit: '<string>', system: '<string>', code: '<string>'},
valueString: '<string>',
valueCodeableConcept: {system: '<string>', code: '<string>', display: '<string>'},
component: [
{
code: '<string>',
valueQuantity: {value: 123, unit: '<string>'},
valueString: '<string>'
}
],
category: '<string>',
interpretation: '<string>',
referenceRange: {
low: {value: 123, unit: '<string>'},
high: {value: 123, unit: '<string>'},
text: '<string>'
},
bodySite: '<string>',
method: '<string>',
specimenId: '<string>',
deviceId: '<string>',
note: '<string>'
})
};
fetch('https://api.clinikapi.com/v1/observations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.clinikapi.com/v1/observations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'code' => '<string>',
'patientId' => '<string>',
'encounterId' => '<string>',
'performerId' => '<string>',
'effectiveDateTime' => '2023-11-07T05:31:56Z',
'issued' => '2023-11-07T05:31:56Z',
'valueQuantity' => [
'value' => 123,
'unit' => '<string>',
'system' => '<string>',
'code' => '<string>'
],
'valueString' => '<string>',
'valueCodeableConcept' => [
'system' => '<string>',
'code' => '<string>',
'display' => '<string>'
],
'component' => [
[
'code' => '<string>',
'valueQuantity' => [
'value' => 123,
'unit' => '<string>'
],
'valueString' => '<string>'
]
],
'category' => '<string>',
'interpretation' => '<string>',
'referenceRange' => [
'low' => [
'value' => 123,
'unit' => '<string>'
],
'high' => [
'value' => 123,
'unit' => '<string>'
],
'text' => '<string>'
],
'bodySite' => '<string>',
'method' => '<string>',
'specimenId' => '<string>',
'deviceId' => '<string>',
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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"
)
func main() {
url := "https://api.clinikapi.com/v1/observations"
payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"patientId\": \"<string>\",\n \"encounterId\": \"<string>\",\n \"performerId\": \"<string>\",\n \"effectiveDateTime\": \"2023-11-07T05:31:56Z\",\n \"issued\": \"2023-11-07T05:31:56Z\",\n \"valueQuantity\": {\n \"value\": 123,\n \"unit\": \"<string>\",\n \"system\": \"<string>\",\n \"code\": \"<string>\"\n },\n \"valueString\": \"<string>\",\n \"valueCodeableConcept\": {\n \"system\": \"<string>\",\n \"code\": \"<string>\",\n \"display\": \"<string>\"\n },\n \"component\": [\n {\n \"code\": \"<string>\",\n \"valueQuantity\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"valueString\": \"<string>\"\n }\n ],\n \"category\": \"<string>\",\n \"interpretation\": \"<string>\",\n \"referenceRange\": {\n \"low\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"high\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"text\": \"<string>\"\n },\n \"bodySite\": \"<string>\",\n \"method\": \"<string>\",\n \"specimenId\": \"<string>\",\n \"deviceId\": \"<string>\",\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.clinikapi.com/v1/observations")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\",\n \"patientId\": \"<string>\",\n \"encounterId\": \"<string>\",\n \"performerId\": \"<string>\",\n \"effectiveDateTime\": \"2023-11-07T05:31:56Z\",\n \"issued\": \"2023-11-07T05:31:56Z\",\n \"valueQuantity\": {\n \"value\": 123,\n \"unit\": \"<string>\",\n \"system\": \"<string>\",\n \"code\": \"<string>\"\n },\n \"valueString\": \"<string>\",\n \"valueCodeableConcept\": {\n \"system\": \"<string>\",\n \"code\": \"<string>\",\n \"display\": \"<string>\"\n },\n \"component\": [\n {\n \"code\": \"<string>\",\n \"valueQuantity\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"valueString\": \"<string>\"\n }\n ],\n \"category\": \"<string>\",\n \"interpretation\": \"<string>\",\n \"referenceRange\": {\n \"low\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"high\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"text\": \"<string>\"\n },\n \"bodySite\": \"<string>\",\n \"method\": \"<string>\",\n \"specimenId\": \"<string>\",\n \"deviceId\": \"<string>\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clinikapi.com/v1/observations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\",\n \"patientId\": \"<string>\",\n \"encounterId\": \"<string>\",\n \"performerId\": \"<string>\",\n \"effectiveDateTime\": \"2023-11-07T05:31:56Z\",\n \"issued\": \"2023-11-07T05:31:56Z\",\n \"valueQuantity\": {\n \"value\": 123,\n \"unit\": \"<string>\",\n \"system\": \"<string>\",\n \"code\": \"<string>\"\n },\n \"valueString\": \"<string>\",\n \"valueCodeableConcept\": {\n \"system\": \"<string>\",\n \"code\": \"<string>\",\n \"display\": \"<string>\"\n },\n \"component\": [\n {\n \"code\": \"<string>\",\n \"valueQuantity\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"valueString\": \"<string>\"\n }\n ],\n \"category\": \"<string>\",\n \"interpretation\": \"<string>\",\n \"referenceRange\": {\n \"low\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"high\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"text\": \"<string>\"\n },\n \"bodySite\": \"<string>\",\n \"method\": \"<string>\",\n \"specimenId\": \"<string>\",\n \"deviceId\": \"<string>\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"requestId": "<string>",
"issues": [
{
"severity": "<string>",
"code": "<string>",
"diagnostics": "<string>"
}
]
}Observations
Create Observation
POST
/
v1
/
observations
Create observation
curl --request POST \
--url https://api.clinikapi.com/v1/observations \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"code": "<string>",
"patientId": "<string>",
"encounterId": "<string>",
"performerId": "<string>",
"effectiveDateTime": "2023-11-07T05:31:56Z",
"issued": "2023-11-07T05:31:56Z",
"valueQuantity": {
"value": 123,
"unit": "<string>",
"system": "<string>",
"code": "<string>"
},
"valueString": "<string>",
"valueCodeableConcept": {
"system": "<string>",
"code": "<string>",
"display": "<string>"
},
"component": [
{
"code": "<string>",
"valueQuantity": {
"value": 123,
"unit": "<string>"
},
"valueString": "<string>"
}
],
"category": "<string>",
"interpretation": "<string>",
"referenceRange": {
"low": {
"value": 123,
"unit": "<string>"
},
"high": {
"value": 123,
"unit": "<string>"
},
"text": "<string>"
},
"bodySite": "<string>",
"method": "<string>",
"specimenId": "<string>",
"deviceId": "<string>",
"note": "<string>"
}
'import requests
url = "https://api.clinikapi.com/v1/observations"
payload = {
"code": "<string>",
"patientId": "<string>",
"encounterId": "<string>",
"performerId": "<string>",
"effectiveDateTime": "2023-11-07T05:31:56Z",
"issued": "2023-11-07T05:31:56Z",
"valueQuantity": {
"value": 123,
"unit": "<string>",
"system": "<string>",
"code": "<string>"
},
"valueString": "<string>",
"valueCodeableConcept": {
"system": "<string>",
"code": "<string>",
"display": "<string>"
},
"component": [
{
"code": "<string>",
"valueQuantity": {
"value": 123,
"unit": "<string>"
},
"valueString": "<string>"
}
],
"category": "<string>",
"interpretation": "<string>",
"referenceRange": {
"low": {
"value": 123,
"unit": "<string>"
},
"high": {
"value": 123,
"unit": "<string>"
},
"text": "<string>"
},
"bodySite": "<string>",
"method": "<string>",
"specimenId": "<string>",
"deviceId": "<string>",
"note": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
code: '<string>',
patientId: '<string>',
encounterId: '<string>',
performerId: '<string>',
effectiveDateTime: '2023-11-07T05:31:56Z',
issued: '2023-11-07T05:31:56Z',
valueQuantity: {value: 123, unit: '<string>', system: '<string>', code: '<string>'},
valueString: '<string>',
valueCodeableConcept: {system: '<string>', code: '<string>', display: '<string>'},
component: [
{
code: '<string>',
valueQuantity: {value: 123, unit: '<string>'},
valueString: '<string>'
}
],
category: '<string>',
interpretation: '<string>',
referenceRange: {
low: {value: 123, unit: '<string>'},
high: {value: 123, unit: '<string>'},
text: '<string>'
},
bodySite: '<string>',
method: '<string>',
specimenId: '<string>',
deviceId: '<string>',
note: '<string>'
})
};
fetch('https://api.clinikapi.com/v1/observations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.clinikapi.com/v1/observations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'code' => '<string>',
'patientId' => '<string>',
'encounterId' => '<string>',
'performerId' => '<string>',
'effectiveDateTime' => '2023-11-07T05:31:56Z',
'issued' => '2023-11-07T05:31:56Z',
'valueQuantity' => [
'value' => 123,
'unit' => '<string>',
'system' => '<string>',
'code' => '<string>'
],
'valueString' => '<string>',
'valueCodeableConcept' => [
'system' => '<string>',
'code' => '<string>',
'display' => '<string>'
],
'component' => [
[
'code' => '<string>',
'valueQuantity' => [
'value' => 123,
'unit' => '<string>'
],
'valueString' => '<string>'
]
],
'category' => '<string>',
'interpretation' => '<string>',
'referenceRange' => [
'low' => [
'value' => 123,
'unit' => '<string>'
],
'high' => [
'value' => 123,
'unit' => '<string>'
],
'text' => '<string>'
],
'bodySite' => '<string>',
'method' => '<string>',
'specimenId' => '<string>',
'deviceId' => '<string>',
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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"
)
func main() {
url := "https://api.clinikapi.com/v1/observations"
payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"patientId\": \"<string>\",\n \"encounterId\": \"<string>\",\n \"performerId\": \"<string>\",\n \"effectiveDateTime\": \"2023-11-07T05:31:56Z\",\n \"issued\": \"2023-11-07T05:31:56Z\",\n \"valueQuantity\": {\n \"value\": 123,\n \"unit\": \"<string>\",\n \"system\": \"<string>\",\n \"code\": \"<string>\"\n },\n \"valueString\": \"<string>\",\n \"valueCodeableConcept\": {\n \"system\": \"<string>\",\n \"code\": \"<string>\",\n \"display\": \"<string>\"\n },\n \"component\": [\n {\n \"code\": \"<string>\",\n \"valueQuantity\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"valueString\": \"<string>\"\n }\n ],\n \"category\": \"<string>\",\n \"interpretation\": \"<string>\",\n \"referenceRange\": {\n \"low\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"high\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"text\": \"<string>\"\n },\n \"bodySite\": \"<string>\",\n \"method\": \"<string>\",\n \"specimenId\": \"<string>\",\n \"deviceId\": \"<string>\",\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.clinikapi.com/v1/observations")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\",\n \"patientId\": \"<string>\",\n \"encounterId\": \"<string>\",\n \"performerId\": \"<string>\",\n \"effectiveDateTime\": \"2023-11-07T05:31:56Z\",\n \"issued\": \"2023-11-07T05:31:56Z\",\n \"valueQuantity\": {\n \"value\": 123,\n \"unit\": \"<string>\",\n \"system\": \"<string>\",\n \"code\": \"<string>\"\n },\n \"valueString\": \"<string>\",\n \"valueCodeableConcept\": {\n \"system\": \"<string>\",\n \"code\": \"<string>\",\n \"display\": \"<string>\"\n },\n \"component\": [\n {\n \"code\": \"<string>\",\n \"valueQuantity\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"valueString\": \"<string>\"\n }\n ],\n \"category\": \"<string>\",\n \"interpretation\": \"<string>\",\n \"referenceRange\": {\n \"low\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"high\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"text\": \"<string>\"\n },\n \"bodySite\": \"<string>\",\n \"method\": \"<string>\",\n \"specimenId\": \"<string>\",\n \"deviceId\": \"<string>\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clinikapi.com/v1/observations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\",\n \"patientId\": \"<string>\",\n \"encounterId\": \"<string>\",\n \"performerId\": \"<string>\",\n \"effectiveDateTime\": \"2023-11-07T05:31:56Z\",\n \"issued\": \"2023-11-07T05:31:56Z\",\n \"valueQuantity\": {\n \"value\": 123,\n \"unit\": \"<string>\",\n \"system\": \"<string>\",\n \"code\": \"<string>\"\n },\n \"valueString\": \"<string>\",\n \"valueCodeableConcept\": {\n \"system\": \"<string>\",\n \"code\": \"<string>\",\n \"display\": \"<string>\"\n },\n \"component\": [\n {\n \"code\": \"<string>\",\n \"valueQuantity\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"valueString\": \"<string>\"\n }\n ],\n \"category\": \"<string>\",\n \"interpretation\": \"<string>\",\n \"referenceRange\": {\n \"low\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"high\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"text\": \"<string>\"\n },\n \"bodySite\": \"<string>\",\n \"method\": \"<string>\",\n \"specimenId\": \"<string>\",\n \"deviceId\": \"<string>\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"requestId": "<string>",
"issues": [
{
"severity": "<string>",
"code": "<string>",
"diagnostics": "<string>"
}
]
}Authorizations
Your ClinikAPI secret key (clk_live_* or clk_test_*)
Body
application/json
Available options:
registered, preliminary, final, amended, corrected, cancelled When this version was made available
Show child attributes
Show child attributes
Maximum string length:
2000Show child attributes
Show child attributes
Maximum array length:
20Show child attributes
Show child attributes
vital-signs, laboratory, social-history, exam
H (high), L (low), N (normal), A (abnormal), HH, LL
Maximum string length:
10Show child attributes
Show child attributes
Maximum string length:
200Maximum string length:
200Specimen reference
Device reference
Maximum string length:
2000Response
Observation created
⌘I