- GraphQL
- cURL
- Javascript
Copy
query AllCheckRequests {
allCheckRequests {
CheckPackage {
name
}
Applicant {
firstName
middleName
surname
email
}
uuid
createdAt
}
}
Copy
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_PUBLIC_API_TOKEN" \
-d '{
"query": "query AllCheckRequests {
allCheckRequests(where: { \"PACK_ONE\" }) {
CheckPackage {
name
}
Applicant {
firstName
middleName
surname
email
}
uuid
createdAt
}
}"
}' \
https://api.hirepass.com/applicant
Copy
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 AllCheckRequests {
allCheckRequests {
CheckPackage {
name
}
Applicant {
firstName
middleName
surname
email
}
uuid
createdAt
}
}
`,
}),
});
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);
}
};
// Call the function
fetchData();

