Batch screening
Request
Content type: application/json · required
| Field | Type | Required | Description |
|---|---|---|---|
profile |
string | No | — |
subjects |
array of object | No | — |
curl -X POST "$MONICHEK_API/screenings:batch" \
-H "Authorization: Bearer $MONICHEK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"profile": "onboarding_individual",
"subjects": [
{}
]
}'const res = await fetch(`${MONICHEK_API}/screenings:batch`, {
method: "POST",
headers: {
Authorization: `Bearer ${MONICHEK_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"profile": "onboarding_individual",
"subjects": [
{}
]
}),
});
const data = await res.json();import os
import requests
res = requests.post(
f"{os.environ['MONICHEK_API']}/screenings:batch",
headers={"Authorization": f"Bearer {os.environ['MONICHEK_API_KEY']}"},
json={
"profile": "onboarding_individual",
"subjects": [
{}
]
},
)
print(res.json())$ch = curl_init(getenv('MONICHEK_API') . '/screenings:batch');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('MONICHEK_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'profile' => 'onboarding_individual',
'subjects' => [
[],
],
]),
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;Responses
202 Accepted
batch job
application/json
{
"object": "batch_job",
"status": "queued",
"id": "bat_01M3R...",
"total": 1
}