curl -X POST "$MONICHEK_API/screenings" \
-H "Authorization: Bearer $MONICHEK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"profile": "onboarding_individual",
"subject": {
"type": "person",
"names": [
{
"full": "Ada Okafor"
}
],
"date_of_birth": "string",
"nationalities": [
"string"
],
"identifiers": [
{}
]
},
"options": {
"monitor": true,
"no_cache": true,
"customer_id": "cus_01M3R..."
}
}'
const res = await fetch(`${MONICHEK_API}/screenings`, {
method: "POST",
headers: {
Authorization: `Bearer ${MONICHEK_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"profile": "onboarding_individual",
"subject": {
"type": "person",
"names": [
{
"full": "Ada Okafor"
}
],
"date_of_birth": "string",
"nationalities": [
"string"
],
"identifiers": [
{}
]
},
"options": {
"monitor": true,
"no_cache": true,
"customer_id": "cus_01M3R..."
}
}),
});
const data = await res.json();
import os
import requests
res = requests.post(
f"{os.environ['MONICHEK_API']}/screenings",
headers={"Authorization": f"Bearer {os.environ['MONICHEK_API_KEY']}"},
json={
"profile": "onboarding_individual",
"subject": {
"type": "person",
"names": [
{
"full": "Ada Okafor"
}
],
"date_of_birth": "string",
"nationalities": [
"string"
],
"identifiers": [
{}
]
},
"options": {
"monitor": true,
"no_cache": true,
"customer_id": "cus_01M3R..."
}
},
)
print(res.json())
$ch = curl_init(getenv('MONICHEK_API') . '/screenings');
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',
'subject' => [
'type' => 'person',
'names' => [
[
'full' => 'Ada Okafor',
],
],
'date_of_birth' => 'string',
'nationalities' => [
'string',
],
'identifiers' => [
[],
],
],
'options' => [
'monitor' => true,
'no_cache' => true,
'customer_id' => 'cus_01M3R...',
],
]),
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;