Get a job's values in its template's shape
JOB_ID=7c9e6679-7425-40de-944b-e07fc1f90ae7 # the jobId the submission answered with
curl -sS "https://api.speccapture.com/v1/extractions/$JOB_ID/values" \ -H "Authorization: Bearer $SPECCAPTURE_API_KEY"using System.Text.Json;
using HttpClient http = new() { BaseAddress = new Uri("https://api.speccapture.com") };http.DefaultRequestHeaders.Authorization = new("Bearer", Environment.GetEnvironmentVariable("SPECCAPTURE_API_KEY"));
string jobId = args[0]; // the jobId the submission answered with
HttpResponseMessage response = await Call(HttpMethod.Get, $"/v1/extractions/{jobId}/values");Console.WriteLine(await response.Content.ReadAsStringAsync());
// Sends a request; stops with the problem's code and detail if the API refuses it.async Task<HttpResponseMessage> Call(HttpMethod method, string path, HttpContent? body = null, string? idempotencyKey = null) { using HttpRequestMessage request = new(method, path) { Content = body }; if (idempotencyKey is not null) request.Headers.Add("Idempotency-Key", idempotencyKey); HttpResponseMessage response = await http.SendAsync(request); if (!response.IsSuccessStatusCode) { JsonElement problem = await Json(response); string? detail = (problem.TryGetProperty("detail", out JsonElement text) ? text : problem.GetProperty("title")).GetString(); Console.Error.WriteLine($"{(int)response.StatusCode} {problem.GetProperty("code")}: {detail}"); Environment.Exit(1); } return response;}
// Reads an answer as JSON.static async Task<JsonElement> Json(HttpResponseMessage response) => JsonDocument.Parse(await response.Content.ReadAsStringAsync()).RootElement;import osimport sys
import requests
API = "https://api.speccapture.com"session = requests.Session()session.headers["Authorization"] = f"Bearer {os.environ['SPECCAPTURE_API_KEY']}"
def call(method, path, **kwargs): """Send a request; stop with the problem's code and detail if the API refuses it.""" response = session.request(method, API + path, **kwargs) if not response.ok: problem = response.json() sys.exit(f"{response.status_code} {problem['code']}: {problem.get('detail', problem['title'])}") return response
job_id = sys.argv[1] # the jobId the submission answered with
print(call("GET", f"/v1/extractions/{job_id}/values").text)const API = "https://api.speccapture.com";const headers = { Authorization: `Bearer ${process.env.SPECCAPTURE_API_KEY}` };
const [jobId] = process.argv.slice(2); // the jobId the submission answered with
console.log(await call("GET", `/v1/extractions/${jobId}/values`).then((response) => response.text()));
// Sends a request; stops with the problem's code and detail if the API refuses it.async function call(method, path, init = {}) { const response = await fetch(API + path, { ...init, method, headers: { ...headers, ...init.headers } }); if (!response.ok) { const problem = await response.json(); console.error(`${response.status} ${problem.code}: ${problem.detail ?? problem.title}`); process.exit(1); } return response;}The job and every sheet in the shape its template’s output chooses: each sheet’s data holds its values under the template’s keys (its names, or SpecCapture’s paths), flat or with the fields grouped by section, each table as an array of row objects and the notes as an array; every field the template keeps is there, null when the drawing does not give it. When the template does not carry the review state, a value still waiting for a person is null in data and named in waitingForReview by its JSON Pointer, so nothing unchecked is taken as final. When it carries extras, evidence mirrors data key for key with each value’s reviewState and reviewReasons, confidence, asRead, box and quote, as the template chooses. keys=paths keys every value by SpecCapture’s paths (titleBlock.partNumber, bom, qty), which a rename never changes, and keys=names by the template’s names, whatever the template chose; left out, the template’s own. Works at any point in the job’s life: a sheet not read yet has no data. GET /v1/extractions/{jobId} and its sheets stay the complete representation.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The job’s id: the jobId POST /v1/extractions answered with, or one GET /v1/extractions lists.
Query Parameters
Section titled “Query Parameters”What the values are keyed by: names, the template’s names, or paths, SpecCapture’s keys (titleBlock.partNumber, bom, qty), which a rename never changes. Changes a template-shaped answer or json file only: the complete answer carries both each value’s path and its name. The template’s own choice when left out.
Responses
Section titled “Responses”OK
A job and every sheet in its template’s shape: GET /v1/extractions/{jobId}?shape=template. The same representation a template whose JSON is flat or nested exports, without the file’s own formatVersion, workspace and exportedAt.
object
flat or nested: how data is laid out.
names (the template’s names) or paths (SpecCapture’s keys, which a rename never changes).
The job.
object
The job’s id.
Where the job is.
The uploaded file’s name, as it was sent.
The pages counted when the file was accepted.
When the file was accepted.
When its last sheet finished, or the job failed; null until then.
Where the job is, complete: /v1/extractions/{jobId}.
The template and version the job keeps.
object
drawing, or the workspace template’s id.
The template’s version the job was uploaded with, and keeps for good.
What the workspace calls the template now; “Standard” for drawing.
Every sheet, in page order.
One sheet’s values in the shape its template’s output chooses: data holds each value under the template’s key for it - flat, or the fields grouped by section - each table as an array of row objects and the notes as an array, the number each note is printed with in noteNumbers; evidence, when the template carries any extra, mirrors data key for key with what stands behind each value (its review state, confidence, box, quote, what was read beside a correction).
object
1 for the file’s first page.
Where the sheet is: a sheet not read has no data.
Whether a read sheet’s values can be used as delivered.
autoAccepted: Every value cleared the confidence threshold and nothing asked for a person’s look - a value the drawing does not print among them, settled as not printed (notPrinted), and a company name not found (notFound).needsReview: At least one value, or the sheet as a whole, needs a person to look.reviewed: A person has accepted or corrected every value that needed it.
When the template does not carry the review state: where in data a value still waiting for a person was left out (as null), as JSON Pointers - /Part Number, /Bill of Materials/0/Quantity - so nothing unchecked is taken as final. Empty when nothing waits; left out when the review state is carried.
The engine version that read the sheet; present only when the template carries each sheet’s details and the sheet has been read.
When the sheet was read; present only when the template carries each sheet’s details and the sheet has been read.
The number each general note in data is printed with, in the same order as the notes: 4 for 4. REMOVE ALL BURRS, read off the note’s front and never counted, so notes printed 1, 2, 4 are numbered 1, 2, 4. null for a note printed with no number, and for one left out of data while it waits for a person. Left out when the sheet has no notes array: the template leaves the notes out, or the sheet has not been read.
Examples
Both sheets in the template's shape: plain values under its names, each one's confidence and quote as evidence
{ "shape": "flat", "keys": "names", "extraction": { "jobId": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "status": "completed", "fileName": "bracket.pdf", "sheetCount": 2, "createdAt": "2026-10-14T09:30:12+00:00", "completedAt": "2026-10-14T09:31:22+00:00", "url": "/v1/extractions/7c9e6679-7425-40de-944b-e07fc1f90ae7" }, "template": { "templateId": "c2b8f3a1-7e5d-4c9a-8f6b-1a2d3e4f5a6b", "version": 3, "name": "ERP import" }, "sheets": [ { "sheetNumber": 1, "status": "completed", "reviewState": "needsReview", "data": { "Part No.": "SC-10432", "Rev": "C", "Description": "BRACKET, MOUNTING", "Material": "AL 6061-T6 PER ASTM B209", "Finish": "ANODIZE PER MIL-A-8625 TYPE II, CLASS 1, BLACK", "Drawn by": null, "Parts list": [ { "Item": "1", "Quantity": "1", "Part Number": "SC-10433", "Description": "BRACKET BODY" }, { "Item": "2", "Quantity": "4", "Part Number": "MS24693-C272", "Description": "SCREW, MACHINE, FLAT HEAD" } ], "General notes": [ "1. ALL DIMENSIONS ARE IN INCHES.", "2. BREAK ALL SHARP EDGES .005-.015." ] }, "waitingForReview": [ "/Drawn by" ], "evidence": { "Part No.": { "confidence": 0.98, "quote": "PART NO SC-10432" }, "Rev": { "confidence": 0.99, "quote": "REV C" }, "Description": { "confidence": 0.96, "quote": "BRACKET, MOUNTING" }, "Material": { "confidence": 0.94, "quote": "MATERIAL: AL 6061-T6 PER ASTM B209" }, "Finish": { "confidence": null, "quote": "FINISH: ANODIZE PER MIL-A-8625 TYPE II CL 1" }, "Drawn by": { "confidence": 0.81, "quote": "DRAWN J. MORALES" }, "Parts list": [ { "Item": { "confidence": 0.99, "quote": null }, "Quantity": { "confidence": 0.99, "quote": null }, "Part Number": { "confidence": 0.97, "quote": null }, "Description": { "confidence": 0.97, "quote": null } }, { "Item": { "confidence": 0.99, "quote": null }, "Quantity": { "confidence": 0.98, "quote": null }, "Part Number": { "confidence": 0.95, "quote": null }, "Description": { "confidence": 0.96, "quote": null } } ], "General notes": [ { "confidence": null, "quote": null }, { "confidence": null, "quote": null } ] }, "noteNumbers": [ 1, 2 ] }, { "sheetNumber": 2, "status": "completed", "reviewState": "autoAccepted", "data": { "Part No.": "SC-10432", "Rev": "C", "Description": "BRACKET, MOUNTING", "Material": null, "Finish": null, "Drawn by": "J. MORALES", "Parts list": [], "General notes": [] }, "waitingForReview": [], "evidence": { "Part No.": { "confidence": 0.97, "quote": "PART NO SC-10432" }, "Rev": { "confidence": 0.99, "quote": "REV C" }, "Description": { "confidence": 0.95, "quote": "BRACKET, MOUNTING" }, "Material": { "confidence": 0, "quote": null }, "Finish": { "confidence": 0, "quote": null }, "Drawn by": { "confidence": 0.93, "quote": "DRAWN J. MORALES" }, "Parts list": [], "General notes": [] }, "noteNumbers": [] } ]}Bad Request: a problem with a stable code. See Errors for every code and what to do about it.
Every error: a problem with a stable code. https://speccapture.com/docs/api/errors lists every code.
object
A link to the code’s entry in the docs.
What went wrong, in a few words for a person: the same for every problem with this code.
The HTTP status of the answer.
What went wrong with this request and what to do about it, in a sentence or two for a person. Present on nearly every problem.
The path of the request that was refused.
What went wrong, as a stable code to branch on: a published code never changes meaning.
This request’s trace: quote it when asking for help.
Examples
The request is not valid.
{ "type": "https://speccapture.com/docs/api/errors#invalid_request", "title": "The request is not valid.", "status": 400, "detail": "keys must be names or paths; leave it out for the template's own.", "instance": "/v1/extractions/7c9e6679-7425-40de-944b-e07fc1f90ae7/values", "code": "invalid_request", "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"}Not Found: a problem with a stable code. See Errors for every code and what to do about it.
Every error: a problem with a stable code. https://speccapture.com/docs/api/errors lists every code.
object
A link to the code’s entry in the docs.
What went wrong, in a few words for a person: the same for every problem with this code.
The HTTP status of the answer.
What went wrong with this request and what to do about it, in a sentence or two for a person. Present on nearly every problem.
The path of the request that was refused.
What went wrong, as a stable code to branch on: a published code never changes meaning.
This request’s trace: quote it when asking for help.
Examples
Not found.
{ "type": "https://speccapture.com/docs/api/errors#not_found", "title": "Not found.", "status": 404, "detail": "There is no extraction with this id in your workspace.", "instance": "/v1/extractions/7c9e6679-7425-40de-944b-e07fc1f90ae7/values", "code": "not_found", "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"}