Skip to main content

Get Job Status

Monitor the processing status of enrichment and extraction jobs to track progress and determine when results are ready.

Endpoint: GET https://api.walkerstdata.com.au/v1/jobs/{jobId}/status

Request

curl -X GET "https://api.walkerstdata.com.au/v1/jobs/550e8400-e29b-41d4-a716-446655440000/status" \
-H "x-api-key: YOUR_API_KEY"

Response Examples

New Job

{
"data": {
"jobId": "550e8400-e29b-41d4-a716-446655440000",
"status": "New",
"message": "",
"type": "Enrichment",
"totalReceivedTransactions": 100,
"totalProcessedTransactions": 0
},
"message": null
}

Processing Job

{
"data": {
"jobId": "550e8400-e29b-41d4-a716-446655440000",
"status": "Processing",
"message": "",
"type": "Enrichment",
"totalReceivedTransactions": 100,
"totalProcessedTransactions": 45
},
"message": null
}

Completed Job

{
"data": {
"jobId": "550e8400-e29b-41d4-a716-446655440000",
"status": "Completed",
"message": "",
"type": "Enrichment",
"totalReceivedTransactions": 100,
"totalProcessedTransactions": 100
},
"message": null
}

Failed Job

{
"data": {
"jobId": "550e8400-e29b-41d4-a716-446655440000",
"status": "Failed",
"message": "Processing error: Invalid transaction format",
"type": "Enrichment",
"totalReceivedTransactions": 100,
"totalProcessedTransactions": 0
},
"message": null
}

Response Fields

FieldDescriptionWhen Present
jobIdUnique identifier for the jobAlways
statusCurrent processing state: New, Processing, Completed, FailedAlways
messageStatus message or error description (empty string on success)Always
typeJob type: Enrichment or ExtractionAlways
totalReceivedTransactionsTotal number of transactions submitted in the batchAlways
totalProcessedTransactionsNumber of transactions successfully processedAlways

Polling Pattern

For monitoring job progress, you may wish to implement a polling strategy:

const pollJobStatus = async (jobId, maxAttempts = 60, intervalMs = 5000) => {
for (let attempt = 0; attempt < maxAttempts; attempt++) {
const response = await fetch(`https://api.walkerstdata.com.au/v1/jobs/${jobId}/status`, {
headers: { 'x-api-key': 'YOUR_API_KEY' }
});

const result = await response.json();
const status = result.data.status;

if (status === 'Completed') {
console.log('Job completed successfully!');
return result.data;
} else if (status === 'Failed') {
throw new Error(`Job failed: ${result.data.message || 'Unknown error'}`);
}

console.log(`Job status: ${status}, waiting...`);
await new Promise(resolve => setTimeout(resolve, intervalMs));
}

throw new Error('Job polling timeout');
};

// Usage
try {
const completedJob = await pollJobStatus('550e8400-e29b-41d4-a716-446655440000');
console.log('Total processed transactions:', completedJob.totalProcessedTransactions);
} catch (error) {
console.error('Job monitoring failed:', error.message);
}

Use Cases

  • Progress monitoring: Track enrichment or extraction job progress
  • Workflow coordination: Determine when to retrieve processed results
  • Error handling: Detect and respond to processing failures
  • Performance metrics: Analyze job processing times and success rates

Next Steps

When a job shows Completed status:

  • Retrieve results: Get enriched transactions using the job ID
  • Analyze data: Process the categorized transaction data
  • Handle errors: For failed jobs, review error details and retry if appropriate