- GraphQL
- cURL
- Javascript
query FetchCheckResults {
fetchCheckResults(where: { externalId: "HPEXAMPLE" }) {
identity {
status
name
firstName
middleName
surname
dateOfBirth
remarks
timestamp
passportNumber
passportCountryId
passportIssueDate
passportExpiryDate
passportFileId
nationalIdCardNumber
nationalIdCardCountryId
nationalIdCardIssueDate
nationalIdCardExpiryDate
nationalIdCardFileId
drivingLicenceNumber
drivingLicenceCountryId
drivingLicenceIssueDate
drivingLicenceExpiryDate
drivingLicenceFileId
globalAuth
globalIdsp
globalLevel
globalPolicy
globalProfile
updatedAt
createdAt
personaChecks {
id
name
status
}
files {
uri
mime
name
size
}
}
}
}
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_PUBLIC_API_TOKEN" \
-d '{
"query": "query FetchCheckResults { fetchCheckResults(where: { externalId: \"HPEXAMPLE\" }) { identity { status name firstName middleName surname dateOfBirth remarks timestamp passportNumber passportCountryId passportIssueDate passportExpiryDate passportFileId nationalIdCardNumber nationalIdCardCountryId nationalIdCardIssueDate nationalIdCardExpiryDate nationalIdCardFileId drivingLicenceNumber drivingLicenceCountryId drivingLicenceIssueDate drivingLicenceExpiryDate drivingLicenceFileId globalAuth globalIdsp globalLevel globalPolicy globalProfile updatedAt createdAt personaChecks { id name status } files { uri mime name size } } } }"
}' \
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" }) {
identity {
status
name
firstName
middleName
surname
dateOfBirth
remarks
timestamp
passportNumber
passportCountryId
passportIssueDate
passportExpiryDate
passportFileId
nationalIdCardNumber
nationalIdCardCountryId
nationalIdCardIssueDate
nationalIdCardExpiryDate
nationalIdCardFileId
drivingLicenceNumber
drivingLicenceCountryId
drivingLicenceIssueDate
drivingLicenceExpiryDate
drivingLicenceFileId
globalAuth
globalIdsp
globalLevel
globalPolicy
globalProfile
updatedAt
createdAt
personaChecks {
id
name
status
}
files {
uri
mime
name
size
}
}
}
}
`,
}),
});
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();

