- GraphQL
- cURL
- Javascript
Copy
query FetchCheckRequest {
fetchCheckRequest(where: { externalId: "HPEXAMPLE" }) {
formQuestions {
order
uuid
type
label
answer
isFromProfessionalForm
comment
files {
name
mime
size
uri
}
}
}
}
Copy
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_PUBLIC_API_TOKEN" \
-d '{
"query": "query FetchCheckRequest {
fetchCheckRequest(where: { externalId: \"HPEXAMPLE\" }) {
formQuestions {
order
uuid
type
label
answer
isFromProfessionalForm
comment
files {
name
mime
size
uri
}
}
}
}"
}' \
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 FetchCheckRequest {
fetchCheckRequest(where: { externalId: "HPEXAMPLE" }) {
formQuestions {
order
uuid
type
label
answer
isFromProfessionalForm
comment
files {
name
mime
size
uri
}
}
}
}
`,
}),
});
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();

