Skip to content

Job Status API

Overview

Retrieve the status and available result or error for a job belonging to the authenticated user.

Endpoint

GET https://api.apidatatools.com/jobs/{job_id}

Authentication

Send your API key in the x-api-key header.

Headers

Header Type Required Default / values Description
x-api-key String Yes Your API key Authenticates the request.

Request parameters

Parameter Location Type Required Description
job_id Path String Yes ID of the job to look up.

cURL example

curl --request GET \
  --url "https://api.apidatatools.com/jobs/YOUR_JOB_ID" \
  --header "x-api-key: YOUR_API_KEY"

Success responses

A successful request returns HTTP 200 and a JSON object containing the job’s request_id, job_id, status, created_at, and updated_at.

Job still processing

For a job that has not completed, the response also includes a message and retry_after.

{
  "request_id": "req_123",
  "job_id": "YOUR_JOB_ID",
  "status": "pending",
  "created_at": 1720000000,
  "updated_at": 1720000000,
  "message": "Your job is being processed.",
  "retry_after": 2
}

Job completed successfully

A successful job includes its result.

{
  "request_id": "req_123",
  "job_id": "YOUR_JOB_ID",
  "status": "success",
  "created_at": 1720000000,
  "updated_at": 1720000010,
  "result": {}
}

Job failed

A failed job includes an error object. Its code, message, and details are derived from the job’s stored error information and may be absent or empty.

{
  "request_id": "req_123",
  "job_id": "YOUR_JOB_ID",
  "status": "failed",
  "created_at": 1720000000,
  "updated_at": 1720000010,
  "error": {
    "code": "ERROR_CODE",
    "message": "The job could not be completed.",
    "details": {
      "message": "The job could not be completed."
    }
  }
}

Error handling

Errors use an envelope containing status, error, request_id, and details.message; additional details may be included. Status codes below reflect the management endpoint’s responses.

HTTP status Error code Meaning
400 INVALID_JOB_ID The job_id path parameter is missing.
400 JOB_NOT_FOUND No job was found for the supplied ID.
400 FORBIDDEN The job does not belong to the authenticated user.
400 DDB_ERROR The service could not query the job record.
401 UNAUTHORIZED Authentication context is missing or invalid.
404 USER_NOT_FOUND The authenticated user was not found.
429 RATE_LIMITED The request rate limit was exceeded.
500 PLAN_NOT_FOUND The user’s plan configuration could not be found.
500 INTERNAL_ERROR An unexpected error occurred.

Notes

  • This endpoint looks up an existing job; it does not submit a job.
  • The request_id in a successful response is the request ID associated with the job.