getJobResults method
Gets the results of a completed bulk validation job.
This method should only be called after the job status is 'COMPLETED'. For jobs that are still processing, use getJobStatus to check progress.
jobId The ID of the completed job.
Returns a BulkValidationResult containing all validation results and a summary.
Throws an ApiException if:
- The job ID is invalid (404)
- The job is not yet completed
- The API key is invalid (401)
- Network or server errors occur
Example:
final results = await client.getJobResults(job.id);
print('Valid: ${results.summary.valid}');
print('Invalid: ${results.summary.invalid}');
for (final result in results.results) {
print('${result.email}: ${result.isValid}');
}
Implementation
Future<BulkValidationResult> getJobResults(String jobId) async {
return _request<BulkValidationResult>(
'GET',
'/api/v1/jobs/$jobId/results',
null,
(json) => BulkValidationResult.fromJson(json),
);
}