When you submit a batch verification job to the Intelligent Verification API, it's essential to periodically check its status. This guide will walk you through the process of polling the status of your job and understanding the response.
How to Poll for Job Status:
-
Determine Polling Frequency: It's recommended to:
- Poll every 5 to 10 seconds for smaller files (less than 1,000 records).
- Poll less frequently for larger files.
-
Make the API Call: Use the following cURL command to check the status of your batch job:
curl \ --location \ --request POST \ 'https://api.lastbounce.com/api/batch/c4f3c554-76e2-4a0e-8331-5c7551a8a250/status' \ --header 'x-api-key: DdTHUVFAI4Q6u810nlKhfIhHHo8qmoYqJD4Ns7jJ'
Replace
c4f3c554-76e2-4a0e-8331-5c7551a8a250
with your specificjobId
. -
Understand the Response: The API will return a JSON detailing the status and metrics of your batch job. A sample response might look like:
{ "jobId": "c4f3c554-76e2-4a0e-8331-5c7551a8a250", "countDetail": { "validCount": 2, "invalidCount": 0, "acceptAllCount": 0, "riskyCount": 0, "duplicateCount": 0, "unknownCount": 1 }, "totalEmail": 3, "totalProcessedEmail": 3, "status": "COMPLETED", "createDate": "2022-03-01T03:57:15.97998Z", "completeDate": "2022-03-01T03:57:27.724657Z", "processedTime": 11, "processed": 100 }
Key fields to note:
- status: Indicates the current state of the batch job. It can show 'IN_PROGRESS' if still processing or 'COMPLETED' when the job has finished.
- countDetail: Provides counts for different categories like valid emails, duplicates, unknowns, etc.
- totalEmail: Total number of emails submitted.
- totalProcessedEmail: Count of emails processed so far.
-
Proceed Based on Status:
- If the
status
is 'IN_PROGRESS', continue polling. - If the
status
is 'COMPLETED', the results download file is ready for retrieval.
- If the
Comments
0 comments
Article is closed for comments.