Update a test
curl --request PATCH \
--url https://b.anny.co/api/v1/tests/{test_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"id": "27171876-b570-491b-94c8-d5524bbff284",
"type": "tests",
"attributes": {
"result_notifications": [
{
"id": "ls61vpYe7Y",
"email": "info@gesundheitsamt.de",
"result": "Positiv"
}
]
},
"relationships": {}
}
}
'import requests
url = "https://b.anny.co/api/v1/tests/{test_id}"
payload = { "data": {
"id": "27171876-b570-491b-94c8-d5524bbff284",
"type": "tests",
"attributes": { "result_notifications": [
{
"id": "ls61vpYe7Y",
"email": "info@gesundheitsamt.de",
"result": "Positiv"
}
] },
"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: '27171876-b570-491b-94c8-d5524bbff284',
type: 'tests',
attributes: {
result_notifications: [{id: 'ls61vpYe7Y', email: 'info@gesundheitsamt.de', result: 'Positiv'}]
},
relationships: {}
}
})
};
fetch('https://b.anny.co/api/v1/tests/{test_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/tests/{test_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' => '27171876-b570-491b-94c8-d5524bbff284',
'type' => 'tests',
'attributes' => [
'result_notifications' => [
[
'id' => 'ls61vpYe7Y',
'email' => 'info@gesundheitsamt.de',
'result' => 'Positiv'
]
]
],
'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/tests/{test_id}"
payload := strings.NewReader("{\n \"data\": {\n \"id\": \"27171876-b570-491b-94c8-d5524bbff284\",\n \"type\": \"tests\",\n \"attributes\": {\n \"result_notifications\": [\n {\n \"id\": \"ls61vpYe7Y\",\n \"email\": \"info@gesundheitsamt.de\",\n \"result\": \"Positiv\"\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/tests/{test_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"id\": \"27171876-b570-491b-94c8-d5524bbff284\",\n \"type\": \"tests\",\n \"attributes\": {\n \"result_notifications\": [\n {\n \"id\": \"ls61vpYe7Y\",\n \"email\": \"info@gesundheitsamt.de\",\n \"result\": \"Positiv\"\n }\n ]\n },\n \"relationships\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/tests/{test_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\": \"27171876-b570-491b-94c8-d5524bbff284\",\n \"type\": \"tests\",\n \"attributes\": {\n \"result_notifications\": [\n {\n \"id\": \"ls61vpYe7Y\",\n \"email\": \"info@gesundheitsamt.de\",\n \"result\": \"Positiv\"\n }\n ]\n },\n \"relationships\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "tests",
"id": "27171876-b570-491b-94c8-d5524bbff284",
"attributes": {
"name": "SARS-CoV-2 PoC-Antigen-Test",
"result_options": [
"Positiv",
"Negativ",
"Nicht eindeutig"
],
"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>Lassen Sie einen PCR-Test zur Bestätigung des Verdachts auf eine Infektion mit SARS-CoV 2 durchführen. Sprechen Sie mit Ihrem Arzt über weitere Maßnahmen für Sie selbst und Ihre Kontaktpersonen.</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. <strong>Die häusliche Isolierung endet auch, wenn der nachfolgende PCR-Test negativ sein sollte.</strong></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": 1440,
"test_type_options": [
"Bürgertestung",
"Beschäftigtentestung",
"Einrichtungstestung"
],
"default_test_type": null,
"display_tester": false,
"validate_download": true,
"result_notifications": [
{
"id": "ls61vpYe7Y",
"email": "info@gesundheitsamt.de",
"result": "Positiv"
}
],
"created_at": "2021-10-07T09:50:14+00:00"
},
"links": {
"self": "https://b.anny.co/api/v1/tests/27171876-b570-491b-94c8-d5524bbff284"
}
}
}Service Configuration
Update a test
PATCH
/
api
/
v1
/
tests
/
{test_id}
Update a test
curl --request PATCH \
--url https://b.anny.co/api/v1/tests/{test_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"id": "27171876-b570-491b-94c8-d5524bbff284",
"type": "tests",
"attributes": {
"result_notifications": [
{
"id": "ls61vpYe7Y",
"email": "info@gesundheitsamt.de",
"result": "Positiv"
}
]
},
"relationships": {}
}
}
'import requests
url = "https://b.anny.co/api/v1/tests/{test_id}"
payload = { "data": {
"id": "27171876-b570-491b-94c8-d5524bbff284",
"type": "tests",
"attributes": { "result_notifications": [
{
"id": "ls61vpYe7Y",
"email": "info@gesundheitsamt.de",
"result": "Positiv"
}
] },
"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: '27171876-b570-491b-94c8-d5524bbff284',
type: 'tests',
attributes: {
result_notifications: [{id: 'ls61vpYe7Y', email: 'info@gesundheitsamt.de', result: 'Positiv'}]
},
relationships: {}
}
})
};
fetch('https://b.anny.co/api/v1/tests/{test_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/tests/{test_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' => '27171876-b570-491b-94c8-d5524bbff284',
'type' => 'tests',
'attributes' => [
'result_notifications' => [
[
'id' => 'ls61vpYe7Y',
'email' => 'info@gesundheitsamt.de',
'result' => 'Positiv'
]
]
],
'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/tests/{test_id}"
payload := strings.NewReader("{\n \"data\": {\n \"id\": \"27171876-b570-491b-94c8-d5524bbff284\",\n \"type\": \"tests\",\n \"attributes\": {\n \"result_notifications\": [\n {\n \"id\": \"ls61vpYe7Y\",\n \"email\": \"info@gesundheitsamt.de\",\n \"result\": \"Positiv\"\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/tests/{test_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"id\": \"27171876-b570-491b-94c8-d5524bbff284\",\n \"type\": \"tests\",\n \"attributes\": {\n \"result_notifications\": [\n {\n \"id\": \"ls61vpYe7Y\",\n \"email\": \"info@gesundheitsamt.de\",\n \"result\": \"Positiv\"\n }\n ]\n },\n \"relationships\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/tests/{test_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\": \"27171876-b570-491b-94c8-d5524bbff284\",\n \"type\": \"tests\",\n \"attributes\": {\n \"result_notifications\": [\n {\n \"id\": \"ls61vpYe7Y\",\n \"email\": \"info@gesundheitsamt.de\",\n \"result\": \"Positiv\"\n }\n ]\n },\n \"relationships\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "tests",
"id": "27171876-b570-491b-94c8-d5524bbff284",
"attributes": {
"name": "SARS-CoV-2 PoC-Antigen-Test",
"result_options": [
"Positiv",
"Negativ",
"Nicht eindeutig"
],
"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>Lassen Sie einen PCR-Test zur Bestätigung des Verdachts auf eine Infektion mit SARS-CoV 2 durchführen. Sprechen Sie mit Ihrem Arzt über weitere Maßnahmen für Sie selbst und Ihre Kontaktpersonen.</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. <strong>Die häusliche Isolierung endet auch, wenn der nachfolgende PCR-Test negativ sein sollte.</strong></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": 1440,
"test_type_options": [
"Bürgertestung",
"Beschäftigtentestung",
"Einrichtungstestung"
],
"default_test_type": null,
"display_tester": false,
"validate_download": true,
"result_notifications": [
{
"id": "ls61vpYe7Y",
"email": "info@gesundheitsamt.de",
"result": "Positiv"
}
],
"created_at": "2021-10-07T09:50:14+00:00"
},
"links": {
"self": "https://b.anny.co/api/v1/tests/27171876-b570-491b-94c8-d5524bbff284"
}
}
}Autorisierungen
The access token received from the authorization server in the OAuth 2.0 flow.
Pfadparameter
Abfrageparameter
Organization ID
Body
application/vnd.api+json
Show child attributes
Show child attributes
Antwort
OK
Show child attributes
Show child attributes
⌘I