APIsWebhooksTest Completed

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

FieldTypeDescription
testIdstringUnique identifier of the completed test
scorenumberTest score in percentage (0-100)
reportPdfUrlstringURL to download the test report PDF
testStatusstringStatus of the test completion

Test Status Values

StatusDescription
COMPLETEDTest has been completed successfully
TECH_COMPLETEDTechnical 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 });
});