Test Completed Webhook Payload
This webhook is triggered when a test is completed. You can track test completion details through this webhook payload.
Webhook Event
Event Type: TEST_COMPLETED
Payload
{
"testId": "test-345678",
"score": 85.5,
"reportPdfUrl": "https://app.ezyhire.com/reports/test/61571280-6597-44c2-84a6-cb813d1c30d2.pdf",
"testStatus": "COMPLETED"
}
Payload Fields
Field | Type | Description |
---|---|---|
testId | string | Unique identifier of the completed test |
score | number | Test score in percentage (0-100) |
reportPdfUrl | string | URL to download the test report PDF |
testStatus | string | Status of the test completion |
Test Status Values
Status | Description |
---|---|
COMPLETED | Test has been completed successfully |
TECH_COMPLETED | Technical test has been completed |
Example Webhook Handler
app.post('/webhook/test-completed', (req, res) => {
const { testId, score, reportPdfUrl, testStatus } = req.body;
console.log('Test completed:', {
testId,
score: `${score}%`,
status: testStatus,
reportUrl: reportPdfUrl
});
// Process the webhook data
// Update your database, send notifications, etc.
res.status(200).json({ received: true });
});