Get job details
curl --request GET \
--url http://localhost:8000/v1/jobs/{job_id} \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8000/v1/jobs/{job_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8000/v1/jobs/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/v1/jobs/{job_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/v1/jobs/{job_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8000/v1/jobs/{job_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/jobs/{job_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"classification_reasoning": "Document is a vendor invoice with itemized charges.",
"created_at": "2025-11-27T10:30:00Z",
"document_id": "6789def0-abcd-4567-ef01-23456789abcd",
"document_type": "invoice",
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"processing_completed_at": "2025-11-27T10:30:45Z",
"processing_started_at": "2025-11-27T10:30:05Z",
"processing_time_seconds": 40,
"status": "completed"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}jobs
Get job details
Retrieve details for a specific extraction job.
Returns comprehensive information about an extraction job including status, timestamps, processing time, and error messages if applicable.
Args: job_id: UUID of the extraction job to retrieve. session_and_auth: Database session and auth context (injected).
Returns: JobDetailResponse: Full job details including all timestamps and error info.
Raises: HTTPException 404: Job not found or not accessible by tenant.
Edge Cases:
- Tenant isolation: RLS ensures 404 (not 403) for other tenants’ jobs.
- Null timestamps: processing_started_at and processing_completed_at are null for pending jobs; processing_completed_at is null for processing jobs.
- Error messages: error_message is only populated for failed jobs.
- Processing time: processing_time_seconds is null until job completes.
GET
/
v1
/
jobs
/
{job_id}
Get job details
curl --request GET \
--url http://localhost:8000/v1/jobs/{job_id} \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8000/v1/jobs/{job_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8000/v1/jobs/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/v1/jobs/{job_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/v1/jobs/{job_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8000/v1/jobs/{job_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/jobs/{job_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"classification_reasoning": "Document is a vendor invoice with itemized charges.",
"created_at": "2025-11-27T10:30:00Z",
"document_id": "6789def0-abcd-4567-ef01-23456789abcd",
"document_type": "invoice",
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"processing_completed_at": "2025-11-27T10:30:45Z",
"processing_started_at": "2025-11-27T10:30:05Z",
"processing_time_seconds": 40,
"status": "completed"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Response
Detailed information about the extraction job
Response for job detail (GET /v1/jobs/{id}).
Note: Webhooks are configured separately via POST /v1/webhooks.