directorships field returns a JSON array. Each entry follows the structure below.
- GraphQL
- cURL
- Javascript
query FetchCheckResults {
fetchCheckResults(where: { externalId: "HPEXAMPLE" }) {
directorships
}
}
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_PUBLIC_API_TOKEN" \
-d '{
"query": "query FetchCheckResults { fetchCheckResults(where: { externalId: \"HPEXAMPLE\" }) { directorships } }"
}' \
https://api.hirepass.com/applicant
const fetchData = async () => {
try {
const response = await fetch("https://api.hirepass.com/applicant", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_PUBLIC_API_TOKEN",
},
body: JSON.stringify({
query: `
query FetchCheckResults {
fetchCheckResults(where: { externalId: "HPEXAMPLE" }) {
directorships
}
}
`,
}),
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
console.log("Response data:", data);
} catch (error) {
console.error("Error:", error);
}
};
fetchData();
Response structure
Each entry in thedirectorships array contains:
| Field | Type | Description |
|---|---|---|
id | Int | Record ID |
countryId | Int | Country of the company |
companyName | String | Registered company name |
companyStatus | String | Current status of the company |
companyRegistrationNumber | String | Company registration number |
companyRegistrationDate | String | Date the company was registered |
companyRegisteredAddress | String | Registered address of the company |
position | String | Applicant’s position in the company |
appointmentDate | String | Date of appointment |
resignationDate | String | Date of resignation, if applicable |

