Create batch of verification orders
curl --request POST \
--url https://sandbox.theary.ai/background-check/v1/batches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"orders": [
{
"searchTypes": [
{
"searchType": "EMPLOYMENT",
"externalSearchId": "12345678",
"questionnaireUrl": "https://verify.example.com/form/abc123",
"questionnaireAccessCode": "ACCESS123",
"searchConfig": {
"channels": {
"email": true,
"voice": false,
"preferredChannel": "EMAIL",
"blockedDestinations": [
"hr-noreply@company.com"
]
},
"timing": {
"searchSlaMinutes": 2880,
"outboundWindowMinutes": 120,
"businessHours": {
"timezone": "America/Chicago",
"startTime": "09:00",
"endTime": "16:00",
"allowedDays": [
1,
2,
3,
4,
5
]
}
},
"outbound": {
"maxAttemptsPerMethod": 5,
"maxTotalAttempts": 12,
"cancelOutboundOnTerminalInbound": true,
"contactHints": [
{
"email": "hr@company.com",
"priority": "HIGH"
}
]
},
"research": {
"skipResearch": false
}
}
}
],
"applicant": {
"firstName": "John",
"lastName": "Smith",
"ssn": "123-45-6789",
"birthday": "1990-05-15",
"phone": "+1-555-123-4567",
"email": "john.smith@example.com",
"signedReleaseFileUrl": "https://example.com/signed-release.pdf",
"addresses": [
{
"addressType": "home",
"addressLine1": "456 Oak Avenue",
"addressLine2": null,
"addressCity": "Los Angeles",
"addressState": "CA",
"addressZipCode": "90210",
"addressCountry": "US",
"startDate": "2021-01-01",
"endDate": null
},
{
"addressType": "home",
"addressLine1": "123 Main Street",
"addressLine2": "Apt 4B",
"addressCity": "New York",
"addressState": "NY",
"addressZipCode": "10001",
"addressCountry": "US",
"startDate": "2020-01-01",
"endDate": "2021-01-01"
}
],
"applicantAlias": [
{
"firstName": "Jonathan",
"lastName": "Smith",
"middleName": "Michael",
"suffix": "Jr."
}
]
},
"businessContext": {
"entityName": "Acme Corp",
"appliedJobTitle": "Senior Software Engineer",
"worksiteCity": "San Francisco",
"worksiteState": "CA",
"proposedSalary": 100000,
"positionLevel": "STANDARD",
"securityClearanceRequired": false,
"industrySector": "TECHNOLOGY"
},
"history": {
"employment": [
{
"employerName": "Tech Corp",
"position": "Software Engineer",
"employerLocation": "San Francisco, CA",
"employerEmail": "hr@techcorp.com",
"employerPhone": "+1-555-123-4567",
"startDate": "2020-01-15",
"endDate": "2023-06-30"
}
]
}
},
{
"searchTypes": [
{
"searchType": "EMPLOYMENT",
"externalSearchId": "12345678",
"questionnaireUrl": "https://verify.example.com/form/abc123",
"questionnaireAccessCode": "ACCESS123",
"searchConfig": {
"channels": {
"email": true,
"voice": false,
"preferredChannel": "EMAIL",
"blockedDestinations": [
"hr-noreply@company.com"
]
},
"timing": {
"searchSlaMinutes": 2880,
"outboundWindowMinutes": 120,
"businessHours": {
"timezone": "America/Chicago",
"startTime": "09:00",
"endTime": "16:00",
"allowedDays": [
1,
2,
3,
4,
5
]
}
},
"outbound": {
"maxAttemptsPerMethod": 5,
"maxTotalAttempts": 12,
"cancelOutboundOnTerminalInbound": true,
"contactHints": [
{
"email": "hr@company.com",
"priority": "HIGH"
}
]
},
"research": {
"skipResearch": false
}
}
}
],
"applicant": {
"firstName": "John",
"lastName": "Smith",
"ssn": "123-45-6789",
"birthday": "1990-05-15",
"phone": "+1-555-123-4567",
"email": "john.smith@example.com",
"signedReleaseFileUrl": "https://example.com/signed-release.pdf",
"addresses": [
{
"addressType": "home",
"addressLine1": "456 Oak Avenue",
"addressLine2": null,
"addressCity": "Los Angeles",
"addressState": "CA",
"addressZipCode": "90210",
"addressCountry": "US",
"startDate": "2021-01-01",
"endDate": null
},
{
"addressType": "home",
"addressLine1": "123 Main Street",
"addressLine2": "Apt 4B",
"addressCity": "New York",
"addressState": "NY",
"addressZipCode": "10001",
"addressCountry": "US",
"startDate": "2020-01-01",
"endDate": "2021-01-01"
}
],
"applicantAlias": [
{
"firstName": "Jonathan",
"lastName": "Smith",
"middleName": "Michael",
"suffix": "Jr."
}
]
},
"businessContext": {
"entityName": "Acme Corp",
"appliedJobTitle": "Senior Software Engineer",
"worksiteCity": "San Francisco",
"worksiteState": "CA",
"proposedSalary": 100000,
"positionLevel": "STANDARD",
"securityClearanceRequired": false,
"industrySector": "TECHNOLOGY"
},
"history": {
"employment": [
{
"employerName": "Tech Corp",
"position": "Software Engineer",
"employerLocation": "San Francisco, CA",
"employerEmail": "hr@techcorp.com",
"employerPhone": "+1-555-123-4567",
"startDate": "2020-01-15",
"endDate": "2023-06-30"
}
]
}
}
]
}
'import requests
url = "https://sandbox.theary.ai/background-check/v1/batches"
payload = { "orders": [
{
"searchTypes": [
{
"searchType": "EMPLOYMENT",
"externalSearchId": "12345678",
"questionnaireUrl": "https://verify.example.com/form/abc123",
"questionnaireAccessCode": "ACCESS123",
"searchConfig": {
"channels": {
"email": True,
"voice": False,
"preferredChannel": "EMAIL",
"blockedDestinations": ["hr-noreply@company.com"]
},
"timing": {
"searchSlaMinutes": 2880,
"outboundWindowMinutes": 120,
"businessHours": {
"timezone": "America/Chicago",
"startTime": "09:00",
"endTime": "16:00",
"allowedDays": [1, 2, 3, 4, 5]
}
},
"outbound": {
"maxAttemptsPerMethod": 5,
"maxTotalAttempts": 12,
"cancelOutboundOnTerminalInbound": True,
"contactHints": [
{
"email": "hr@company.com",
"priority": "HIGH"
}
]
},
"research": { "skipResearch": False }
}
}
],
"applicant": {
"firstName": "John",
"lastName": "Smith",
"ssn": "123-45-6789",
"birthday": "1990-05-15",
"phone": "+1-555-123-4567",
"email": "john.smith@example.com",
"signedReleaseFileUrl": "https://example.com/signed-release.pdf",
"addresses": [
{
"addressType": "home",
"addressLine1": "456 Oak Avenue",
"addressLine2": None,
"addressCity": "Los Angeles",
"addressState": "CA",
"addressZipCode": "90210",
"addressCountry": "US",
"startDate": "2021-01-01",
"endDate": None
},
{
"addressType": "home",
"addressLine1": "123 Main Street",
"addressLine2": "Apt 4B",
"addressCity": "New York",
"addressState": "NY",
"addressZipCode": "10001",
"addressCountry": "US",
"startDate": "2020-01-01",
"endDate": "2021-01-01"
}
],
"applicantAlias": [
{
"firstName": "Jonathan",
"lastName": "Smith",
"middleName": "Michael",
"suffix": "Jr."
}
]
},
"businessContext": {
"entityName": "Acme Corp",
"appliedJobTitle": "Senior Software Engineer",
"worksiteCity": "San Francisco",
"worksiteState": "CA",
"proposedSalary": 100000,
"positionLevel": "STANDARD",
"securityClearanceRequired": False,
"industrySector": "TECHNOLOGY"
},
"history": { "employment": [
{
"employerName": "Tech Corp",
"position": "Software Engineer",
"employerLocation": "San Francisco, CA",
"employerEmail": "hr@techcorp.com",
"employerPhone": "+1-555-123-4567",
"startDate": "2020-01-15",
"endDate": "2023-06-30"
}
] }
},
{
"searchTypes": [
{
"searchType": "EMPLOYMENT",
"externalSearchId": "12345678",
"questionnaireUrl": "https://verify.example.com/form/abc123",
"questionnaireAccessCode": "ACCESS123",
"searchConfig": {
"channels": {
"email": True,
"voice": False,
"preferredChannel": "EMAIL",
"blockedDestinations": ["hr-noreply@company.com"]
},
"timing": {
"searchSlaMinutes": 2880,
"outboundWindowMinutes": 120,
"businessHours": {
"timezone": "America/Chicago",
"startTime": "09:00",
"endTime": "16:00",
"allowedDays": [1, 2, 3, 4, 5]
}
},
"outbound": {
"maxAttemptsPerMethod": 5,
"maxTotalAttempts": 12,
"cancelOutboundOnTerminalInbound": True,
"contactHints": [
{
"email": "hr@company.com",
"priority": "HIGH"
}
]
},
"research": { "skipResearch": False }
}
}
],
"applicant": {
"firstName": "John",
"lastName": "Smith",
"ssn": "123-45-6789",
"birthday": "1990-05-15",
"phone": "+1-555-123-4567",
"email": "john.smith@example.com",
"signedReleaseFileUrl": "https://example.com/signed-release.pdf",
"addresses": [
{
"addressType": "home",
"addressLine1": "456 Oak Avenue",
"addressLine2": None,
"addressCity": "Los Angeles",
"addressState": "CA",
"addressZipCode": "90210",
"addressCountry": "US",
"startDate": "2021-01-01",
"endDate": None
},
{
"addressType": "home",
"addressLine1": "123 Main Street",
"addressLine2": "Apt 4B",
"addressCity": "New York",
"addressState": "NY",
"addressZipCode": "10001",
"addressCountry": "US",
"startDate": "2020-01-01",
"endDate": "2021-01-01"
}
],
"applicantAlias": [
{
"firstName": "Jonathan",
"lastName": "Smith",
"middleName": "Michael",
"suffix": "Jr."
}
]
},
"businessContext": {
"entityName": "Acme Corp",
"appliedJobTitle": "Senior Software Engineer",
"worksiteCity": "San Francisco",
"worksiteState": "CA",
"proposedSalary": 100000,
"positionLevel": "STANDARD",
"securityClearanceRequired": False,
"industrySector": "TECHNOLOGY"
},
"history": { "employment": [
{
"employerName": "Tech Corp",
"position": "Software Engineer",
"employerLocation": "San Francisco, CA",
"employerEmail": "hr@techcorp.com",
"employerPhone": "+1-555-123-4567",
"startDate": "2020-01-15",
"endDate": "2023-06-30"
}
] }
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
orders: [
{
searchTypes: [
{
searchType: 'EMPLOYMENT',
externalSearchId: '12345678',
questionnaireUrl: 'https://verify.example.com/form/abc123',
questionnaireAccessCode: 'ACCESS123',
searchConfig: {
channels: {
email: true,
voice: false,
preferredChannel: 'EMAIL',
blockedDestinations: ['hr-noreply@company.com']
},
timing: {
searchSlaMinutes: 2880,
outboundWindowMinutes: 120,
businessHours: {
timezone: 'America/Chicago',
startTime: '09:00',
endTime: '16:00',
allowedDays: [1, 2, 3, 4, 5]
}
},
outbound: {
maxAttemptsPerMethod: 5,
maxTotalAttempts: 12,
cancelOutboundOnTerminalInbound: true,
contactHints: [{email: 'hr@company.com', priority: 'HIGH'}]
},
research: {skipResearch: false}
}
}
],
applicant: {
firstName: 'John',
lastName: 'Smith',
ssn: '123-45-6789',
birthday: '1990-05-15',
phone: '+1-555-123-4567',
email: 'john.smith@example.com',
signedReleaseFileUrl: 'https://example.com/signed-release.pdf',
addresses: [
{
addressType: 'home',
addressLine1: '456 Oak Avenue',
addressLine2: null,
addressCity: 'Los Angeles',
addressState: 'CA',
addressZipCode: '90210',
addressCountry: 'US',
startDate: '2021-01-01',
endDate: null
},
{
addressType: 'home',
addressLine1: '123 Main Street',
addressLine2: 'Apt 4B',
addressCity: 'New York',
addressState: 'NY',
addressZipCode: '10001',
addressCountry: 'US',
startDate: '2020-01-01',
endDate: '2021-01-01'
}
],
applicantAlias: [
{firstName: 'Jonathan', lastName: 'Smith', middleName: 'Michael', suffix: 'Jr.'}
]
},
businessContext: {
entityName: 'Acme Corp',
appliedJobTitle: 'Senior Software Engineer',
worksiteCity: 'San Francisco',
worksiteState: 'CA',
proposedSalary: 100000,
positionLevel: 'STANDARD',
securityClearanceRequired: false,
industrySector: 'TECHNOLOGY'
},
history: {
employment: [
{
employerName: 'Tech Corp',
position: 'Software Engineer',
employerLocation: 'San Francisco, CA',
employerEmail: 'hr@techcorp.com',
employerPhone: '+1-555-123-4567',
startDate: '2020-01-15',
endDate: '2023-06-30'
}
]
}
},
{
searchTypes: [
{
searchType: 'EMPLOYMENT',
externalSearchId: '12345678',
questionnaireUrl: 'https://verify.example.com/form/abc123',
questionnaireAccessCode: 'ACCESS123',
searchConfig: {
channels: {
email: true,
voice: false,
preferredChannel: 'EMAIL',
blockedDestinations: ['hr-noreply@company.com']
},
timing: {
searchSlaMinutes: 2880,
outboundWindowMinutes: 120,
businessHours: {
timezone: 'America/Chicago',
startTime: '09:00',
endTime: '16:00',
allowedDays: [1, 2, 3, 4, 5]
}
},
outbound: {
maxAttemptsPerMethod: 5,
maxTotalAttempts: 12,
cancelOutboundOnTerminalInbound: true,
contactHints: [{email: 'hr@company.com', priority: 'HIGH'}]
},
research: {skipResearch: false}
}
}
],
applicant: {
firstName: 'John',
lastName: 'Smith',
ssn: '123-45-6789',
birthday: '1990-05-15',
phone: '+1-555-123-4567',
email: 'john.smith@example.com',
signedReleaseFileUrl: 'https://example.com/signed-release.pdf',
addresses: [
{
addressType: 'home',
addressLine1: '456 Oak Avenue',
addressLine2: null,
addressCity: 'Los Angeles',
addressState: 'CA',
addressZipCode: '90210',
addressCountry: 'US',
startDate: '2021-01-01',
endDate: null
},
{
addressType: 'home',
addressLine1: '123 Main Street',
addressLine2: 'Apt 4B',
addressCity: 'New York',
addressState: 'NY',
addressZipCode: '10001',
addressCountry: 'US',
startDate: '2020-01-01',
endDate: '2021-01-01'
}
],
applicantAlias: [
{firstName: 'Jonathan', lastName: 'Smith', middleName: 'Michael', suffix: 'Jr.'}
]
},
businessContext: {
entityName: 'Acme Corp',
appliedJobTitle: 'Senior Software Engineer',
worksiteCity: 'San Francisco',
worksiteState: 'CA',
proposedSalary: 100000,
positionLevel: 'STANDARD',
securityClearanceRequired: false,
industrySector: 'TECHNOLOGY'
},
history: {
employment: [
{
employerName: 'Tech Corp',
position: 'Software Engineer',
employerLocation: 'San Francisco, CA',
employerEmail: 'hr@techcorp.com',
employerPhone: '+1-555-123-4567',
startDate: '2020-01-15',
endDate: '2023-06-30'
}
]
}
}
]
})
};
fetch('https://sandbox.theary.ai/background-check/v1/batches', 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://sandbox.theary.ai/background-check/v1/batches",
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([
'orders' => [
[
'searchTypes' => [
[
'searchType' => 'EMPLOYMENT',
'externalSearchId' => '12345678',
'questionnaireUrl' => 'https://verify.example.com/form/abc123',
'questionnaireAccessCode' => 'ACCESS123',
'searchConfig' => [
'channels' => [
'email' => true,
'voice' => false,
'preferredChannel' => 'EMAIL',
'blockedDestinations' => [
'hr-noreply@company.com'
]
],
'timing' => [
'searchSlaMinutes' => 2880,
'outboundWindowMinutes' => 120,
'businessHours' => [
'timezone' => 'America/Chicago',
'startTime' => '09:00',
'endTime' => '16:00',
'allowedDays' => [
1,
2,
3,
4,
5
]
]
],
'outbound' => [
'maxAttemptsPerMethod' => 5,
'maxTotalAttempts' => 12,
'cancelOutboundOnTerminalInbound' => true,
'contactHints' => [
[
'email' => 'hr@company.com',
'priority' => 'HIGH'
]
]
],
'research' => [
'skipResearch' => false
]
]
]
],
'applicant' => [
'firstName' => 'John',
'lastName' => 'Smith',
'ssn' => '123-45-6789',
'birthday' => '1990-05-15',
'phone' => '+1-555-123-4567',
'email' => 'john.smith@example.com',
'signedReleaseFileUrl' => 'https://example.com/signed-release.pdf',
'addresses' => [
[
'addressType' => 'home',
'addressLine1' => '456 Oak Avenue',
'addressLine2' => null,
'addressCity' => 'Los Angeles',
'addressState' => 'CA',
'addressZipCode' => '90210',
'addressCountry' => 'US',
'startDate' => '2021-01-01',
'endDate' => null
],
[
'addressType' => 'home',
'addressLine1' => '123 Main Street',
'addressLine2' => 'Apt 4B',
'addressCity' => 'New York',
'addressState' => 'NY',
'addressZipCode' => '10001',
'addressCountry' => 'US',
'startDate' => '2020-01-01',
'endDate' => '2021-01-01'
]
],
'applicantAlias' => [
[
'firstName' => 'Jonathan',
'lastName' => 'Smith',
'middleName' => 'Michael',
'suffix' => 'Jr.'
]
]
],
'businessContext' => [
'entityName' => 'Acme Corp',
'appliedJobTitle' => 'Senior Software Engineer',
'worksiteCity' => 'San Francisco',
'worksiteState' => 'CA',
'proposedSalary' => 100000,
'positionLevel' => 'STANDARD',
'securityClearanceRequired' => false,
'industrySector' => 'TECHNOLOGY'
],
'history' => [
'employment' => [
[
'employerName' => 'Tech Corp',
'position' => 'Software Engineer',
'employerLocation' => 'San Francisco, CA',
'employerEmail' => 'hr@techcorp.com',
'employerPhone' => '+1-555-123-4567',
'startDate' => '2020-01-15',
'endDate' => '2023-06-30'
]
]
]
],
[
'searchTypes' => [
[
'searchType' => 'EMPLOYMENT',
'externalSearchId' => '12345678',
'questionnaireUrl' => 'https://verify.example.com/form/abc123',
'questionnaireAccessCode' => 'ACCESS123',
'searchConfig' => [
'channels' => [
'email' => true,
'voice' => false,
'preferredChannel' => 'EMAIL',
'blockedDestinations' => [
'hr-noreply@company.com'
]
],
'timing' => [
'searchSlaMinutes' => 2880,
'outboundWindowMinutes' => 120,
'businessHours' => [
'timezone' => 'America/Chicago',
'startTime' => '09:00',
'endTime' => '16:00',
'allowedDays' => [
1,
2,
3,
4,
5
]
]
],
'outbound' => [
'maxAttemptsPerMethod' => 5,
'maxTotalAttempts' => 12,
'cancelOutboundOnTerminalInbound' => true,
'contactHints' => [
[
'email' => 'hr@company.com',
'priority' => 'HIGH'
]
]
],
'research' => [
'skipResearch' => false
]
]
]
],
'applicant' => [
'firstName' => 'John',
'lastName' => 'Smith',
'ssn' => '123-45-6789',
'birthday' => '1990-05-15',
'phone' => '+1-555-123-4567',
'email' => 'john.smith@example.com',
'signedReleaseFileUrl' => 'https://example.com/signed-release.pdf',
'addresses' => [
[
'addressType' => 'home',
'addressLine1' => '456 Oak Avenue',
'addressLine2' => null,
'addressCity' => 'Los Angeles',
'addressState' => 'CA',
'addressZipCode' => '90210',
'addressCountry' => 'US',
'startDate' => '2021-01-01',
'endDate' => null
],
[
'addressType' => 'home',
'addressLine1' => '123 Main Street',
'addressLine2' => 'Apt 4B',
'addressCity' => 'New York',
'addressState' => 'NY',
'addressZipCode' => '10001',
'addressCountry' => 'US',
'startDate' => '2020-01-01',
'endDate' => '2021-01-01'
]
],
'applicantAlias' => [
[
'firstName' => 'Jonathan',
'lastName' => 'Smith',
'middleName' => 'Michael',
'suffix' => 'Jr.'
]
]
],
'businessContext' => [
'entityName' => 'Acme Corp',
'appliedJobTitle' => 'Senior Software Engineer',
'worksiteCity' => 'San Francisco',
'worksiteState' => 'CA',
'proposedSalary' => 100000,
'positionLevel' => 'STANDARD',
'securityClearanceRequired' => false,
'industrySector' => 'TECHNOLOGY'
],
'history' => [
'employment' => [
[
'employerName' => 'Tech Corp',
'position' => 'Software Engineer',
'employerLocation' => 'San Francisco, CA',
'employerEmail' => 'hr@techcorp.com',
'employerPhone' => '+1-555-123-4567',
'startDate' => '2020-01-15',
'endDate' => '2023-06-30'
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/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://sandbox.theary.ai/background-check/v1/batches"
payload := strings.NewReader("{\n \"orders\": [\n {\n \"searchTypes\": [\n {\n \"searchType\": \"EMPLOYMENT\",\n \"externalSearchId\": \"12345678\",\n \"questionnaireUrl\": \"https://verify.example.com/form/abc123\",\n \"questionnaireAccessCode\": \"ACCESS123\",\n \"searchConfig\": {\n \"channels\": {\n \"email\": true,\n \"voice\": false,\n \"preferredChannel\": \"EMAIL\",\n \"blockedDestinations\": [\n \"hr-noreply@company.com\"\n ]\n },\n \"timing\": {\n \"searchSlaMinutes\": 2880,\n \"outboundWindowMinutes\": 120,\n \"businessHours\": {\n \"timezone\": \"America/Chicago\",\n \"startTime\": \"09:00\",\n \"endTime\": \"16:00\",\n \"allowedDays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ]\n }\n },\n \"outbound\": {\n \"maxAttemptsPerMethod\": 5,\n \"maxTotalAttempts\": 12,\n \"cancelOutboundOnTerminalInbound\": true,\n \"contactHints\": [\n {\n \"email\": \"hr@company.com\",\n \"priority\": \"HIGH\"\n }\n ]\n },\n \"research\": {\n \"skipResearch\": false\n }\n }\n }\n ],\n \"applicant\": {\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"ssn\": \"123-45-6789\",\n \"birthday\": \"1990-05-15\",\n \"phone\": \"+1-555-123-4567\",\n \"email\": \"john.smith@example.com\",\n \"signedReleaseFileUrl\": \"https://example.com/signed-release.pdf\",\n \"addresses\": [\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"456 Oak Avenue\",\n \"addressLine2\": null,\n \"addressCity\": \"Los Angeles\",\n \"addressState\": \"CA\",\n \"addressZipCode\": \"90210\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2021-01-01\",\n \"endDate\": null\n },\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"123 Main Street\",\n \"addressLine2\": \"Apt 4B\",\n \"addressCity\": \"New York\",\n \"addressState\": \"NY\",\n \"addressZipCode\": \"10001\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2020-01-01\",\n \"endDate\": \"2021-01-01\"\n }\n ],\n \"applicantAlias\": [\n {\n \"firstName\": \"Jonathan\",\n \"lastName\": \"Smith\",\n \"middleName\": \"Michael\",\n \"suffix\": \"Jr.\"\n }\n ]\n },\n \"businessContext\": {\n \"entityName\": \"Acme Corp\",\n \"appliedJobTitle\": \"Senior Software Engineer\",\n \"worksiteCity\": \"San Francisco\",\n \"worksiteState\": \"CA\",\n \"proposedSalary\": 100000,\n \"positionLevel\": \"STANDARD\",\n \"securityClearanceRequired\": false,\n \"industrySector\": \"TECHNOLOGY\"\n },\n \"history\": {\n \"employment\": [\n {\n \"employerName\": \"Tech Corp\",\n \"position\": \"Software Engineer\",\n \"employerLocation\": \"San Francisco, CA\",\n \"employerEmail\": \"hr@techcorp.com\",\n \"employerPhone\": \"+1-555-123-4567\",\n \"startDate\": \"2020-01-15\",\n \"endDate\": \"2023-06-30\"\n }\n ]\n }\n },\n {\n \"searchTypes\": [\n {\n \"searchType\": \"EMPLOYMENT\",\n \"externalSearchId\": \"12345678\",\n \"questionnaireUrl\": \"https://verify.example.com/form/abc123\",\n \"questionnaireAccessCode\": \"ACCESS123\",\n \"searchConfig\": {\n \"channels\": {\n \"email\": true,\n \"voice\": false,\n \"preferredChannel\": \"EMAIL\",\n \"blockedDestinations\": [\n \"hr-noreply@company.com\"\n ]\n },\n \"timing\": {\n \"searchSlaMinutes\": 2880,\n \"outboundWindowMinutes\": 120,\n \"businessHours\": {\n \"timezone\": \"America/Chicago\",\n \"startTime\": \"09:00\",\n \"endTime\": \"16:00\",\n \"allowedDays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ]\n }\n },\n \"outbound\": {\n \"maxAttemptsPerMethod\": 5,\n \"maxTotalAttempts\": 12,\n \"cancelOutboundOnTerminalInbound\": true,\n \"contactHints\": [\n {\n \"email\": \"hr@company.com\",\n \"priority\": \"HIGH\"\n }\n ]\n },\n \"research\": {\n \"skipResearch\": false\n }\n }\n }\n ],\n \"applicant\": {\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"ssn\": \"123-45-6789\",\n \"birthday\": \"1990-05-15\",\n \"phone\": \"+1-555-123-4567\",\n \"email\": \"john.smith@example.com\",\n \"signedReleaseFileUrl\": \"https://example.com/signed-release.pdf\",\n \"addresses\": [\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"456 Oak Avenue\",\n \"addressLine2\": null,\n \"addressCity\": \"Los Angeles\",\n \"addressState\": \"CA\",\n \"addressZipCode\": \"90210\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2021-01-01\",\n \"endDate\": null\n },\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"123 Main Street\",\n \"addressLine2\": \"Apt 4B\",\n \"addressCity\": \"New York\",\n \"addressState\": \"NY\",\n \"addressZipCode\": \"10001\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2020-01-01\",\n \"endDate\": \"2021-01-01\"\n }\n ],\n \"applicantAlias\": [\n {\n \"firstName\": \"Jonathan\",\n \"lastName\": \"Smith\",\n \"middleName\": \"Michael\",\n \"suffix\": \"Jr.\"\n }\n ]\n },\n \"businessContext\": {\n \"entityName\": \"Acme Corp\",\n \"appliedJobTitle\": \"Senior Software Engineer\",\n \"worksiteCity\": \"San Francisco\",\n \"worksiteState\": \"CA\",\n \"proposedSalary\": 100000,\n \"positionLevel\": \"STANDARD\",\n \"securityClearanceRequired\": false,\n \"industrySector\": \"TECHNOLOGY\"\n },\n \"history\": {\n \"employment\": [\n {\n \"employerName\": \"Tech Corp\",\n \"position\": \"Software Engineer\",\n \"employerLocation\": \"San Francisco, CA\",\n \"employerEmail\": \"hr@techcorp.com\",\n \"employerPhone\": \"+1-555-123-4567\",\n \"startDate\": \"2020-01-15\",\n \"endDate\": \"2023-06-30\"\n }\n ]\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://sandbox.theary.ai/background-check/v1/batches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"orders\": [\n {\n \"searchTypes\": [\n {\n \"searchType\": \"EMPLOYMENT\",\n \"externalSearchId\": \"12345678\",\n \"questionnaireUrl\": \"https://verify.example.com/form/abc123\",\n \"questionnaireAccessCode\": \"ACCESS123\",\n \"searchConfig\": {\n \"channels\": {\n \"email\": true,\n \"voice\": false,\n \"preferredChannel\": \"EMAIL\",\n \"blockedDestinations\": [\n \"hr-noreply@company.com\"\n ]\n },\n \"timing\": {\n \"searchSlaMinutes\": 2880,\n \"outboundWindowMinutes\": 120,\n \"businessHours\": {\n \"timezone\": \"America/Chicago\",\n \"startTime\": \"09:00\",\n \"endTime\": \"16:00\",\n \"allowedDays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ]\n }\n },\n \"outbound\": {\n \"maxAttemptsPerMethod\": 5,\n \"maxTotalAttempts\": 12,\n \"cancelOutboundOnTerminalInbound\": true,\n \"contactHints\": [\n {\n \"email\": \"hr@company.com\",\n \"priority\": \"HIGH\"\n }\n ]\n },\n \"research\": {\n \"skipResearch\": false\n }\n }\n }\n ],\n \"applicant\": {\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"ssn\": \"123-45-6789\",\n \"birthday\": \"1990-05-15\",\n \"phone\": \"+1-555-123-4567\",\n \"email\": \"john.smith@example.com\",\n \"signedReleaseFileUrl\": \"https://example.com/signed-release.pdf\",\n \"addresses\": [\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"456 Oak Avenue\",\n \"addressLine2\": null,\n \"addressCity\": \"Los Angeles\",\n \"addressState\": \"CA\",\n \"addressZipCode\": \"90210\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2021-01-01\",\n \"endDate\": null\n },\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"123 Main Street\",\n \"addressLine2\": \"Apt 4B\",\n \"addressCity\": \"New York\",\n \"addressState\": \"NY\",\n \"addressZipCode\": \"10001\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2020-01-01\",\n \"endDate\": \"2021-01-01\"\n }\n ],\n \"applicantAlias\": [\n {\n \"firstName\": \"Jonathan\",\n \"lastName\": \"Smith\",\n \"middleName\": \"Michael\",\n \"suffix\": \"Jr.\"\n }\n ]\n },\n \"businessContext\": {\n \"entityName\": \"Acme Corp\",\n \"appliedJobTitle\": \"Senior Software Engineer\",\n \"worksiteCity\": \"San Francisco\",\n \"worksiteState\": \"CA\",\n \"proposedSalary\": 100000,\n \"positionLevel\": \"STANDARD\",\n \"securityClearanceRequired\": false,\n \"industrySector\": \"TECHNOLOGY\"\n },\n \"history\": {\n \"employment\": [\n {\n \"employerName\": \"Tech Corp\",\n \"position\": \"Software Engineer\",\n \"employerLocation\": \"San Francisco, CA\",\n \"employerEmail\": \"hr@techcorp.com\",\n \"employerPhone\": \"+1-555-123-4567\",\n \"startDate\": \"2020-01-15\",\n \"endDate\": \"2023-06-30\"\n }\n ]\n }\n },\n {\n \"searchTypes\": [\n {\n \"searchType\": \"EMPLOYMENT\",\n \"externalSearchId\": \"12345678\",\n \"questionnaireUrl\": \"https://verify.example.com/form/abc123\",\n \"questionnaireAccessCode\": \"ACCESS123\",\n \"searchConfig\": {\n \"channels\": {\n \"email\": true,\n \"voice\": false,\n \"preferredChannel\": \"EMAIL\",\n \"blockedDestinations\": [\n \"hr-noreply@company.com\"\n ]\n },\n \"timing\": {\n \"searchSlaMinutes\": 2880,\n \"outboundWindowMinutes\": 120,\n \"businessHours\": {\n \"timezone\": \"America/Chicago\",\n \"startTime\": \"09:00\",\n \"endTime\": \"16:00\",\n \"allowedDays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ]\n }\n },\n \"outbound\": {\n \"maxAttemptsPerMethod\": 5,\n \"maxTotalAttempts\": 12,\n \"cancelOutboundOnTerminalInbound\": true,\n \"contactHints\": [\n {\n \"email\": \"hr@company.com\",\n \"priority\": \"HIGH\"\n }\n ]\n },\n \"research\": {\n \"skipResearch\": false\n }\n }\n }\n ],\n \"applicant\": {\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"ssn\": \"123-45-6789\",\n \"birthday\": \"1990-05-15\",\n \"phone\": \"+1-555-123-4567\",\n \"email\": \"john.smith@example.com\",\n \"signedReleaseFileUrl\": \"https://example.com/signed-release.pdf\",\n \"addresses\": [\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"456 Oak Avenue\",\n \"addressLine2\": null,\n \"addressCity\": \"Los Angeles\",\n \"addressState\": \"CA\",\n \"addressZipCode\": \"90210\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2021-01-01\",\n \"endDate\": null\n },\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"123 Main Street\",\n \"addressLine2\": \"Apt 4B\",\n \"addressCity\": \"New York\",\n \"addressState\": \"NY\",\n \"addressZipCode\": \"10001\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2020-01-01\",\n \"endDate\": \"2021-01-01\"\n }\n ],\n \"applicantAlias\": [\n {\n \"firstName\": \"Jonathan\",\n \"lastName\": \"Smith\",\n \"middleName\": \"Michael\",\n \"suffix\": \"Jr.\"\n }\n ]\n },\n \"businessContext\": {\n \"entityName\": \"Acme Corp\",\n \"appliedJobTitle\": \"Senior Software Engineer\",\n \"worksiteCity\": \"San Francisco\",\n \"worksiteState\": \"CA\",\n \"proposedSalary\": 100000,\n \"positionLevel\": \"STANDARD\",\n \"securityClearanceRequired\": false,\n \"industrySector\": \"TECHNOLOGY\"\n },\n \"history\": {\n \"employment\": [\n {\n \"employerName\": \"Tech Corp\",\n \"position\": \"Software Engineer\",\n \"employerLocation\": \"San Francisco, CA\",\n \"employerEmail\": \"hr@techcorp.com\",\n \"employerPhone\": \"+1-555-123-4567\",\n \"startDate\": \"2020-01-15\",\n \"endDate\": \"2023-06-30\"\n }\n ]\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.theary.ai/background-check/v1/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"orders\": [\n {\n \"searchTypes\": [\n {\n \"searchType\": \"EMPLOYMENT\",\n \"externalSearchId\": \"12345678\",\n \"questionnaireUrl\": \"https://verify.example.com/form/abc123\",\n \"questionnaireAccessCode\": \"ACCESS123\",\n \"searchConfig\": {\n \"channels\": {\n \"email\": true,\n \"voice\": false,\n \"preferredChannel\": \"EMAIL\",\n \"blockedDestinations\": [\n \"hr-noreply@company.com\"\n ]\n },\n \"timing\": {\n \"searchSlaMinutes\": 2880,\n \"outboundWindowMinutes\": 120,\n \"businessHours\": {\n \"timezone\": \"America/Chicago\",\n \"startTime\": \"09:00\",\n \"endTime\": \"16:00\",\n \"allowedDays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ]\n }\n },\n \"outbound\": {\n \"maxAttemptsPerMethod\": 5,\n \"maxTotalAttempts\": 12,\n \"cancelOutboundOnTerminalInbound\": true,\n \"contactHints\": [\n {\n \"email\": \"hr@company.com\",\n \"priority\": \"HIGH\"\n }\n ]\n },\n \"research\": {\n \"skipResearch\": false\n }\n }\n }\n ],\n \"applicant\": {\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"ssn\": \"123-45-6789\",\n \"birthday\": \"1990-05-15\",\n \"phone\": \"+1-555-123-4567\",\n \"email\": \"john.smith@example.com\",\n \"signedReleaseFileUrl\": \"https://example.com/signed-release.pdf\",\n \"addresses\": [\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"456 Oak Avenue\",\n \"addressLine2\": null,\n \"addressCity\": \"Los Angeles\",\n \"addressState\": \"CA\",\n \"addressZipCode\": \"90210\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2021-01-01\",\n \"endDate\": null\n },\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"123 Main Street\",\n \"addressLine2\": \"Apt 4B\",\n \"addressCity\": \"New York\",\n \"addressState\": \"NY\",\n \"addressZipCode\": \"10001\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2020-01-01\",\n \"endDate\": \"2021-01-01\"\n }\n ],\n \"applicantAlias\": [\n {\n \"firstName\": \"Jonathan\",\n \"lastName\": \"Smith\",\n \"middleName\": \"Michael\",\n \"suffix\": \"Jr.\"\n }\n ]\n },\n \"businessContext\": {\n \"entityName\": \"Acme Corp\",\n \"appliedJobTitle\": \"Senior Software Engineer\",\n \"worksiteCity\": \"San Francisco\",\n \"worksiteState\": \"CA\",\n \"proposedSalary\": 100000,\n \"positionLevel\": \"STANDARD\",\n \"securityClearanceRequired\": false,\n \"industrySector\": \"TECHNOLOGY\"\n },\n \"history\": {\n \"employment\": [\n {\n \"employerName\": \"Tech Corp\",\n \"position\": \"Software Engineer\",\n \"employerLocation\": \"San Francisco, CA\",\n \"employerEmail\": \"hr@techcorp.com\",\n \"employerPhone\": \"+1-555-123-4567\",\n \"startDate\": \"2020-01-15\",\n \"endDate\": \"2023-06-30\"\n }\n ]\n }\n },\n {\n \"searchTypes\": [\n {\n \"searchType\": \"EMPLOYMENT\",\n \"externalSearchId\": \"12345678\",\n \"questionnaireUrl\": \"https://verify.example.com/form/abc123\",\n \"questionnaireAccessCode\": \"ACCESS123\",\n \"searchConfig\": {\n \"channels\": {\n \"email\": true,\n \"voice\": false,\n \"preferredChannel\": \"EMAIL\",\n \"blockedDestinations\": [\n \"hr-noreply@company.com\"\n ]\n },\n \"timing\": {\n \"searchSlaMinutes\": 2880,\n \"outboundWindowMinutes\": 120,\n \"businessHours\": {\n \"timezone\": \"America/Chicago\",\n \"startTime\": \"09:00\",\n \"endTime\": \"16:00\",\n \"allowedDays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ]\n }\n },\n \"outbound\": {\n \"maxAttemptsPerMethod\": 5,\n \"maxTotalAttempts\": 12,\n \"cancelOutboundOnTerminalInbound\": true,\n \"contactHints\": [\n {\n \"email\": \"hr@company.com\",\n \"priority\": \"HIGH\"\n }\n ]\n },\n \"research\": {\n \"skipResearch\": false\n }\n }\n }\n ],\n \"applicant\": {\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"ssn\": \"123-45-6789\",\n \"birthday\": \"1990-05-15\",\n \"phone\": \"+1-555-123-4567\",\n \"email\": \"john.smith@example.com\",\n \"signedReleaseFileUrl\": \"https://example.com/signed-release.pdf\",\n \"addresses\": [\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"456 Oak Avenue\",\n \"addressLine2\": null,\n \"addressCity\": \"Los Angeles\",\n \"addressState\": \"CA\",\n \"addressZipCode\": \"90210\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2021-01-01\",\n \"endDate\": null\n },\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"123 Main Street\",\n \"addressLine2\": \"Apt 4B\",\n \"addressCity\": \"New York\",\n \"addressState\": \"NY\",\n \"addressZipCode\": \"10001\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2020-01-01\",\n \"endDate\": \"2021-01-01\"\n }\n ],\n \"applicantAlias\": [\n {\n \"firstName\": \"Jonathan\",\n \"lastName\": \"Smith\",\n \"middleName\": \"Michael\",\n \"suffix\": \"Jr.\"\n }\n ]\n },\n \"businessContext\": {\n \"entityName\": \"Acme Corp\",\n \"appliedJobTitle\": \"Senior Software Engineer\",\n \"worksiteCity\": \"San Francisco\",\n \"worksiteState\": \"CA\",\n \"proposedSalary\": 100000,\n \"positionLevel\": \"STANDARD\",\n \"securityClearanceRequired\": false,\n \"industrySector\": \"TECHNOLOGY\"\n },\n \"history\": {\n \"employment\": [\n {\n \"employerName\": \"Tech Corp\",\n \"position\": \"Software Engineer\",\n \"employerLocation\": \"San Francisco, CA\",\n \"employerEmail\": \"hr@techcorp.com\",\n \"employerPhone\": \"+1-555-123-4567\",\n \"startDate\": \"2020-01-15\",\n \"endDate\": \"2023-06-30\"\n }\n ]\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"batchId": "<string>",
"orders": [
{
"verificationOrderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"searchIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
]
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}Batches API
Create Batch Order
Create multiple verification orders in one request (not a persisted batch)
POST
/
background-check
/
v1
/
batches
Create batch of verification orders
curl --request POST \
--url https://sandbox.theary.ai/background-check/v1/batches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"orders": [
{
"searchTypes": [
{
"searchType": "EMPLOYMENT",
"externalSearchId": "12345678",
"questionnaireUrl": "https://verify.example.com/form/abc123",
"questionnaireAccessCode": "ACCESS123",
"searchConfig": {
"channels": {
"email": true,
"voice": false,
"preferredChannel": "EMAIL",
"blockedDestinations": [
"hr-noreply@company.com"
]
},
"timing": {
"searchSlaMinutes": 2880,
"outboundWindowMinutes": 120,
"businessHours": {
"timezone": "America/Chicago",
"startTime": "09:00",
"endTime": "16:00",
"allowedDays": [
1,
2,
3,
4,
5
]
}
},
"outbound": {
"maxAttemptsPerMethod": 5,
"maxTotalAttempts": 12,
"cancelOutboundOnTerminalInbound": true,
"contactHints": [
{
"email": "hr@company.com",
"priority": "HIGH"
}
]
},
"research": {
"skipResearch": false
}
}
}
],
"applicant": {
"firstName": "John",
"lastName": "Smith",
"ssn": "123-45-6789",
"birthday": "1990-05-15",
"phone": "+1-555-123-4567",
"email": "john.smith@example.com",
"signedReleaseFileUrl": "https://example.com/signed-release.pdf",
"addresses": [
{
"addressType": "home",
"addressLine1": "456 Oak Avenue",
"addressLine2": null,
"addressCity": "Los Angeles",
"addressState": "CA",
"addressZipCode": "90210",
"addressCountry": "US",
"startDate": "2021-01-01",
"endDate": null
},
{
"addressType": "home",
"addressLine1": "123 Main Street",
"addressLine2": "Apt 4B",
"addressCity": "New York",
"addressState": "NY",
"addressZipCode": "10001",
"addressCountry": "US",
"startDate": "2020-01-01",
"endDate": "2021-01-01"
}
],
"applicantAlias": [
{
"firstName": "Jonathan",
"lastName": "Smith",
"middleName": "Michael",
"suffix": "Jr."
}
]
},
"businessContext": {
"entityName": "Acme Corp",
"appliedJobTitle": "Senior Software Engineer",
"worksiteCity": "San Francisco",
"worksiteState": "CA",
"proposedSalary": 100000,
"positionLevel": "STANDARD",
"securityClearanceRequired": false,
"industrySector": "TECHNOLOGY"
},
"history": {
"employment": [
{
"employerName": "Tech Corp",
"position": "Software Engineer",
"employerLocation": "San Francisco, CA",
"employerEmail": "hr@techcorp.com",
"employerPhone": "+1-555-123-4567",
"startDate": "2020-01-15",
"endDate": "2023-06-30"
}
]
}
},
{
"searchTypes": [
{
"searchType": "EMPLOYMENT",
"externalSearchId": "12345678",
"questionnaireUrl": "https://verify.example.com/form/abc123",
"questionnaireAccessCode": "ACCESS123",
"searchConfig": {
"channels": {
"email": true,
"voice": false,
"preferredChannel": "EMAIL",
"blockedDestinations": [
"hr-noreply@company.com"
]
},
"timing": {
"searchSlaMinutes": 2880,
"outboundWindowMinutes": 120,
"businessHours": {
"timezone": "America/Chicago",
"startTime": "09:00",
"endTime": "16:00",
"allowedDays": [
1,
2,
3,
4,
5
]
}
},
"outbound": {
"maxAttemptsPerMethod": 5,
"maxTotalAttempts": 12,
"cancelOutboundOnTerminalInbound": true,
"contactHints": [
{
"email": "hr@company.com",
"priority": "HIGH"
}
]
},
"research": {
"skipResearch": false
}
}
}
],
"applicant": {
"firstName": "John",
"lastName": "Smith",
"ssn": "123-45-6789",
"birthday": "1990-05-15",
"phone": "+1-555-123-4567",
"email": "john.smith@example.com",
"signedReleaseFileUrl": "https://example.com/signed-release.pdf",
"addresses": [
{
"addressType": "home",
"addressLine1": "456 Oak Avenue",
"addressLine2": null,
"addressCity": "Los Angeles",
"addressState": "CA",
"addressZipCode": "90210",
"addressCountry": "US",
"startDate": "2021-01-01",
"endDate": null
},
{
"addressType": "home",
"addressLine1": "123 Main Street",
"addressLine2": "Apt 4B",
"addressCity": "New York",
"addressState": "NY",
"addressZipCode": "10001",
"addressCountry": "US",
"startDate": "2020-01-01",
"endDate": "2021-01-01"
}
],
"applicantAlias": [
{
"firstName": "Jonathan",
"lastName": "Smith",
"middleName": "Michael",
"suffix": "Jr."
}
]
},
"businessContext": {
"entityName": "Acme Corp",
"appliedJobTitle": "Senior Software Engineer",
"worksiteCity": "San Francisco",
"worksiteState": "CA",
"proposedSalary": 100000,
"positionLevel": "STANDARD",
"securityClearanceRequired": false,
"industrySector": "TECHNOLOGY"
},
"history": {
"employment": [
{
"employerName": "Tech Corp",
"position": "Software Engineer",
"employerLocation": "San Francisco, CA",
"employerEmail": "hr@techcorp.com",
"employerPhone": "+1-555-123-4567",
"startDate": "2020-01-15",
"endDate": "2023-06-30"
}
]
}
}
]
}
'import requests
url = "https://sandbox.theary.ai/background-check/v1/batches"
payload = { "orders": [
{
"searchTypes": [
{
"searchType": "EMPLOYMENT",
"externalSearchId": "12345678",
"questionnaireUrl": "https://verify.example.com/form/abc123",
"questionnaireAccessCode": "ACCESS123",
"searchConfig": {
"channels": {
"email": True,
"voice": False,
"preferredChannel": "EMAIL",
"blockedDestinations": ["hr-noreply@company.com"]
},
"timing": {
"searchSlaMinutes": 2880,
"outboundWindowMinutes": 120,
"businessHours": {
"timezone": "America/Chicago",
"startTime": "09:00",
"endTime": "16:00",
"allowedDays": [1, 2, 3, 4, 5]
}
},
"outbound": {
"maxAttemptsPerMethod": 5,
"maxTotalAttempts": 12,
"cancelOutboundOnTerminalInbound": True,
"contactHints": [
{
"email": "hr@company.com",
"priority": "HIGH"
}
]
},
"research": { "skipResearch": False }
}
}
],
"applicant": {
"firstName": "John",
"lastName": "Smith",
"ssn": "123-45-6789",
"birthday": "1990-05-15",
"phone": "+1-555-123-4567",
"email": "john.smith@example.com",
"signedReleaseFileUrl": "https://example.com/signed-release.pdf",
"addresses": [
{
"addressType": "home",
"addressLine1": "456 Oak Avenue",
"addressLine2": None,
"addressCity": "Los Angeles",
"addressState": "CA",
"addressZipCode": "90210",
"addressCountry": "US",
"startDate": "2021-01-01",
"endDate": None
},
{
"addressType": "home",
"addressLine1": "123 Main Street",
"addressLine2": "Apt 4B",
"addressCity": "New York",
"addressState": "NY",
"addressZipCode": "10001",
"addressCountry": "US",
"startDate": "2020-01-01",
"endDate": "2021-01-01"
}
],
"applicantAlias": [
{
"firstName": "Jonathan",
"lastName": "Smith",
"middleName": "Michael",
"suffix": "Jr."
}
]
},
"businessContext": {
"entityName": "Acme Corp",
"appliedJobTitle": "Senior Software Engineer",
"worksiteCity": "San Francisco",
"worksiteState": "CA",
"proposedSalary": 100000,
"positionLevel": "STANDARD",
"securityClearanceRequired": False,
"industrySector": "TECHNOLOGY"
},
"history": { "employment": [
{
"employerName": "Tech Corp",
"position": "Software Engineer",
"employerLocation": "San Francisco, CA",
"employerEmail": "hr@techcorp.com",
"employerPhone": "+1-555-123-4567",
"startDate": "2020-01-15",
"endDate": "2023-06-30"
}
] }
},
{
"searchTypes": [
{
"searchType": "EMPLOYMENT",
"externalSearchId": "12345678",
"questionnaireUrl": "https://verify.example.com/form/abc123",
"questionnaireAccessCode": "ACCESS123",
"searchConfig": {
"channels": {
"email": True,
"voice": False,
"preferredChannel": "EMAIL",
"blockedDestinations": ["hr-noreply@company.com"]
},
"timing": {
"searchSlaMinutes": 2880,
"outboundWindowMinutes": 120,
"businessHours": {
"timezone": "America/Chicago",
"startTime": "09:00",
"endTime": "16:00",
"allowedDays": [1, 2, 3, 4, 5]
}
},
"outbound": {
"maxAttemptsPerMethod": 5,
"maxTotalAttempts": 12,
"cancelOutboundOnTerminalInbound": True,
"contactHints": [
{
"email": "hr@company.com",
"priority": "HIGH"
}
]
},
"research": { "skipResearch": False }
}
}
],
"applicant": {
"firstName": "John",
"lastName": "Smith",
"ssn": "123-45-6789",
"birthday": "1990-05-15",
"phone": "+1-555-123-4567",
"email": "john.smith@example.com",
"signedReleaseFileUrl": "https://example.com/signed-release.pdf",
"addresses": [
{
"addressType": "home",
"addressLine1": "456 Oak Avenue",
"addressLine2": None,
"addressCity": "Los Angeles",
"addressState": "CA",
"addressZipCode": "90210",
"addressCountry": "US",
"startDate": "2021-01-01",
"endDate": None
},
{
"addressType": "home",
"addressLine1": "123 Main Street",
"addressLine2": "Apt 4B",
"addressCity": "New York",
"addressState": "NY",
"addressZipCode": "10001",
"addressCountry": "US",
"startDate": "2020-01-01",
"endDate": "2021-01-01"
}
],
"applicantAlias": [
{
"firstName": "Jonathan",
"lastName": "Smith",
"middleName": "Michael",
"suffix": "Jr."
}
]
},
"businessContext": {
"entityName": "Acme Corp",
"appliedJobTitle": "Senior Software Engineer",
"worksiteCity": "San Francisco",
"worksiteState": "CA",
"proposedSalary": 100000,
"positionLevel": "STANDARD",
"securityClearanceRequired": False,
"industrySector": "TECHNOLOGY"
},
"history": { "employment": [
{
"employerName": "Tech Corp",
"position": "Software Engineer",
"employerLocation": "San Francisco, CA",
"employerEmail": "hr@techcorp.com",
"employerPhone": "+1-555-123-4567",
"startDate": "2020-01-15",
"endDate": "2023-06-30"
}
] }
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
orders: [
{
searchTypes: [
{
searchType: 'EMPLOYMENT',
externalSearchId: '12345678',
questionnaireUrl: 'https://verify.example.com/form/abc123',
questionnaireAccessCode: 'ACCESS123',
searchConfig: {
channels: {
email: true,
voice: false,
preferredChannel: 'EMAIL',
blockedDestinations: ['hr-noreply@company.com']
},
timing: {
searchSlaMinutes: 2880,
outboundWindowMinutes: 120,
businessHours: {
timezone: 'America/Chicago',
startTime: '09:00',
endTime: '16:00',
allowedDays: [1, 2, 3, 4, 5]
}
},
outbound: {
maxAttemptsPerMethod: 5,
maxTotalAttempts: 12,
cancelOutboundOnTerminalInbound: true,
contactHints: [{email: 'hr@company.com', priority: 'HIGH'}]
},
research: {skipResearch: false}
}
}
],
applicant: {
firstName: 'John',
lastName: 'Smith',
ssn: '123-45-6789',
birthday: '1990-05-15',
phone: '+1-555-123-4567',
email: 'john.smith@example.com',
signedReleaseFileUrl: 'https://example.com/signed-release.pdf',
addresses: [
{
addressType: 'home',
addressLine1: '456 Oak Avenue',
addressLine2: null,
addressCity: 'Los Angeles',
addressState: 'CA',
addressZipCode: '90210',
addressCountry: 'US',
startDate: '2021-01-01',
endDate: null
},
{
addressType: 'home',
addressLine1: '123 Main Street',
addressLine2: 'Apt 4B',
addressCity: 'New York',
addressState: 'NY',
addressZipCode: '10001',
addressCountry: 'US',
startDate: '2020-01-01',
endDate: '2021-01-01'
}
],
applicantAlias: [
{firstName: 'Jonathan', lastName: 'Smith', middleName: 'Michael', suffix: 'Jr.'}
]
},
businessContext: {
entityName: 'Acme Corp',
appliedJobTitle: 'Senior Software Engineer',
worksiteCity: 'San Francisco',
worksiteState: 'CA',
proposedSalary: 100000,
positionLevel: 'STANDARD',
securityClearanceRequired: false,
industrySector: 'TECHNOLOGY'
},
history: {
employment: [
{
employerName: 'Tech Corp',
position: 'Software Engineer',
employerLocation: 'San Francisco, CA',
employerEmail: 'hr@techcorp.com',
employerPhone: '+1-555-123-4567',
startDate: '2020-01-15',
endDate: '2023-06-30'
}
]
}
},
{
searchTypes: [
{
searchType: 'EMPLOYMENT',
externalSearchId: '12345678',
questionnaireUrl: 'https://verify.example.com/form/abc123',
questionnaireAccessCode: 'ACCESS123',
searchConfig: {
channels: {
email: true,
voice: false,
preferredChannel: 'EMAIL',
blockedDestinations: ['hr-noreply@company.com']
},
timing: {
searchSlaMinutes: 2880,
outboundWindowMinutes: 120,
businessHours: {
timezone: 'America/Chicago',
startTime: '09:00',
endTime: '16:00',
allowedDays: [1, 2, 3, 4, 5]
}
},
outbound: {
maxAttemptsPerMethod: 5,
maxTotalAttempts: 12,
cancelOutboundOnTerminalInbound: true,
contactHints: [{email: 'hr@company.com', priority: 'HIGH'}]
},
research: {skipResearch: false}
}
}
],
applicant: {
firstName: 'John',
lastName: 'Smith',
ssn: '123-45-6789',
birthday: '1990-05-15',
phone: '+1-555-123-4567',
email: 'john.smith@example.com',
signedReleaseFileUrl: 'https://example.com/signed-release.pdf',
addresses: [
{
addressType: 'home',
addressLine1: '456 Oak Avenue',
addressLine2: null,
addressCity: 'Los Angeles',
addressState: 'CA',
addressZipCode: '90210',
addressCountry: 'US',
startDate: '2021-01-01',
endDate: null
},
{
addressType: 'home',
addressLine1: '123 Main Street',
addressLine2: 'Apt 4B',
addressCity: 'New York',
addressState: 'NY',
addressZipCode: '10001',
addressCountry: 'US',
startDate: '2020-01-01',
endDate: '2021-01-01'
}
],
applicantAlias: [
{firstName: 'Jonathan', lastName: 'Smith', middleName: 'Michael', suffix: 'Jr.'}
]
},
businessContext: {
entityName: 'Acme Corp',
appliedJobTitle: 'Senior Software Engineer',
worksiteCity: 'San Francisco',
worksiteState: 'CA',
proposedSalary: 100000,
positionLevel: 'STANDARD',
securityClearanceRequired: false,
industrySector: 'TECHNOLOGY'
},
history: {
employment: [
{
employerName: 'Tech Corp',
position: 'Software Engineer',
employerLocation: 'San Francisco, CA',
employerEmail: 'hr@techcorp.com',
employerPhone: '+1-555-123-4567',
startDate: '2020-01-15',
endDate: '2023-06-30'
}
]
}
}
]
})
};
fetch('https://sandbox.theary.ai/background-check/v1/batches', 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://sandbox.theary.ai/background-check/v1/batches",
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([
'orders' => [
[
'searchTypes' => [
[
'searchType' => 'EMPLOYMENT',
'externalSearchId' => '12345678',
'questionnaireUrl' => 'https://verify.example.com/form/abc123',
'questionnaireAccessCode' => 'ACCESS123',
'searchConfig' => [
'channels' => [
'email' => true,
'voice' => false,
'preferredChannel' => 'EMAIL',
'blockedDestinations' => [
'hr-noreply@company.com'
]
],
'timing' => [
'searchSlaMinutes' => 2880,
'outboundWindowMinutes' => 120,
'businessHours' => [
'timezone' => 'America/Chicago',
'startTime' => '09:00',
'endTime' => '16:00',
'allowedDays' => [
1,
2,
3,
4,
5
]
]
],
'outbound' => [
'maxAttemptsPerMethod' => 5,
'maxTotalAttempts' => 12,
'cancelOutboundOnTerminalInbound' => true,
'contactHints' => [
[
'email' => 'hr@company.com',
'priority' => 'HIGH'
]
]
],
'research' => [
'skipResearch' => false
]
]
]
],
'applicant' => [
'firstName' => 'John',
'lastName' => 'Smith',
'ssn' => '123-45-6789',
'birthday' => '1990-05-15',
'phone' => '+1-555-123-4567',
'email' => 'john.smith@example.com',
'signedReleaseFileUrl' => 'https://example.com/signed-release.pdf',
'addresses' => [
[
'addressType' => 'home',
'addressLine1' => '456 Oak Avenue',
'addressLine2' => null,
'addressCity' => 'Los Angeles',
'addressState' => 'CA',
'addressZipCode' => '90210',
'addressCountry' => 'US',
'startDate' => '2021-01-01',
'endDate' => null
],
[
'addressType' => 'home',
'addressLine1' => '123 Main Street',
'addressLine2' => 'Apt 4B',
'addressCity' => 'New York',
'addressState' => 'NY',
'addressZipCode' => '10001',
'addressCountry' => 'US',
'startDate' => '2020-01-01',
'endDate' => '2021-01-01'
]
],
'applicantAlias' => [
[
'firstName' => 'Jonathan',
'lastName' => 'Smith',
'middleName' => 'Michael',
'suffix' => 'Jr.'
]
]
],
'businessContext' => [
'entityName' => 'Acme Corp',
'appliedJobTitle' => 'Senior Software Engineer',
'worksiteCity' => 'San Francisco',
'worksiteState' => 'CA',
'proposedSalary' => 100000,
'positionLevel' => 'STANDARD',
'securityClearanceRequired' => false,
'industrySector' => 'TECHNOLOGY'
],
'history' => [
'employment' => [
[
'employerName' => 'Tech Corp',
'position' => 'Software Engineer',
'employerLocation' => 'San Francisco, CA',
'employerEmail' => 'hr@techcorp.com',
'employerPhone' => '+1-555-123-4567',
'startDate' => '2020-01-15',
'endDate' => '2023-06-30'
]
]
]
],
[
'searchTypes' => [
[
'searchType' => 'EMPLOYMENT',
'externalSearchId' => '12345678',
'questionnaireUrl' => 'https://verify.example.com/form/abc123',
'questionnaireAccessCode' => 'ACCESS123',
'searchConfig' => [
'channels' => [
'email' => true,
'voice' => false,
'preferredChannel' => 'EMAIL',
'blockedDestinations' => [
'hr-noreply@company.com'
]
],
'timing' => [
'searchSlaMinutes' => 2880,
'outboundWindowMinutes' => 120,
'businessHours' => [
'timezone' => 'America/Chicago',
'startTime' => '09:00',
'endTime' => '16:00',
'allowedDays' => [
1,
2,
3,
4,
5
]
]
],
'outbound' => [
'maxAttemptsPerMethod' => 5,
'maxTotalAttempts' => 12,
'cancelOutboundOnTerminalInbound' => true,
'contactHints' => [
[
'email' => 'hr@company.com',
'priority' => 'HIGH'
]
]
],
'research' => [
'skipResearch' => false
]
]
]
],
'applicant' => [
'firstName' => 'John',
'lastName' => 'Smith',
'ssn' => '123-45-6789',
'birthday' => '1990-05-15',
'phone' => '+1-555-123-4567',
'email' => 'john.smith@example.com',
'signedReleaseFileUrl' => 'https://example.com/signed-release.pdf',
'addresses' => [
[
'addressType' => 'home',
'addressLine1' => '456 Oak Avenue',
'addressLine2' => null,
'addressCity' => 'Los Angeles',
'addressState' => 'CA',
'addressZipCode' => '90210',
'addressCountry' => 'US',
'startDate' => '2021-01-01',
'endDate' => null
],
[
'addressType' => 'home',
'addressLine1' => '123 Main Street',
'addressLine2' => 'Apt 4B',
'addressCity' => 'New York',
'addressState' => 'NY',
'addressZipCode' => '10001',
'addressCountry' => 'US',
'startDate' => '2020-01-01',
'endDate' => '2021-01-01'
]
],
'applicantAlias' => [
[
'firstName' => 'Jonathan',
'lastName' => 'Smith',
'middleName' => 'Michael',
'suffix' => 'Jr.'
]
]
],
'businessContext' => [
'entityName' => 'Acme Corp',
'appliedJobTitle' => 'Senior Software Engineer',
'worksiteCity' => 'San Francisco',
'worksiteState' => 'CA',
'proposedSalary' => 100000,
'positionLevel' => 'STANDARD',
'securityClearanceRequired' => false,
'industrySector' => 'TECHNOLOGY'
],
'history' => [
'employment' => [
[
'employerName' => 'Tech Corp',
'position' => 'Software Engineer',
'employerLocation' => 'San Francisco, CA',
'employerEmail' => 'hr@techcorp.com',
'employerPhone' => '+1-555-123-4567',
'startDate' => '2020-01-15',
'endDate' => '2023-06-30'
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/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://sandbox.theary.ai/background-check/v1/batches"
payload := strings.NewReader("{\n \"orders\": [\n {\n \"searchTypes\": [\n {\n \"searchType\": \"EMPLOYMENT\",\n \"externalSearchId\": \"12345678\",\n \"questionnaireUrl\": \"https://verify.example.com/form/abc123\",\n \"questionnaireAccessCode\": \"ACCESS123\",\n \"searchConfig\": {\n \"channels\": {\n \"email\": true,\n \"voice\": false,\n \"preferredChannel\": \"EMAIL\",\n \"blockedDestinations\": [\n \"hr-noreply@company.com\"\n ]\n },\n \"timing\": {\n \"searchSlaMinutes\": 2880,\n \"outboundWindowMinutes\": 120,\n \"businessHours\": {\n \"timezone\": \"America/Chicago\",\n \"startTime\": \"09:00\",\n \"endTime\": \"16:00\",\n \"allowedDays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ]\n }\n },\n \"outbound\": {\n \"maxAttemptsPerMethod\": 5,\n \"maxTotalAttempts\": 12,\n \"cancelOutboundOnTerminalInbound\": true,\n \"contactHints\": [\n {\n \"email\": \"hr@company.com\",\n \"priority\": \"HIGH\"\n }\n ]\n },\n \"research\": {\n \"skipResearch\": false\n }\n }\n }\n ],\n \"applicant\": {\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"ssn\": \"123-45-6789\",\n \"birthday\": \"1990-05-15\",\n \"phone\": \"+1-555-123-4567\",\n \"email\": \"john.smith@example.com\",\n \"signedReleaseFileUrl\": \"https://example.com/signed-release.pdf\",\n \"addresses\": [\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"456 Oak Avenue\",\n \"addressLine2\": null,\n \"addressCity\": \"Los Angeles\",\n \"addressState\": \"CA\",\n \"addressZipCode\": \"90210\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2021-01-01\",\n \"endDate\": null\n },\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"123 Main Street\",\n \"addressLine2\": \"Apt 4B\",\n \"addressCity\": \"New York\",\n \"addressState\": \"NY\",\n \"addressZipCode\": \"10001\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2020-01-01\",\n \"endDate\": \"2021-01-01\"\n }\n ],\n \"applicantAlias\": [\n {\n \"firstName\": \"Jonathan\",\n \"lastName\": \"Smith\",\n \"middleName\": \"Michael\",\n \"suffix\": \"Jr.\"\n }\n ]\n },\n \"businessContext\": {\n \"entityName\": \"Acme Corp\",\n \"appliedJobTitle\": \"Senior Software Engineer\",\n \"worksiteCity\": \"San Francisco\",\n \"worksiteState\": \"CA\",\n \"proposedSalary\": 100000,\n \"positionLevel\": \"STANDARD\",\n \"securityClearanceRequired\": false,\n \"industrySector\": \"TECHNOLOGY\"\n },\n \"history\": {\n \"employment\": [\n {\n \"employerName\": \"Tech Corp\",\n \"position\": \"Software Engineer\",\n \"employerLocation\": \"San Francisco, CA\",\n \"employerEmail\": \"hr@techcorp.com\",\n \"employerPhone\": \"+1-555-123-4567\",\n \"startDate\": \"2020-01-15\",\n \"endDate\": \"2023-06-30\"\n }\n ]\n }\n },\n {\n \"searchTypes\": [\n {\n \"searchType\": \"EMPLOYMENT\",\n \"externalSearchId\": \"12345678\",\n \"questionnaireUrl\": \"https://verify.example.com/form/abc123\",\n \"questionnaireAccessCode\": \"ACCESS123\",\n \"searchConfig\": {\n \"channels\": {\n \"email\": true,\n \"voice\": false,\n \"preferredChannel\": \"EMAIL\",\n \"blockedDestinations\": [\n \"hr-noreply@company.com\"\n ]\n },\n \"timing\": {\n \"searchSlaMinutes\": 2880,\n \"outboundWindowMinutes\": 120,\n \"businessHours\": {\n \"timezone\": \"America/Chicago\",\n \"startTime\": \"09:00\",\n \"endTime\": \"16:00\",\n \"allowedDays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ]\n }\n },\n \"outbound\": {\n \"maxAttemptsPerMethod\": 5,\n \"maxTotalAttempts\": 12,\n \"cancelOutboundOnTerminalInbound\": true,\n \"contactHints\": [\n {\n \"email\": \"hr@company.com\",\n \"priority\": \"HIGH\"\n }\n ]\n },\n \"research\": {\n \"skipResearch\": false\n }\n }\n }\n ],\n \"applicant\": {\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"ssn\": \"123-45-6789\",\n \"birthday\": \"1990-05-15\",\n \"phone\": \"+1-555-123-4567\",\n \"email\": \"john.smith@example.com\",\n \"signedReleaseFileUrl\": \"https://example.com/signed-release.pdf\",\n \"addresses\": [\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"456 Oak Avenue\",\n \"addressLine2\": null,\n \"addressCity\": \"Los Angeles\",\n \"addressState\": \"CA\",\n \"addressZipCode\": \"90210\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2021-01-01\",\n \"endDate\": null\n },\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"123 Main Street\",\n \"addressLine2\": \"Apt 4B\",\n \"addressCity\": \"New York\",\n \"addressState\": \"NY\",\n \"addressZipCode\": \"10001\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2020-01-01\",\n \"endDate\": \"2021-01-01\"\n }\n ],\n \"applicantAlias\": [\n {\n \"firstName\": \"Jonathan\",\n \"lastName\": \"Smith\",\n \"middleName\": \"Michael\",\n \"suffix\": \"Jr.\"\n }\n ]\n },\n \"businessContext\": {\n \"entityName\": \"Acme Corp\",\n \"appliedJobTitle\": \"Senior Software Engineer\",\n \"worksiteCity\": \"San Francisco\",\n \"worksiteState\": \"CA\",\n \"proposedSalary\": 100000,\n \"positionLevel\": \"STANDARD\",\n \"securityClearanceRequired\": false,\n \"industrySector\": \"TECHNOLOGY\"\n },\n \"history\": {\n \"employment\": [\n {\n \"employerName\": \"Tech Corp\",\n \"position\": \"Software Engineer\",\n \"employerLocation\": \"San Francisco, CA\",\n \"employerEmail\": \"hr@techcorp.com\",\n \"employerPhone\": \"+1-555-123-4567\",\n \"startDate\": \"2020-01-15\",\n \"endDate\": \"2023-06-30\"\n }\n ]\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://sandbox.theary.ai/background-check/v1/batches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"orders\": [\n {\n \"searchTypes\": [\n {\n \"searchType\": \"EMPLOYMENT\",\n \"externalSearchId\": \"12345678\",\n \"questionnaireUrl\": \"https://verify.example.com/form/abc123\",\n \"questionnaireAccessCode\": \"ACCESS123\",\n \"searchConfig\": {\n \"channels\": {\n \"email\": true,\n \"voice\": false,\n \"preferredChannel\": \"EMAIL\",\n \"blockedDestinations\": [\n \"hr-noreply@company.com\"\n ]\n },\n \"timing\": {\n \"searchSlaMinutes\": 2880,\n \"outboundWindowMinutes\": 120,\n \"businessHours\": {\n \"timezone\": \"America/Chicago\",\n \"startTime\": \"09:00\",\n \"endTime\": \"16:00\",\n \"allowedDays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ]\n }\n },\n \"outbound\": {\n \"maxAttemptsPerMethod\": 5,\n \"maxTotalAttempts\": 12,\n \"cancelOutboundOnTerminalInbound\": true,\n \"contactHints\": [\n {\n \"email\": \"hr@company.com\",\n \"priority\": \"HIGH\"\n }\n ]\n },\n \"research\": {\n \"skipResearch\": false\n }\n }\n }\n ],\n \"applicant\": {\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"ssn\": \"123-45-6789\",\n \"birthday\": \"1990-05-15\",\n \"phone\": \"+1-555-123-4567\",\n \"email\": \"john.smith@example.com\",\n \"signedReleaseFileUrl\": \"https://example.com/signed-release.pdf\",\n \"addresses\": [\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"456 Oak Avenue\",\n \"addressLine2\": null,\n \"addressCity\": \"Los Angeles\",\n \"addressState\": \"CA\",\n \"addressZipCode\": \"90210\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2021-01-01\",\n \"endDate\": null\n },\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"123 Main Street\",\n \"addressLine2\": \"Apt 4B\",\n \"addressCity\": \"New York\",\n \"addressState\": \"NY\",\n \"addressZipCode\": \"10001\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2020-01-01\",\n \"endDate\": \"2021-01-01\"\n }\n ],\n \"applicantAlias\": [\n {\n \"firstName\": \"Jonathan\",\n \"lastName\": \"Smith\",\n \"middleName\": \"Michael\",\n \"suffix\": \"Jr.\"\n }\n ]\n },\n \"businessContext\": {\n \"entityName\": \"Acme Corp\",\n \"appliedJobTitle\": \"Senior Software Engineer\",\n \"worksiteCity\": \"San Francisco\",\n \"worksiteState\": \"CA\",\n \"proposedSalary\": 100000,\n \"positionLevel\": \"STANDARD\",\n \"securityClearanceRequired\": false,\n \"industrySector\": \"TECHNOLOGY\"\n },\n \"history\": {\n \"employment\": [\n {\n \"employerName\": \"Tech Corp\",\n \"position\": \"Software Engineer\",\n \"employerLocation\": \"San Francisco, CA\",\n \"employerEmail\": \"hr@techcorp.com\",\n \"employerPhone\": \"+1-555-123-4567\",\n \"startDate\": \"2020-01-15\",\n \"endDate\": \"2023-06-30\"\n }\n ]\n }\n },\n {\n \"searchTypes\": [\n {\n \"searchType\": \"EMPLOYMENT\",\n \"externalSearchId\": \"12345678\",\n \"questionnaireUrl\": \"https://verify.example.com/form/abc123\",\n \"questionnaireAccessCode\": \"ACCESS123\",\n \"searchConfig\": {\n \"channels\": {\n \"email\": true,\n \"voice\": false,\n \"preferredChannel\": \"EMAIL\",\n \"blockedDestinations\": [\n \"hr-noreply@company.com\"\n ]\n },\n \"timing\": {\n \"searchSlaMinutes\": 2880,\n \"outboundWindowMinutes\": 120,\n \"businessHours\": {\n \"timezone\": \"America/Chicago\",\n \"startTime\": \"09:00\",\n \"endTime\": \"16:00\",\n \"allowedDays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ]\n }\n },\n \"outbound\": {\n \"maxAttemptsPerMethod\": 5,\n \"maxTotalAttempts\": 12,\n \"cancelOutboundOnTerminalInbound\": true,\n \"contactHints\": [\n {\n \"email\": \"hr@company.com\",\n \"priority\": \"HIGH\"\n }\n ]\n },\n \"research\": {\n \"skipResearch\": false\n }\n }\n }\n ],\n \"applicant\": {\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"ssn\": \"123-45-6789\",\n \"birthday\": \"1990-05-15\",\n \"phone\": \"+1-555-123-4567\",\n \"email\": \"john.smith@example.com\",\n \"signedReleaseFileUrl\": \"https://example.com/signed-release.pdf\",\n \"addresses\": [\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"456 Oak Avenue\",\n \"addressLine2\": null,\n \"addressCity\": \"Los Angeles\",\n \"addressState\": \"CA\",\n \"addressZipCode\": \"90210\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2021-01-01\",\n \"endDate\": null\n },\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"123 Main Street\",\n \"addressLine2\": \"Apt 4B\",\n \"addressCity\": \"New York\",\n \"addressState\": \"NY\",\n \"addressZipCode\": \"10001\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2020-01-01\",\n \"endDate\": \"2021-01-01\"\n }\n ],\n \"applicantAlias\": [\n {\n \"firstName\": \"Jonathan\",\n \"lastName\": \"Smith\",\n \"middleName\": \"Michael\",\n \"suffix\": \"Jr.\"\n }\n ]\n },\n \"businessContext\": {\n \"entityName\": \"Acme Corp\",\n \"appliedJobTitle\": \"Senior Software Engineer\",\n \"worksiteCity\": \"San Francisco\",\n \"worksiteState\": \"CA\",\n \"proposedSalary\": 100000,\n \"positionLevel\": \"STANDARD\",\n \"securityClearanceRequired\": false,\n \"industrySector\": \"TECHNOLOGY\"\n },\n \"history\": {\n \"employment\": [\n {\n \"employerName\": \"Tech Corp\",\n \"position\": \"Software Engineer\",\n \"employerLocation\": \"San Francisco, CA\",\n \"employerEmail\": \"hr@techcorp.com\",\n \"employerPhone\": \"+1-555-123-4567\",\n \"startDate\": \"2020-01-15\",\n \"endDate\": \"2023-06-30\"\n }\n ]\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.theary.ai/background-check/v1/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"orders\": [\n {\n \"searchTypes\": [\n {\n \"searchType\": \"EMPLOYMENT\",\n \"externalSearchId\": \"12345678\",\n \"questionnaireUrl\": \"https://verify.example.com/form/abc123\",\n \"questionnaireAccessCode\": \"ACCESS123\",\n \"searchConfig\": {\n \"channels\": {\n \"email\": true,\n \"voice\": false,\n \"preferredChannel\": \"EMAIL\",\n \"blockedDestinations\": [\n \"hr-noreply@company.com\"\n ]\n },\n \"timing\": {\n \"searchSlaMinutes\": 2880,\n \"outboundWindowMinutes\": 120,\n \"businessHours\": {\n \"timezone\": \"America/Chicago\",\n \"startTime\": \"09:00\",\n \"endTime\": \"16:00\",\n \"allowedDays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ]\n }\n },\n \"outbound\": {\n \"maxAttemptsPerMethod\": 5,\n \"maxTotalAttempts\": 12,\n \"cancelOutboundOnTerminalInbound\": true,\n \"contactHints\": [\n {\n \"email\": \"hr@company.com\",\n \"priority\": \"HIGH\"\n }\n ]\n },\n \"research\": {\n \"skipResearch\": false\n }\n }\n }\n ],\n \"applicant\": {\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"ssn\": \"123-45-6789\",\n \"birthday\": \"1990-05-15\",\n \"phone\": \"+1-555-123-4567\",\n \"email\": \"john.smith@example.com\",\n \"signedReleaseFileUrl\": \"https://example.com/signed-release.pdf\",\n \"addresses\": [\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"456 Oak Avenue\",\n \"addressLine2\": null,\n \"addressCity\": \"Los Angeles\",\n \"addressState\": \"CA\",\n \"addressZipCode\": \"90210\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2021-01-01\",\n \"endDate\": null\n },\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"123 Main Street\",\n \"addressLine2\": \"Apt 4B\",\n \"addressCity\": \"New York\",\n \"addressState\": \"NY\",\n \"addressZipCode\": \"10001\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2020-01-01\",\n \"endDate\": \"2021-01-01\"\n }\n ],\n \"applicantAlias\": [\n {\n \"firstName\": \"Jonathan\",\n \"lastName\": \"Smith\",\n \"middleName\": \"Michael\",\n \"suffix\": \"Jr.\"\n }\n ]\n },\n \"businessContext\": {\n \"entityName\": \"Acme Corp\",\n \"appliedJobTitle\": \"Senior Software Engineer\",\n \"worksiteCity\": \"San Francisco\",\n \"worksiteState\": \"CA\",\n \"proposedSalary\": 100000,\n \"positionLevel\": \"STANDARD\",\n \"securityClearanceRequired\": false,\n \"industrySector\": \"TECHNOLOGY\"\n },\n \"history\": {\n \"employment\": [\n {\n \"employerName\": \"Tech Corp\",\n \"position\": \"Software Engineer\",\n \"employerLocation\": \"San Francisco, CA\",\n \"employerEmail\": \"hr@techcorp.com\",\n \"employerPhone\": \"+1-555-123-4567\",\n \"startDate\": \"2020-01-15\",\n \"endDate\": \"2023-06-30\"\n }\n ]\n }\n },\n {\n \"searchTypes\": [\n {\n \"searchType\": \"EMPLOYMENT\",\n \"externalSearchId\": \"12345678\",\n \"questionnaireUrl\": \"https://verify.example.com/form/abc123\",\n \"questionnaireAccessCode\": \"ACCESS123\",\n \"searchConfig\": {\n \"channels\": {\n \"email\": true,\n \"voice\": false,\n \"preferredChannel\": \"EMAIL\",\n \"blockedDestinations\": [\n \"hr-noreply@company.com\"\n ]\n },\n \"timing\": {\n \"searchSlaMinutes\": 2880,\n \"outboundWindowMinutes\": 120,\n \"businessHours\": {\n \"timezone\": \"America/Chicago\",\n \"startTime\": \"09:00\",\n \"endTime\": \"16:00\",\n \"allowedDays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ]\n }\n },\n \"outbound\": {\n \"maxAttemptsPerMethod\": 5,\n \"maxTotalAttempts\": 12,\n \"cancelOutboundOnTerminalInbound\": true,\n \"contactHints\": [\n {\n \"email\": \"hr@company.com\",\n \"priority\": \"HIGH\"\n }\n ]\n },\n \"research\": {\n \"skipResearch\": false\n }\n }\n }\n ],\n \"applicant\": {\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"ssn\": \"123-45-6789\",\n \"birthday\": \"1990-05-15\",\n \"phone\": \"+1-555-123-4567\",\n \"email\": \"john.smith@example.com\",\n \"signedReleaseFileUrl\": \"https://example.com/signed-release.pdf\",\n \"addresses\": [\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"456 Oak Avenue\",\n \"addressLine2\": null,\n \"addressCity\": \"Los Angeles\",\n \"addressState\": \"CA\",\n \"addressZipCode\": \"90210\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2021-01-01\",\n \"endDate\": null\n },\n {\n \"addressType\": \"home\",\n \"addressLine1\": \"123 Main Street\",\n \"addressLine2\": \"Apt 4B\",\n \"addressCity\": \"New York\",\n \"addressState\": \"NY\",\n \"addressZipCode\": \"10001\",\n \"addressCountry\": \"US\",\n \"startDate\": \"2020-01-01\",\n \"endDate\": \"2021-01-01\"\n }\n ],\n \"applicantAlias\": [\n {\n \"firstName\": \"Jonathan\",\n \"lastName\": \"Smith\",\n \"middleName\": \"Michael\",\n \"suffix\": \"Jr.\"\n }\n ]\n },\n \"businessContext\": {\n \"entityName\": \"Acme Corp\",\n \"appliedJobTitle\": \"Senior Software Engineer\",\n \"worksiteCity\": \"San Francisco\",\n \"worksiteState\": \"CA\",\n \"proposedSalary\": 100000,\n \"positionLevel\": \"STANDARD\",\n \"securityClearanceRequired\": false,\n \"industrySector\": \"TECHNOLOGY\"\n },\n \"history\": {\n \"employment\": [\n {\n \"employerName\": \"Tech Corp\",\n \"position\": \"Software Engineer\",\n \"employerLocation\": \"San Francisco, CA\",\n \"employerEmail\": \"hr@techcorp.com\",\n \"employerPhone\": \"+1-555-123-4567\",\n \"startDate\": \"2020-01-15\",\n \"endDate\": \"2023-06-30\"\n }\n ]\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"batchId": "<string>",
"orders": [
{
"verificationOrderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"searchIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
]
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}Create Batch Orders
Batch create submits multiple orders in one request. Each order is independent — persist every returned
verificationOrderId and track work with individual order endpoints.batchId plus per-order results.
This is not an atomic transaction: if the request fails after some orders succeed, you may have partial creates. Persist each returned
verificationOrderId / searchIds and reconcile. If any order throws during validation or creation, the whole request fails.Request
array
required
Non-empty array of objects with the same shape as Create order (
applicant, businessContext, searchTypes, optional history, webhookConfig, defaultSearchConfig, etc.).Response
boolean
true when all orders in the batch were created without errorstring
Client-facing id generated for this request (not stored server-side for later GET list/batch)
number
Count of orders returned in
ordersarray
Array of per-order results (same shapes as single create)
Example Request
Each element inorders must match Verification request. Minimal employment-oriented example (two orders):
curl -sS -X POST "https://sandbox.theary.ai/background-check/v1/batches" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"orders": [
{
"applicant": {
"firstName": "John",
"lastName": "Smith",
"ssn": "123-45-6789",
"birthday": "1990-05-15",
"phone": "+1-555-123-4567",
"email": "john.smith@example.com",
"signedReleaseFileUrl": "https://example.com/signed-release.pdf",
"addresses": [
{
"addressType": "home",
"addressLine1": "456 Oak Avenue",
"addressLine2": null,
"addressCity": "Los Angeles",
"addressState": "CA",
"addressZipCode": "90210",
"addressCountry": "US",
"startDate": "2021-01-01",
"endDate": null
}
]
},
"businessContext": {
"entityName": "Acme Corp",
"appliedJobTitle": "Senior Software Engineer",
"worksiteCity": "San Francisco",
"worksiteState": "CA",
"proposedSalary": 100000,
"positionLevel": "STANDARD",
"securityClearanceRequired": false,
"industrySector": "TECHNOLOGY"
},
"searchTypes": [{ "searchType": "EMPLOYMENT" }],
"history": {
"employment": [
{
"employerName": "Tech Corp",
"position": "Software Engineer",
"employerLocation": "San Francisco, CA",
"employerEmail": "hr@techcorp.com",
"employerPhone": "+1-555-123-4567",
"startDate": "2020-01-15",
"endDate": "2023-06-30"
}
]
}
},
{
"applicant": {
"firstName": "Jane",
"lastName": "Doe",
"ssn": "987-65-4321",
"birthday": "1992-08-20",
"phone": "+1-555-987-6543",
"email": "jane.doe@example.com",
"signedReleaseFileUrl": "https://example.com/signed-release-2.pdf",
"addresses": [
{
"addressType": "home",
"addressLine1": "100 Market St",
"addressLine2": null,
"addressCity": "San Francisco",
"addressState": "CA",
"addressZipCode": "94105",
"addressCountry": "US",
"startDate": "2020-06-01",
"endDate": null
}
]
},
"businessContext": {
"entityName": "Acme Corp",
"appliedJobTitle": "Engineer",
"worksiteCity": "Austin",
"worksiteState": "TX",
"proposedSalary": 120000,
"positionLevel": "STANDARD",
"securityClearanceRequired": false,
"industrySector": "TECHNOLOGY"
},
"searchTypes": [{ "searchType": "EMPLOYMENT" }],
"history": {
"employment": [
{
"employerName": "Acme Corp",
"position": "Engineer",
"employerLocation": "Austin, TX",
"startDate": "2019-01-01",
"endDate": "2023-01-01"
}
]
},
"webhookConfig": {
"enabled": true,
"secret": "your-webhook-secret-key",
"retryAttempts": 3,
"closeoutEndpoints": {
"EMPLOYMENT": [
{
"url": "https://your-app.com/webhooks/employment",
"events": ["verification.completed"]
}
]
},
"fallbackEndpoint": [
{
"url": "https://your-app.com/webhooks/all-events",
"events": ["verification.action_required"]
}
]
}
}
]
}'
Example Response
{
"success": true,
"batchId": "batch_1642789123_abc123def",
"ordersCreated": 2,
"orders": [
{
"verificationOrderId": "123e4567-e89b-12d3-a456-426614174000",
"searchIds": ["456e7890-e89b-12d3-a456-426614174001"]
},
{
"verificationOrderId": "789e4567-e89b-12d3-a456-426614174002",
"searchIds": ["012e7890-e89b-12d3-a456-426614174003"]
}
]
}
Error responses
| Status | When |
|---|---|
400 | orders array is empty (at least one order is required). |
400 | Any single order fails validation (same rules as Create order). |
401 | Missing or invalid Bearer JWT, or JWT missing the tenant claim. |
500 | A mid-flight failure while creating orders in parallel. Because orders are created concurrently (see the non-atomic behavior noted above), a failure partway through can surface as a 500 after some orders have already been created — reconcile using the persisted per-order results before retrying. |
{
"statusCode": 400,
"message": ["Batch must contain at least one order"],
"error": "Bad Request"
}
{
"statusCode": 401,
"message": "Unauthorized"
}
Notes
- There is no batch list/get/delete API — track and cancel work with List orders, Get order, and Delete order.
- For webhook shapes see WebhookConfig and WebhookTarget.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Array of verification orders to process in batch
Show child attributes
Show child attributes
Example:
[{}]
⌘I

