Update a test result
curl --request PATCH \
--url https://b.anny.co/api/v1/test-results/{test-result-id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"id": "b3a680ad-6001-4593-b192-4e52ee31cc66",
"type": "test-results",
"attributes": {
"batch_number": "123",
"result": "Negativ",
"custom_entry_map": {
"68bd3189-cc94-452c-a007-e97f1fe7382d": {
"value": "10,5",
"label": "Ct-Wert"
}
}
},
"relationships": {}
}
}
'import requests
url = "https://b.anny.co/api/v1/test-results/{test-result-id}"
payload = { "data": {
"id": "b3a680ad-6001-4593-b192-4e52ee31cc66",
"type": "test-results",
"attributes": {
"batch_number": "123",
"result": "Negativ",
"custom_entry_map": { "68bd3189-cc94-452c-a007-e97f1fe7382d": {
"value": "10,5",
"label": "Ct-Wert"
} }
},
"relationships": {}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
id: 'b3a680ad-6001-4593-b192-4e52ee31cc66',
type: 'test-results',
attributes: {
batch_number: '123',
result: 'Negativ',
custom_entry_map: {'68bd3189-cc94-452c-a007-e97f1fe7382d': {value: '10,5', label: 'Ct-Wert'}}
},
relationships: {}
}
})
};
fetch('https://b.anny.co/api/v1/test-results/{test-result-id}', 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://b.anny.co/api/v1/test-results/{test-result-id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'id' => 'b3a680ad-6001-4593-b192-4e52ee31cc66',
'type' => 'test-results',
'attributes' => [
'batch_number' => '123',
'result' => 'Negativ',
'custom_entry_map' => [
'68bd3189-cc94-452c-a007-e97f1fe7382d' => [
'value' => '10,5',
'label' => 'Ct-Wert'
]
]
],
'relationships' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+json"
],
]);
$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://b.anny.co/api/v1/test-results/{test-result-id}"
payload := strings.NewReader("{\n \"data\": {\n \"id\": \"b3a680ad-6001-4593-b192-4e52ee31cc66\",\n \"type\": \"test-results\",\n \"attributes\": {\n \"batch_number\": \"123\",\n \"result\": \"Negativ\",\n \"custom_entry_map\": {\n \"68bd3189-cc94-452c-a007-e97f1fe7382d\": {\n \"value\": \"10,5\",\n \"label\": \"Ct-Wert\"\n }\n }\n },\n \"relationships\": {}\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://b.anny.co/api/v1/test-results/{test-result-id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"id\": \"b3a680ad-6001-4593-b192-4e52ee31cc66\",\n \"type\": \"test-results\",\n \"attributes\": {\n \"batch_number\": \"123\",\n \"result\": \"Negativ\",\n \"custom_entry_map\": {\n \"68bd3189-cc94-452c-a007-e97f1fe7382d\": {\n \"value\": \"10,5\",\n \"label\": \"Ct-Wert\"\n }\n }\n },\n \"relationships\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/test-results/{test-result-id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n \"data\": {\n \"id\": \"b3a680ad-6001-4593-b192-4e52ee31cc66\",\n \"type\": \"test-results\",\n \"attributes\": {\n \"batch_number\": \"123\",\n \"result\": \"Negativ\",\n \"custom_entry_map\": {\n \"68bd3189-cc94-452c-a007-e97f1fe7382d\": {\n \"value\": \"10,5\",\n \"label\": \"Ct-Wert\"\n }\n }\n },\n \"relationships\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "test-results",
"id": "b3a680ad-6001-4593-b192-4e52ee31cc66",
"attributes": {
"result": "Negativ",
"batch_number": "123",
"test_type": null,
"conducted_at": "2022-01-04T17:09:47+00:00",
"created_at": "2022-01-04T13:29:35+00:00",
"updated_at": "2022-01-04T17:09:47+00:00",
"custom_entry_map": {
"68bd3189-cc94-452c-a007-e97f1fe7382d": {
"value": "10,5",
"formatted_value": "10,5",
"label": "Ct-Wert"
}
}
},
"relationships": {
"test": {
"data": {
"type": "tests",
"id": "bbb2ffd6-bbec-4754-96b9-fc2d2825abb6"
}
},
"tester": {
"data": {
"type": "users",
"id": "9"
}
}
},
"links": {
"self": "https://b.staging.anny.co/api/v1/test-results/b3a680ad-6001-4593-b192-4e52ee31cc66"
},
"meta": {
"certificate_url": "https://b.staging.anny.co/downloads/test-certificate/b3a680ad-6001-4593-b192-4e52ee31cc66?locale=en&show_validity=0",
"has_secret": true,
"cwa_possible_covid_test_kits": []
}
},
"included": [
{
"type": "tests",
"id": "bbb2ffd6-bbec-4754-96b9-fc2d2825abb6",
"attributes": {
"name": "SARS-CoV-2-RT-PCR-Test",
"result_options": [
"Positiv",
"Negativ"
],
"auto_result": null,
"auto_result_delay": 30,
"certificate_body": "<p><strong>Wichtige Hinweise bei positivem Testergebnis:</strong></p><ul><li><p><u>Sie sind verpflichtet, sich bei (positivem Testergebnis) unverzüglich in häusliche Isolation zu begeben</u> (»Absonderung«). Ebenso sollen die Mitglieder Ihres Hausstandes sich unverzüglich absondern. Verlassen Sie Ihre Wohnung oder Ihr Haus nur in medizinischen oder sonstigen Notfällen.</p></li><li><p>Nehmen Sie Kontakt zum zuständigen Gesundheitsamt auf. Das Gesundheitsamt wird eine Isolierung mit einer Reihe von Verhaltensregeln und Hygienemaßnahmen anordnen.</p></li><li><p>Informieren Sie Ihren Arbeitgeber, dass bei Ihnen ein positives Testergebnis vorliegt.</p></li><li><p>Beachten Sie die »Quarantäneregeln«! Halten Sie die wichtigsten Verhaltens- und Hygieneregeln ein, um Ihre Haushaltsangehörigen vor einer Ansteckung zu schützen: Abstand (halten Sie sich, wenn möglich, in einem separaten Zimmer auf), Hygiene, Tragen geeigneter Schutzmasken, regelmäßiges Lüften.</p></li><li><p>Informieren Sie Ihre Kontaktpersonen der vergangenen 14 Tage über Ihre mögliche Infektion. Schreiben Sie Ihre Kontaktpersonen auf! Bei Auftreten von Beschwerden lassen Sie sich umgehend ärztlich beraten.</p></li><li><p>Die häusliche Isolierung beendet ausschließlich das zuständige Gesundheitsamt nach festgelegten Kriterien.</p></li></ul>",
"certificate_footer": "<p>Wer dieses Dokument fälscht oder einen nicht erfolgten Test unrichtig bescheinigt, macht sich nach § 267 StGB der Urkundenfälschung strafbar. Jeder festgestellte Verstoß wird zur Anzeige gebracht.</p>",
"issuing_authority": null,
"doctor_name": null,
"valid_period": 10080,
"test_type_options": [
"§ 2 TestV Kontaktperson, Corona-Warn-App (CWA)",
"§ 3 TestV Ausbruchsgeschehen",
"§ 4 Absatz 1 Nummer 1 und 2 TestV",
"§ 4b Satz 1 TestV Bestätigungs-PCR (nach pos. Schnelltest)",
"§ 4b Satz 2 TestV Varianten-PCR"
],
"default_test_type": null,
"display_tester": true,
"validate_download": true,
"display_resource": true,
"show_validation_code": true,
"send_customer_notification": true,
"print_confirmation_label": false,
"print_customer_label": false,
"result_notifications": null,
"created_at": "2022-01-03T10:12:20+00:00"
}
},
{
"type": "users",
"id": "9",
"attributes": {
"name": "Lucian Holtwiesche",
"first_name": "Lucian",
"given_name": "Lucian",
"email": "lucian.holtwiesche@anny.co",
"mobile": null,
"locale": "de",
"timezone": "Europe/Berlin",
"created_at": "2020-04-14T22:25:46+00:00"
},
"relationships": {
"profile_image": {
"data": null
}
}
}
]
}Service Configuration
Update a test result
PATCH
/
api
/
v1
/
test-results
/
{test-result-id}
Update a test result
curl --request PATCH \
--url https://b.anny.co/api/v1/test-results/{test-result-id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"id": "b3a680ad-6001-4593-b192-4e52ee31cc66",
"type": "test-results",
"attributes": {
"batch_number": "123",
"result": "Negativ",
"custom_entry_map": {
"68bd3189-cc94-452c-a007-e97f1fe7382d": {
"value": "10,5",
"label": "Ct-Wert"
}
}
},
"relationships": {}
}
}
'import requests
url = "https://b.anny.co/api/v1/test-results/{test-result-id}"
payload = { "data": {
"id": "b3a680ad-6001-4593-b192-4e52ee31cc66",
"type": "test-results",
"attributes": {
"batch_number": "123",
"result": "Negativ",
"custom_entry_map": { "68bd3189-cc94-452c-a007-e97f1fe7382d": {
"value": "10,5",
"label": "Ct-Wert"
} }
},
"relationships": {}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
id: 'b3a680ad-6001-4593-b192-4e52ee31cc66',
type: 'test-results',
attributes: {
batch_number: '123',
result: 'Negativ',
custom_entry_map: {'68bd3189-cc94-452c-a007-e97f1fe7382d': {value: '10,5', label: 'Ct-Wert'}}
},
relationships: {}
}
})
};
fetch('https://b.anny.co/api/v1/test-results/{test-result-id}', 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://b.anny.co/api/v1/test-results/{test-result-id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'id' => 'b3a680ad-6001-4593-b192-4e52ee31cc66',
'type' => 'test-results',
'attributes' => [
'batch_number' => '123',
'result' => 'Negativ',
'custom_entry_map' => [
'68bd3189-cc94-452c-a007-e97f1fe7382d' => [
'value' => '10,5',
'label' => 'Ct-Wert'
]
]
],
'relationships' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+json"
],
]);
$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://b.anny.co/api/v1/test-results/{test-result-id}"
payload := strings.NewReader("{\n \"data\": {\n \"id\": \"b3a680ad-6001-4593-b192-4e52ee31cc66\",\n \"type\": \"test-results\",\n \"attributes\": {\n \"batch_number\": \"123\",\n \"result\": \"Negativ\",\n \"custom_entry_map\": {\n \"68bd3189-cc94-452c-a007-e97f1fe7382d\": {\n \"value\": \"10,5\",\n \"label\": \"Ct-Wert\"\n }\n }\n },\n \"relationships\": {}\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://b.anny.co/api/v1/test-results/{test-result-id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"id\": \"b3a680ad-6001-4593-b192-4e52ee31cc66\",\n \"type\": \"test-results\",\n \"attributes\": {\n \"batch_number\": \"123\",\n \"result\": \"Negativ\",\n \"custom_entry_map\": {\n \"68bd3189-cc94-452c-a007-e97f1fe7382d\": {\n \"value\": \"10,5\",\n \"label\": \"Ct-Wert\"\n }\n }\n },\n \"relationships\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/test-results/{test-result-id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n \"data\": {\n \"id\": \"b3a680ad-6001-4593-b192-4e52ee31cc66\",\n \"type\": \"test-results\",\n \"attributes\": {\n \"batch_number\": \"123\",\n \"result\": \"Negativ\",\n \"custom_entry_map\": {\n \"68bd3189-cc94-452c-a007-e97f1fe7382d\": {\n \"value\": \"10,5\",\n \"label\": \"Ct-Wert\"\n }\n }\n },\n \"relationships\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "test-results",
"id": "b3a680ad-6001-4593-b192-4e52ee31cc66",
"attributes": {
"result": "Negativ",
"batch_number": "123",
"test_type": null,
"conducted_at": "2022-01-04T17:09:47+00:00",
"created_at": "2022-01-04T13:29:35+00:00",
"updated_at": "2022-01-04T17:09:47+00:00",
"custom_entry_map": {
"68bd3189-cc94-452c-a007-e97f1fe7382d": {
"value": "10,5",
"formatted_value": "10,5",
"label": "Ct-Wert"
}
}
},
"relationships": {
"test": {
"data": {
"type": "tests",
"id": "bbb2ffd6-bbec-4754-96b9-fc2d2825abb6"
}
},
"tester": {
"data": {
"type": "users",
"id": "9"
}
}
},
"links": {
"self": "https://b.staging.anny.co/api/v1/test-results/b3a680ad-6001-4593-b192-4e52ee31cc66"
},
"meta": {
"certificate_url": "https://b.staging.anny.co/downloads/test-certificate/b3a680ad-6001-4593-b192-4e52ee31cc66?locale=en&show_validity=0",
"has_secret": true,
"cwa_possible_covid_test_kits": []
}
},
"included": [
{
"type": "tests",
"id": "bbb2ffd6-bbec-4754-96b9-fc2d2825abb6",
"attributes": {
"name": "SARS-CoV-2-RT-PCR-Test",
"result_options": [
"Positiv",
"Negativ"
],
"auto_result": null,
"auto_result_delay": 30,
"certificate_body": "<p><strong>Wichtige Hinweise bei positivem Testergebnis:</strong></p><ul><li><p><u>Sie sind verpflichtet, sich bei (positivem Testergebnis) unverzüglich in häusliche Isolation zu begeben</u> (»Absonderung«). Ebenso sollen die Mitglieder Ihres Hausstandes sich unverzüglich absondern. Verlassen Sie Ihre Wohnung oder Ihr Haus nur in medizinischen oder sonstigen Notfällen.</p></li><li><p>Nehmen Sie Kontakt zum zuständigen Gesundheitsamt auf. Das Gesundheitsamt wird eine Isolierung mit einer Reihe von Verhaltensregeln und Hygienemaßnahmen anordnen.</p></li><li><p>Informieren Sie Ihren Arbeitgeber, dass bei Ihnen ein positives Testergebnis vorliegt.</p></li><li><p>Beachten Sie die »Quarantäneregeln«! Halten Sie die wichtigsten Verhaltens- und Hygieneregeln ein, um Ihre Haushaltsangehörigen vor einer Ansteckung zu schützen: Abstand (halten Sie sich, wenn möglich, in einem separaten Zimmer auf), Hygiene, Tragen geeigneter Schutzmasken, regelmäßiges Lüften.</p></li><li><p>Informieren Sie Ihre Kontaktpersonen der vergangenen 14 Tage über Ihre mögliche Infektion. Schreiben Sie Ihre Kontaktpersonen auf! Bei Auftreten von Beschwerden lassen Sie sich umgehend ärztlich beraten.</p></li><li><p>Die häusliche Isolierung beendet ausschließlich das zuständige Gesundheitsamt nach festgelegten Kriterien.</p></li></ul>",
"certificate_footer": "<p>Wer dieses Dokument fälscht oder einen nicht erfolgten Test unrichtig bescheinigt, macht sich nach § 267 StGB der Urkundenfälschung strafbar. Jeder festgestellte Verstoß wird zur Anzeige gebracht.</p>",
"issuing_authority": null,
"doctor_name": null,
"valid_period": 10080,
"test_type_options": [
"§ 2 TestV Kontaktperson, Corona-Warn-App (CWA)",
"§ 3 TestV Ausbruchsgeschehen",
"§ 4 Absatz 1 Nummer 1 und 2 TestV",
"§ 4b Satz 1 TestV Bestätigungs-PCR (nach pos. Schnelltest)",
"§ 4b Satz 2 TestV Varianten-PCR"
],
"default_test_type": null,
"display_tester": true,
"validate_download": true,
"display_resource": true,
"show_validation_code": true,
"send_customer_notification": true,
"print_confirmation_label": false,
"print_customer_label": false,
"result_notifications": null,
"created_at": "2022-01-03T10:12:20+00:00"
}
},
{
"type": "users",
"id": "9",
"attributes": {
"name": "Lucian Holtwiesche",
"first_name": "Lucian",
"given_name": "Lucian",
"email": "lucian.holtwiesche@anny.co",
"mobile": null,
"locale": "de",
"timezone": "Europe/Berlin",
"created_at": "2020-04-14T22:25:46+00:00"
},
"relationships": {
"profile_image": {
"data": null
}
}
}
]
}Autorisierungen
The access token received from the authorization server in the OAuth 2.0 flow.
Pfadparameter
Abfrageparameter
Verfügbare Optionen:
test, tester.profile_image Organization ID
Body
application/vnd.api+json
Show child attributes
Show child attributes
Antwort
200 - application/vnd.api+json
OK
Show child attributes
Show child attributes
⌘I