Reading results
GET /v1/extractions/{jobId}/sheets/{sheetNumber} answers one sheet’s values; sheetNumber 1 is the file’s
first page. A sheet not read yet answers with its status and no values.
#!/usr/bin/env bashset -euo pipefailAPI=https://api.speccapture.comAUTH="Authorization: Bearer $SPECCAPTURE_API_KEY"
JOB_ID=7c9e6679-7425-40de-944b-e07fc1f90ae7 # the jobId the submission answered withSHEET_NUMBER=1 # which sheet: 1 is the first page
sheet=$(curl -sS --fail-with-body "$API/v1/extractions/$JOB_ID/sheets/$SHEET_NUMBER" \ -H "$AUTH") || { echo "$sheet" >&2; exit 1; }jq -r '"Sheet \(.sheetNumber) is \(.reviewState)"' <<<"$sheet"
jq -r '.fields[] as $field | (" \($field.path) = \($field.value // "(not printed)") (\($field.confidence))", if $field.reviewState == "needsReview" then " needs a look" else empty end)' <<<"$sheet"Save as read_fields.sh, set SPECCAPTURE_API_KEY, and run: bash read_fields.sh. Needs curl; scripts also use bash and jq.
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 withstring sheetNumber = args[1]; // which sheet: 1 is the first page
JsonElement sheet = await Json(await Call(HttpMethod.Get, $"/v1/extractions/{jobId}/sheets/{sheetNumber}"));Console.WriteLine($"Sheet {sheet.GetProperty("sheetNumber")} is {sheet.GetProperty("reviewState")}");
foreach (JsonElement field in sheet.GetProperty("fields").EnumerateArray()) { Console.WriteLine($" {field.GetProperty("path")} = {field.GetProperty("value").GetString() ?? "(not printed)"} ({field.GetProperty("confidence")})"); if (field.GetProperty("reviewState").GetString() == "needsReview") { Console.WriteLine(" needs a look"); }}
// 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;Save as read_fields.cs, set SPECCAPTURE_API_KEY, and run: dotnet run read_fields.cs -- 7c9e6679-7425-40de-944b-e07fc1f90ae7 1. Needs .NET 10 or later.
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 withsheet_number = sys.argv[2] # which sheet: 1 is the first page
sheet = call("GET", f"/v1/extractions/{job_id}/sheets/{sheet_number}").json()print(f"Sheet {sheet['sheetNumber']} is {sheet['reviewState']}")
for field in sheet["fields"]: print(f" {field['path']} = {field['value'] or '(not printed)'} ({field['confidence']})") if field["reviewState"] == "needsReview": print(" needs a look")Save as read_fields.py, set SPECCAPTURE_API_KEY, and run: python read_fields.py 7c9e6679-7425-40de-944b-e07fc1f90ae7 1. Needs Python 3.9+ and requests (pip install requests).
const API = "https://api.speccapture.com";const headers = { Authorization: `Bearer ${process.env.SPECCAPTURE_API_KEY}` };
const [jobId, sheetNumber] = process.argv.slice(2); // the jobId the submission answered with; which sheet: 1 is the first page
const sheet = await call("GET", `/v1/extractions/${jobId}/sheets/${sheetNumber}`).then((response) => response.json());console.log(`Sheet ${sheet.sheetNumber} is ${sheet.reviewState}`);
for (const field of sheet.fields) { console.log(` ${field.path} = ${field.value ?? "(not printed)"} (${field.confidence})`); if (field.reviewState === "needsReview") { console.log(" needs a look"); }}
// 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;}Save as read_fields.mjs, set SPECCAPTURE_API_KEY, and run: node read_fields.mjs 7c9e6679-7425-40de-944b-e07fc1f90ae7 1. Needs Node.js 20 or later.
A sheet
Section titled “A sheet”A sheet’s values, shortened to two fields - one read, one the drawing does not print - one table cell and one general note, waiting for a person as every note does (the job’s template keeps the notes; the standard template leaves them out):
{ "jobId": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "sheetNumber": 1, "status": "completed", "reviewState": "needsReview", "engineVersion": "ev1-3684d4286e2783c2", "completedAt": "2026-10-12T09:01:00+00:00", "fields": [ { "path": "titleBlock.partNumber", "value": "SG-2001", "extractedValue": "SG-2001", "confidence": 0.97, "reviewState": "autoAccepted", "reviewReasons": [], "box": { "points": [ { "x": 0.6367, "y": 0.8016 }, { "x": 0.6698, "y": 0.8016 }, { "x": 0.6698, "y": 0.8248 }, { "x": 0.6367, "y": 0.8248 } ] }, "name": "Part Number", "zone": "A2", "matchOnSheet": "exact" }, { "path": "titleBlock.platingSpec", "value": null, "extractedValue": null, "confidence": 0, "reviewState": "autoAccepted", "reviewReasons": [], "box": null, "name": "Plating Specification", "zone": null, "notPrinted": true, "matchOnSheet": "nothingRead" } ], "tables": [ { "path": "revisionHistory", "rows": [ { "rowIndex": 0, "cells": { "rev": { "path": "revisionHistory[0].rev", "value": "B", "extractedValue": "B", "confidence": 0.62, "reviewState": "needsReview", "reviewReasons": ["HandwrittenInk"], "box": null, "name": "Rev", "matchOnSheet": "tooShortToLookFor" } } } ], "name": "Revision History" }, { "path": "generalNotes", "rows": [ { "rowIndex": 0, "cells": { "value": { "path": "generalNotes[0]", "value": "1. REMOVE ALL BURRS AND SHARP EDGES.", "extractedValue": "1. REMOVE ALL BURRS AND SHARP EDGES.", "confidence": null, "reviewState": "needsReview", "reviewReasons": [], "box": null, "name": "Note", "number": 1, "text": "REMOVE ALL BURRS AND SHARP EDGES." } } } ], "name": "General notes" } ], "testMode": false, "markedControlled": false, "controlledMarking": null, "drawingPurgedAt": null, "controlledKept": null, "layout": { "regions": [ { "region": "titleBlock", "box": { "points": [{ "x": 0.52, "y": 0.8 }, { "x": 0.96, "y": 0.8 }, { "x": 0.96, "y": 0.95 }, { "x": 0.52, "y": 0.95 }] }, "name": "Title block" } ], "tables": [ { "path": "revisionHistory", "rows": 1, "box": { "points": [{ "x": 0.56, "y": 0.05 }, { "x": 0.97, "y": 0.05 }, { "x": 0.97, "y": 0.15 }, { "x": 0.56, "y": 0.15 }] }, "ruledGrid": true, "name": "Revision History" } ], "zones": { "columns": [{ "label": "4", "from": 0, "to": 0.25 }, { "label": "3", "from": 0.25, "to": 0.5 }, { "label": "2", "from": 0.5, "to": 0.75 }, { "label": "1", "from": 0.75, "to": 1 }], "rows": [{ "label": "D", "from": 0, "to": 0.25 }, { "label": "C", "from": 0.25, "to": 0.5 }, { "label": "B", "from": 0.5, "to": 0.75 }, { "label": "A", "from": 0.75, "to": 1 }] }, "values": [ { "path": "titleBlock.partNumber", "caption": { "text": "PART NO", "box": { "points": [{ "x": 0.6367, "y": 0.7905 }, { "x": 0.656, "y": 0.7905 }, { "x": 0.656, "y": 0.7985 }, { "x": 0.6367, "y": 0.7985 }] } }, "cell": { "points": [{ "x": 0.632, "y": 0.787 }, { "x": 0.71, "y": 0.787 }, { "x": 0.71, "y": 0.83 }, { "x": 0.632, "y": 0.83 }] } } ], "leaders": [ { "startsFrom": { "text": "MASK THIS SURFACE", "box": { "points": [{ "x": 0.2214, "y": 0.312 }, { "x": 0.3302, "y": 0.312 }, { "x": 0.3302, "y": 0.3251 }, { "x": 0.2214, "y": 0.3251 }] } }, "points": [{ "x": 0.3341, "y": 0.3186 }, { "x": 0.3712, "y": 0.3186 }, { "x": 0.4105, "y": 0.3604 }] } ] }}reviewStateis the sheet’s:autoAccepted(every value cleared the confidence threshold and nothing asked for a look - the values the drawing does not print among them, settled as not printed),needsReview(at least one value, or the sheet as a whole, waits for a person), orreviewed(a person has accepted or corrected every value that needed it).engineVersionnames the version of the engine that read the sheet, so two readings can be told apart.markedControlledistrue, andcontrolledMarkingsays which control, when the sheet’s own export-control marking names one:Distribution Statement BtoDistribution Statement F(or the oldDistribution Statement X),ITAR,EAR,CUI,NOFORN,FOUO, orexport-restrictedfor a warning that the drawing’s export is restricted. Otherwisefalseandnull. The job’ssheetscarry the same two. See Not for export-controlled drawings.controlledKeptis the workspace’s decision to keep a marked drawing -{ "at", "by", "reason" }: when, who (as the workspace’s people list names them,nullonce they have left it) and why, in their words - once its owner or an admin made it in the dashboard. It staysnullwhile the warning stands, and on a sheet that is not marked;markedControlledstaystrue, since the sheet says what it says. The decision covers the whole document, and an integration quarantining marked sheets can release the kept ones. The job’ssheetsand the webhook payload carry it too.fieldsholds the values that occur once on a sheet, such astitleBlock.partNumber;tablesholds the rows of each table.testModeis alwaysfalse: SpecCapture has no test keys, and every job reads its drawing (Live keys, and trying the API at little cost).drawingPurgedAtis when the workspace’s retention period removed the drawing, and every value’sboxwith it;nullwhile the drawing is kept. The job carries it too. See How long the drawing is kept.layoutis how SpecCapture understood the sheet - see The sheet’s layout.nullfor a sheet not read yet, read before layouts were kept, or whose drawing is no longer kept.
A value
Section titled “A value”| Property | What it is |
|---|---|
path |
Which value this is: titleBlock.partNumber. Every path is listed under Field paths. Use it as the key: it never changes. |
name |
What the job’s template calls it: Part Number, or the workspace’s own name for it. A table cell’s is its column’s; a note’s is Note. |
value |
The value as it stands: a reviewer’s correction when there is one, otherwise what was read. null means it is not on the sheet; notPrinted says whether that is settled - or, for the company name, notFound. |
extractedValue |
What SpecCapture read, before any correction. |
confidence |
How sure the reading is, from 0 to 1; 0 when nothing was read. null for a general note: a note is copied whole, as printed, and not scored. |
reviewState |
autoAccepted (delivered with nothing asking for a look, or not printed), needsReview (delivered, and waiting for a person), accepted (a person confirmed it as it stands) or corrected (a person replaced it; value is the correction). |
notPrinted |
true when the drawing does not print the value and nothing waits on it: value is null, and SpecCapture is sure nothing is printed (autoAccepted) or a person agreed (accepted) or cleared it (corrected). Left out otherwise. See Values a drawing does not print. |
notFound |
Only on titleBlock.companyName: true when SpecCapture did not find the company name and nothing waits on it - value is null and reviewState autoAccepted, or a person agreed or cleared it. The drawing may still print one, in a logo or small lettering: SpecCapture reads it only where it is printed plainly, so notFound never claims it is not printed, and such a value is never notPrinted. Left out otherwise. See A company name not found. |
reviewReasons |
Why the value asks for a person, such as HandwrittenInk, or RequiredButNotFound when the job’s template requires the field and the drawing does not give it. |
box |
Where on the sheet it was read: { "points": [{ "x", "y" }, ...] }, in page coordinates from 0 to 1 with the origin at the top left, so it fits the page at any size. null when the value has no single place on the sheet, and for every value once the drawing is no longer kept (the sheet’s drawingPurgedAt says when). |
matchOnSheet |
How the words the value was read from were found on the sheet: exact, approximate, noMatch or tooShortToLookFor; or why there were no words to find: nothingRead (a blank) or workedOut. About extractedValue, so a correction never changes it. Left out where SpecCapture recorded nothing to say it by: a general note, and a value read before November 2026 that is neither blank nor worked out. See Where a value was found on the sheet. |
quote |
The text on the drawing the value was read from, a caption and its value as printed: PART NO SG-2001. Present only when SpecCapture kept one: not for a general note (copied whole), a value worked out rather than printed, a sheet read before quotes were kept, or any value once the drawing is no longer kept. |
zone |
Where on the sheet it was read, the way a drawing says it: the border’s zone its box sits in, row letter then column numeral, such as B3. null when it has no box or the sheet prints no zones. A calculated value’s is the zone the values it was worked out from are in, null when they are in more than one; so is a count added up from a table’s column, or a size worked out from what the drawing prints, where the sheet’s layout says what it was worked out from. |
workedOut |
Only on a calculated field of the workspace’s own: how its value was worked out (description) and the paths of the values it was worked out from (from). Left out of every other value. |
number |
Only on a general note: the number the drawing prints it with - 4 for 4. REMOVE ALL BURRS, (4) or NOTE 4: - read off the front of value, never counted, so notes printed 1, 2, 4 are numbered 1, 2, 4. Left out for a note printed with no number. See Tables. |
text |
Only on a general note: value without its number - REMOVE ALL BURRS - or the whole note when it has none. Left out for a note that is not on the drawing. |
Values are given as the drawing prints them: a dimension printed .375 +.002 -.000 comes back as exactly that,
not as a number worked out from it. A value waiting for review (needsReview) is delivered as read so your
software can show it, but nobody has confirmed it yet: treat it as a draft until it is accepted or
corrected. A field the sheet does not show comes back with value null; treat a path missing from fields
the same way. A job’s values are the ones its template keeps, in its order: a field the template leaves out is never
in fields.
Every box is in the frame of the file you sent, as its page is drawn. Where SpecCapture turned a sheet to read it - a
drawing lettered sideways or upside down on its page - the sheet’s layout says how far in turnedUpright, and every
box is in the file’s frame all the same.
A person in your workspace may turn a sheet on the
review screen to look at it (Rotate left and Rotate right); that changes only how the dashboard, its read-only view links
and its review links show the drawing. Nothing is read again, and no box, outline or zone here, in a webhook or in an
export moves. A person’s turn is not part of the API.
Values a drawing does not print
Section titled “Values a drawing does not print”A drawing prints some of the fields a template asks for and not others: an unplated part has no plating
specification. When SpecCapture is sure the drawing does not print a value, the value is settled without a person:
value is null, reviewState is autoAccepted and notPrinted is true. Nothing waits on it, so a sheet whose
printed values are all accepted is autoAccepted as a whole. Such a value never counts towards a field being accepted
without a look in your workspace: there was nothing to confirm.
A value that is null still waits for a person (needsReview, no notPrinted) when:
-
the job’s template requires the field:
reviewReasonsholdsRequiredButNotFound, and the dashboard shows “Required: not found on this drawing”. A template of your own says which of its fields are required, and each waits whenever a drawing does not give it - but a part number or revision SpecCapture requires waits only on a scan (a file that holds only a picture of the drawing): the standard template’s, and the part number or revision a template made for Quoting, ERP import or Drawing register starts out requiring, for as long as nobody switches that field’s Required in the dashboard. On a drawing made on a computer, such a value SpecCapture is sure is not printed - a drawing never revised has no revision - is settled like any other value it does not print. Every other required field, Drawing register’s drawing number among them, waits on every drawing that does not give it; -
SpecCapture is not sure nothing is printed there, or the drawing prints its caption with nothing read beside it (
CaptionPrintedButNothingDelivered), or the field is one your template always has checked; -
it is a table’s cell, and the table prints no heading SpecCapture knows for its column (
ColumnNotHeaded): what was read there may be another column’s - a supplier read as the material - so it is left out, and waits in every mode until a person puts it back or leaves it out (the dashboard does either for the whole column in one step); -
the field is one of your workspace’s own, until your workspace has confirmed enough of its values.
A person can still type a value the drawing does print: correcting a value that was not printed is a correction like any other.
Sheets read before October 17, 2026 delivered every null value as needsReview, and keep the states they were
read with. A program that took autoAccepted to mean “has a value” should look at value (or notPrinted) first.
Nothing else about a value’s representation is different: notPrinted is a property of its own, written only when
true. Sheets read with the standard template before October 19, 2026 kept a part number or revision not printed
waiting, scan or not, and keep that state. A template made for Quoting, ERP import or Drawing register before October
20, 2026 holds its part number and revision as required by your workspace, waiting on every drawing that does not give
them, as do the sheets read with it; one made from the same start since then holds them as SpecCapture’s.
A company name not found
Section titled “A company name not found”titleBlock.companyName is read by SpecCapture’s own code, only where the drawing prints the name plainly: the owner a
proprietary legend names, or the title block’s letterhead. A name in a logo it cannot read surely, or lettered no larger
than the block’s values, is not found. So when it finds none, its null says nothing about whether the drawing prints
one, and it is settled all the same, without a person: value is null, reviewState is autoAccepted and notFound
is true - never notPrinted. Nothing waits on it, in any setting, so it never holds a sheet. A name it finds is a value
like any other. It waits as any blank does when your template requires the field or always has it checked, when SpecCapture
explains the blank, or when a review reason asks for a look.
Where a value was found on the sheet
Section titled “Where a value was found on the sheet”SpecCapture reads a value together with the words it was printed as - its quote - and then looks for those words among
the page’s own text to draw the value’s box. matchOnSheet says what that search found:
matchOnSheet |
What it means | Has a box |
|---|---|---|
exact |
The words it was read from are printed on the sheet exactly as read, in one place, and the box is on them. A value too short to look for counts as found exactly when its own place prints exactly the value: a table cell’s own row and column, once, or the place another reading of the same value was found, the words it was read from spelling it. | Yes |
approximate |
Found, but not exactly or not surely: the page’s words differ a little from what was read (a character or two read differently), the same words are printed in more than one place so the box may be on another printing of them, or the value sits outside the cell its caption heads. | Yes |
noMatch |
Long enough to look for, and the words it was read from were not found among the sheet’s: the page reader may have read the ink otherwise, or the reading came from nowhere on the sheet. | No |
tooShortToLookFor |
One or two characters - a revision letter, a quantity - are printed all over a drawing, so they are not looked for, and nothing else placed this one on the sheet. | No |
nothingRead |
Nothing was read: extractedValue is null. Whether that is settled is notPrinted, notFound and reviewState. |
No |
workedOut |
Not read off the sheet as this field: a calculated value, a count added up from a table’s column, a size worked out from printed dimensions, a value taken from another field where the drawing prints none of its own (the part number from the drawing number, a dash number and its description from the parts list’s row that lists them), or a count or form worked out from the drawing with no words of its own to find (a count of zero, a part’s form). | Not of its own |
It is about what SpecCapture read, so a person’s correction never changes it, and it is kept after the drawing’s box is
removed by your retention period. It is a signal of its own beside confidence, which gives finding the words almost no
weight: the two together say more than either. A general note has none, as it has no confidence: it is copied whole. A
value read before November 2026 has none either, unless it is blank or worked out.
How to route on it. reviewState already applies SpecCapture’s own rules - the confidence threshold, the review
reasons, your workspace’s settings - and is the first thing to read: accepted and corrected are a person’s word, and a
value that is needsReview waits whatever matchOnSheet says. matchOnSheet is for a stricter rule of your own, or to
show a person why to look:
- Accept without looking:
exact, andworkedOutwhen the values it was worked out from are accepted. AnothingReadvalue is settled whennotPrintedornotFoundistrue. - Show a person, with the box:
approximate. The value was found, but check that the box is on the right printing and that the words say what was read. - Send to a person:
noMatchandtooShortToLookFor. Nothing on the sheet shows where the value came from, so a person should find it on the drawing; on a drawing made on a computer these are where a value read from nothing on the sheet turns up. On a scan - which waits for a person as a whole anyway -noMatchis as often the page reader’s misreading of the ink as the value’s.
A rule that accepts only exact and workedOut values above your threshold sends more to a person than reviewState does,
never fewer.
What an API client sees change (November 2026): each value gains matchOnSheet, written only where it is
known, so a job read before keeps every other property byte for byte and gains nothingRead on its blanks and workedOut
where its sheet’s layout says so. The complete JSON export gains it the same way; a template that carries boxes gains a
- match on sheet column beside each - box and evidence.matchOnSheet in its shaped JSON, so its spreadsheets have one
more column per value. The standard template’s spreadsheets are unchanged. JobExports.LayoutVersion went to 5 with it,
so stored exports are made again.
Tables
Section titled “Tables”To read a table’s rows - the parts list’s items, the revision history’s revisions - use the sheet’s tables. Each
entry is one table on the sheet - { "path": "bom", "name": "Bill of Materials", "rows": [...] } - and each row is
{ "rowIndex", "cells" }, numbered from 0 in the order the drawing prints them, with one value per column under
the column’s name. Every cell is a value like any other, with its own confidence, review state and box.
The general notes are the generalNotes table, a list with no columns: one row per note, in the order the
drawing prints them, each note whole under value (generalNotes[0] is the first). They come only with a template
that keeps them: notes aren’t read reliably enough yet to be accepted without a check, so they’re off unless you turn
them on in your Fields settings, and when on, every note is checked by a person - needsReview until someone accepts
or corrects it, in every setting. A note is reviewed like any other value - accepted, corrected, or waiting for a
person - but has no confidence (null): it is copied as printed rather than scored. Its box is where the sheet prints it - the page reader’s words that spell it, line by
line - and null where none could be found, and on sheets read before 2026-10-16.
A note’s value also says the number it is printed with, number, and its words without it, text: 4. REMOVE ALL BURRS is number 4 and text REMOVE ALL BURRS. The number is read off the front of the note as it stands - a
correction included - and never counted from the note’s place in the list: a list printed 1, 2, 4 is numbered 1, 2, 4,
and a note printed with no number has no number. 1., 1), (1), NOTE 1: and a flag note’s △1 all count as
printed numbers. A number printed with no stop (4 GATE VESTIGE), and a 1 the page reader read as a letter (I. INTERPRET DRAWING, common on microfilm), count only when the notes around them make the number certain; otherwise
the note keeps its words whole. value is always the whole note, exactly as before.
#!/usr/bin/env bashset -euo pipefailAPI=https://api.speccapture.comAUTH="Authorization: Bearer $SPECCAPTURE_API_KEY"
JOB_ID=7c9e6679-7425-40de-944b-e07fc1f90ae7 # the jobId the submission answered withSHEET_NUMBER=1 # which sheet: 1 is the first page
sheet=$(curl -sS --fail-with-body "$API/v1/extractions/$JOB_ID/sheets/$SHEET_NUMBER" \ -H "$AUTH") || { echo "$sheet" >&2; exit 1; }
jq -r '.tables[] as $table | if $table.path == "bom" then $table.rows[] as $row | ($row.cells as $cells | "Item \($cells.item.value): \($cells.qty.value // "?") x \($cells.partNumber.value // "(no part number)"), \($cells.description.value // "(no description)")") else empty end' <<<"$sheet"Save as read_bom.sh, set SPECCAPTURE_API_KEY, and run: bash read_bom.sh. Needs curl; scripts also use bash and jq.
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 withstring sheetNumber = args[1]; // which sheet: 1 is the first page
JsonElement sheet = await Json(await Call(HttpMethod.Get, $"/v1/extractions/{jobId}/sheets/{sheetNumber}"));
foreach (JsonElement table in sheet.GetProperty("tables").EnumerateArray()) { if (table.GetProperty("path").GetString() == "bom") { foreach (JsonElement row in table.GetProperty("rows").EnumerateArray()) { JsonElement cells = row.GetProperty("cells"); Console.WriteLine($"Item {cells.GetProperty("item").GetProperty("value")}: {cells.GetProperty("qty").GetProperty("value").GetString() ?? "?"} x {cells.GetProperty("partNumber").GetProperty("value").GetString() ?? "(no part number)"}, {cells.GetProperty("description").GetProperty("value").GetString() ?? "(no description)"}"); } }}
// 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;Save as read_bom.cs, set SPECCAPTURE_API_KEY, and run: dotnet run read_bom.cs -- 7c9e6679-7425-40de-944b-e07fc1f90ae7 1. Needs .NET 10 or later.
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 withsheet_number = sys.argv[2] # which sheet: 1 is the first page
sheet = call("GET", f"/v1/extractions/{job_id}/sheets/{sheet_number}").json()
for table in sheet["tables"]: if table["path"] == "bom": for row in table["rows"]: cells = row["cells"] print(f"Item {cells['item']['value']}: {cells['qty']['value'] or '?'} x {cells['partNumber']['value'] or '(no part number)'}, {cells['description']['value'] or '(no description)'}")Save as read_bom.py, set SPECCAPTURE_API_KEY, and run: python read_bom.py 7c9e6679-7425-40de-944b-e07fc1f90ae7 1. Needs Python 3.9+ and requests (pip install requests).
const API = "https://api.speccapture.com";const headers = { Authorization: `Bearer ${process.env.SPECCAPTURE_API_KEY}` };
const [jobId, sheetNumber] = process.argv.slice(2); // the jobId the submission answered with; which sheet: 1 is the first page
const sheet = await call("GET", `/v1/extractions/${jobId}/sheets/${sheetNumber}`).then((response) => response.json());
for (const table of sheet.tables) { if (table.path === "bom") { for (const row of table.rows) { const cells = row.cells; console.log(`Item ${cells.item.value}: ${cells.qty.value ?? "?"} x ${cells.partNumber.value ?? "(no part number)"}, ${cells.description.value ?? "(no description)"}`); } }}
// 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;}Save as read_bom.mjs, set SPECCAPTURE_API_KEY, and run: node read_bom.mjs 7c9e6679-7425-40de-944b-e07fc1f90ae7 1. Needs Node.js 20 or later.
Calculated values
Section titled “Calculated values”A workspace’s template can keep fields of its own that are worked out from other values rather than read off the
drawing: how many rows a table has, the total of a column, how many different values it holds, its largest or smallest,
or how many rows read a given value. Such a field’s value is in fields like any other, under its custom.<key> path
and its name, and carries workedOut:
{ "path": "custom.totalQuantity", "name": "Total quantity", "value": "9", "extractedValue": "9", "confidence": null, "reviewState": "needsReview", "reviewReasons": ["WorkedOutFromValuesWaiting"], "box": { "points": [ ... ] }, "zone": "B2", "workedOut": { "description": "9, the total of Quantity in 3 rows of Bill of Materials (1 + 4 + 4)", "from": ["bom[0].qty", "bom[1].qty", "bom[2].qty"] }}- It is worked out each time you ask, from the sheet’s values as they stand: a correction to one of them changes it
at once, in the sheet’s answer, in
/valuesand in every export. confidenceisnull: nothing was read. Itsboxis the rectangle around the boxes of the values it was worked out from,nullwhen none of them has one.- Its
zoneis the zone those values are in when they are all in the same one, andnullwhen they are in more than one (or none of them has abox). A value with noboxis left out, as it is from thebox. To find the zones of values spread over the sheet, read thezoneof each value inworkedOut.from. - Changed on October 18, 2026: before then, a calculated value’s
zonewas the zone the middle of itsboxfell in. When the values it was worked out from are far apart, that can be a zone none of them is in, so it is nownullinstead. Nothing else about a calculated value changed, and every other value’szoneis as it was. - It waits while anything it is worked out from waits (
needsReview, with the reasonWorkedOutFromValuesWaiting), and isacceptedonce a person has accepted or corrected every one of them,autoAcceptedwhen they were accepted automatically. Nothing accepts or corrects it by itself. - A value it is worked out from that the drawing does not print (
notPrinted) is skipped, as any empty cell is, and thedescriptionsays so; a required field not found (RequiredButNotFound) is still waiting, so the calculated value waits with it. A calculated value never carriesnotPrinteditself. - A count is a whole number, and a count of nothing is
0, nevernull. A value that cannot be worked out - a quantity that is not a number, a largest of nothing - isnull, waiting, with the reasonNotWorkedOutanddescriptionsaying why. - In a file in the template’s shape it is a column, or a key, like any other field; a count is a JSON number when the template writes numbers as numbers.
GET /v1/templates/{templateId}describes such a field withworkedOut:How many rows in Bill of Materials.
The sheet’s layout
Section titled “The sheet’s layout”layout says how SpecCapture understood the sheet, each part outlined where it was found - nothing is placed by hand,
so a part SpecCapture did not find is absent:
-
regions: the title block (titleBlock) and the general notes (generalNotes), each{ "region", "name", "box" }, the box around what was found there. -
tables:{ "path", "name", "rows", "box", "ruledGrid" }for each one that delivered entries,pathas above.ruledGridistruewhen the box is its own ruled grid, headings included, andfalsewhen the box holds the cells SpecCapture placed. -
zones: the border’s zones,{ "columns", "rows" }, each band{ "label", "from", "to" }from 0 to 1;nullwhen the sheet prints none. A value’szonenames the band of each its box sits in. On a sheet read turned a quarter turn (turnedUpright), the columns run down the page as it is drawn and the rows across it:columnsRunDownThePageis thentrue, each column’sfromandtoare shares of the page’s height and each row’s of its width. It is left out otherwise. -
turnedUpright: how far SpecCapture turned the sheet to read it,{ "clockwiseDegrees": 90 }(90,180or270), when the drawing is lettered sideways or upside down on its page. Every box here and every value’sboxstay where the page is drawn. Left out when the sheet was read as it is. -
values: what was found around the sheet’s single values (the ones infields), one entry per value that has something to say, by itspath. Each part is left out when nothing was found for it:caption: the caption the value is printed under, as printed, and where -{ "text": "PART NO", "box" }. Given only where the reading named the caption and the sheet prints it as the value’s: right by the value (on its line to its left, just above it, or in the same ruled cell); the part of one printed word before the value (SCALEofSCALE:1:1); a designation’s words before it (SHEETofSHEET 1 OF 1, for the sheet count too); the caption over its column where the value’sboxtakes in a row of captions and the values under them, so inside thatbox; the heading of its column, the label of its row or the cell beneath it among the form’s ruled cells; the top corner of its own cell; the start of its line in the ruled block holding it (X.Xbefore± 0.020); the start of the sign-off row it is the date of (CHECKED, before the signer’s name); or the heading of the list it is printed in (NOTES:over the note it is read from). Where the reading named two neighbouring cells’ captions as one (CAGE CODE DWG NO), only the one printed in the value’s own cell is given.cell: the ruled cell of the drawing’s form the value sits in, measured from the lines the drawing prints. Left out where the lines round the value enclose other values too: a row or a block of cells whose inner lines the drawing does not print or could not be measured, printing several values’ captions or holding more values than a cell does.seeNote: for a value the title block points to a general note for, the pointer as printed, the note’s number and where the pointer is printed -{ "text": "SEE NOTE 5", "note": 5, "box" }. The value’s ownboxis in the note.noteis left out for a pointer that names no number (SEE NOTES), andboxwhen the pointer could not be placed.parts: for a size or a count SpecCapture worked out from what the drawing prints (an overall length added up from its chain of dimensions, the tightest of several tolerances, a count of callouts), each value it was worked out from, as printed, and where:[{ "text": "± 0.005", "box" }],boxnullfor one that could not be placed. The value’s ownboxis the rectangle round them all; itszoneis the zone the placed parts are in,nullwhen they are in more than one.addedUpFrom: for a count added up from a table’s column - the hole count from the hole table’s quantities -{ "table": "holeTable", "column": "qty" }. Such a count has nobox; itszoneis the zone the column’s cells are in,nullwhen they are in more than one.
valuesis left out when nothing was found around any value, and on every sheet read before October 18, 2026: those layouts are exactly what they were, and so is each value’szone. -
leaders: the leaders the drawing prints - each thin line, straight or bent, from printed words to the feature on a view they point at: a note (MASK THIS SURFACEto the face it names), a callout (4X Ø.257 THRUto its holes), a balloon’s number or a dimension’s value - one entry each:startsFrom: the words the leader starts from, one printed line as the page was read, and where -{ "text": "MASK THIS SURFACE", "box" }.points: the leader itself,[{ "x", "y" }, ...]in the same page coordinates: where it leaves the words, each place it bends, and last its arrowhead or dot, at the feature it points at.
A note the drawing ties to a view with a leader is a note on that view, not a general note: SpecCapture leaves it out of the general notes unless the drawing numbers it or heads it as one.
leadersis[]when the sheet was measured and SpecCapture found none, and left out when its leaders were not measured: on every sheet read before November 1, 2026, whose layout is exactly what it was, and on an image that does not say how large its paper is.
Every box is in the same page coordinates as a value’s box, and goes with the drawing when it is no longer kept.
How long the drawing is kept
Section titled “How long the drawing is kept”A workspace keeps each drawing for its retention period, limits.retentionDays in GET /v1/account, counted from
the job’s completedAt: 30 days unless the workspace’s owner chose
otherwise (0, 7, 30 or 90 days, on the dashboard’s workspace settings page).
Within the hour after it ends, SpecCapture deletes the drawing: the uploaded file, its page images, and the box
showing where each value was read and the text it was read from.
- Every
boxbecomesnull, everyquotegoes, and with them each value’szoneand the sheet’slayout. The job and the sheet carrydrawingPurgedAt, the time the drawing was deleted, so your software can tell a box that went with the drawing from a value that has no place on the sheet. Nothing else about the job changes: itsstatusstayscompleted. - View links stop. A link made earlier stops working, and a new one is refused with
409 not_shareablefrom the last hour of the retention period on. A link’sexpiresAtis never later than the drawing is kept. - The values stay: every value, its confidence, its review state and any correction, until the document or the workspace is deleted, and so does the export, which no longer carries boxes.
With 0 days, a drawing is deleted as soon as its job has been read, its boxes within the hour, and no view link can be made. To keep the boxes longer than the drawing, store them when you read the sheet.
Field paths
Section titled “Field paths”The values a sheet can carry, from the drawing template every sheet is read with today (drawing, version 1). Which
of them a job keeps is its template’s choice: the standard template keeps every one but those marked
Not in the standard template - the sizes and counts below and titleBlock.materialForm.
Those come only with a template that keeps them; in the dashboard, a template started from Everything we read keeps
them all, and one started from Quoting the sizes and counts and the material form.
Title block
Section titled “Title block”| Path | What it is |
|---|---|
titleBlock.partNumber | Part Number |
titleBlock.drawingNumber | Drawing Number |
titleBlock.revision | Revision |
titleBlock.title | Title |
titleBlock.materialSpec | Material Specification |
titleBlock.materialForm | Material FormNot in the standard template |
titleBlock.stockSize | Stock Size |
titleBlock.finish | Finish / Coating |
titleBlock.platingSpec | Plating Specification |
titleBlock.surfaceFinish | Surface Finish (roughness) |
titleBlock.heatTreat | Heat Treatment |
titleBlock.scale | Scale |
titleBlock.units | Units · one of a set |
titleBlock.sheetSize | Sheet Size |
titleBlock.sheetNumber | Sheet Number · whole number |
titleBlock.sheetCount | Sheet Count · whole number |
titleBlock.drawnBy | Drawn By |
titleBlock.drawnDate | Drawn Date · date |
titleBlock.checkedBy | Checked By |
titleBlock.checkedDate | Checked Date · date |
titleBlock.approvedBy | Approved By |
titleBlock.approvedDate | Approved Date · date |
titleBlock.weight | Weight |
titleBlock.toleranceFractions | Default Fraction Tolerance |
titleBlock.toleranceDecimals | Default Decimal Tolerance |
titleBlock.toleranceOnePlaceDecimals | Default One-Place Decimal Tolerance |
titleBlock.toleranceTwoPlaceDecimals | Default Two-Place Decimal Tolerance |
titleBlock.toleranceThreePlaceDecimals | Default Three-Place Decimal Tolerance |
titleBlock.toleranceAngles | Default Angle Tolerance |
titleBlock.toleranceBendAngles | Default Bend Angle Tolerance |
titleBlock.projectionAngle | Projection Angle · one of a set |
titleBlock.drawingStandard | Drawing Standard |
titleBlock.cageCode | CAGE Code |
titleBlock.companyName | Company Name |
titleBlock.exportControlMarking | Export Control Marking |
Worked out from the drawing
Section titled “Worked out from the drawing”Measurements and counts SpecCapture works out from the drawing’s geometry and notes, rather than reads from one place on it. They always wait for a person, so only a template that keeps them delivers them; the standard template leaves them out.
| Path | What it is |
|---|---|
assist.envelopeLength | Envelope Length · dimensionNot in the standard template |
assist.envelopeWidth | Envelope Width · dimensionNot in the standard template |
assist.envelopeHeight | Envelope Height · dimensionNot in the standard template |
assist.envelopeForm | Envelope Form · one of a setNot in the standard template |
assist.envelopeUnits | Envelope Units · one of a setNot in the standard template |
assist.tightestTolerance | Tightest Tolerance on Print · dimensionNot in the standard template |
assist.gdtCalloutCount | GD&T Callout Count · whole numberNot in the standard template |
assist.holeCount | Hole Count · whole numberNot in the standard template |
assist.threadCalloutCount | Thread Callout Count · whole numberNot in the standard template |
Tables and notes
Section titled “Tables and notes”| Table | Path | Columns (keys of cells) |
|---|---|---|
| Revision History | revisionHistory | rev, description, date, approvedBy |
| Bill of Materials | bom | item, qty, partNumber, description, material |
| Hole Table | holeTable | tag, size, qty, depth |
| Application (next assembly / used on) | application | nextAssembly, usedOn |
| Dash Numbers (tabulated variants) | dashNumbers | dashNumber, description |
| General notes | generalNotes | value (one note a row, in order) |
GET /v1/extractions/{jobId} and its sheets are the complete representation, every detail of every value.
GET /v1/extractions/{jobId}/values is the same job in the shape its template chooses - the values your
system expects, under the names it expects - with what stands behind each value beside it only when the template
carries it:
{ "shape": "flat", "keys": "names", "extraction": { "jobId": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "status": "completed", "fileName": "bracket-rev-c.pdf", "sheetCount": 2, "createdAt": "2026-10-14T09:00:00+00:00", "completedAt": "2026-10-14T09:02:13+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", "Drawn by": null, "Parts list": [ { "Item": "1", "Quantity": "1", "Part Number": "SC-10433" } ], "General notes": [ "1. ALL DIMENSIONS ARE IN INCHES." ] }, "waitingForReview": [ "/Drawn by" ], "noteNumbers": [ 1 ], "evidence": { "Part No.": { "confidence": 0.98, "quote": "PART NO SC-10432" }, "Rev": { "confidence": 0.99, "quote": "REV C" }, "Drawn by": { "confidence": 0.81, "quote": "DRAWN J. MORALES" }, "Parts list": [ { "Item": { "confidence": 0.99, "quote": null }, "...": "..." } ], "General notes": [ { "confidence": null, "quote": null } ] } } ]}dataholds every field, table and the notes the template keeps, under its keys - its own names, or the paths (titleBlock.partNumber,bom,qty) when its output asks for them - whether or not the drawing gives them: a value the drawing does not give isnull, a table it does not print is[].shapeflatkeeps every field at the top;nestedgroups them under their sections (the review screen’s headings - by path,titleBlockandassist), with the tables and notes beside the groups. A table is an array of row objects, the notes an array of text. A count or quantity is a JSON number when the template writes numbers as numbers.waitingForReview, when the template does not carry the review state: where indataa value still waiting for a person was left out (asnull), as JSON Pointers (/Drawn by,/Parts list/1/Quantity). Empty when nothing waits. Take nothing it names as final. A value the drawing does not print isnullindataand named here only while it waits - a required field not found (Values a drawing does not print).noteNumbers, when the sheet has the notes: the number each note indatais printed with, in the notes’ order -1for1. ALL DIMENSIONS ARE IN INCHES., read as a note’snumberis in Tables, never counted - andnullfor a note printed with no number, or one left out ofdatawhile it waits. The notes indatastay text, whole.evidence, when the template carries any extra: the same keys asdata, each value’sreviewStateandreviewReasons,confidence,asRead(what was read, beside a correction),boxwithmatchOnSheetbeside it (where it was found), andquote, as many as the template carries. A value not on the sheet isnullthere too.engineVersionandcompletedAtare on each sheet when it carries each sheet’s details.- A template whose JSON is
complete(the standard template’s) is shownflathere, with the extras it carries.
Keys a rename never changes. Add keys=paths and every value is keyed by SpecCapture’s paths
(titleBlock.partNumber, bom, qty), or keys=names and by the template’s names, whatever the template chose; left
out, the template’s own. The answer’s keys says which, and the shape, the extras and the numbers stay the template’s -
so a person renaming a field for an ERP import never breaks a program built on the same template. waitingForReview
names its values under the same keys. Anything else is 400 invalid_request.
JOB_ID=7c9e6679-7425-40de-944b-e07fc1f90ae7 # the jobId the submission answered with
curl -sS "https://api.speccapture.com/v1/extractions/$JOB_ID/values?keys=paths" \ -H "Authorization: Bearer $SPECCAPTURE_API_KEY"Paste into a terminal with SPECCAPTURE_API_KEY set. Needs curl; scripts also use bash and jq.
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?keys=paths");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;Save as values_by_paths.cs, set SPECCAPTURE_API_KEY, and run: dotnet run values_by_paths.cs -- 7c9e6679-7425-40de-944b-e07fc1f90ae7. Needs .NET 10 or later.
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?keys=paths").text)Save as values_by_paths.py, set SPECCAPTURE_API_KEY, and run: python values_by_paths.py 7c9e6679-7425-40de-944b-e07fc1f90ae7. Needs Python 3.9+ and requests (pip install requests).
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?keys=paths`).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;}Save as values_by_paths.mjs, set SPECCAPTURE_API_KEY, and run: node values_by_paths.mjs 7c9e6679-7425-40de-944b-e07fc1f90ae7. Needs Node.js 20 or later.
GET /v1/extractions/{jobId}/sheets/{sheetNumber}/values is one sheet of it, and takes keys too: jobId, shape,
keys, template and sheet. Both answer at any point in the job’s life - a sheet not read yet has no data - with
Cache-Control: no-store; another workspace’s job, or a sheet it does not have, is 404 not_found. A job’s
JSON export is this same document, with the file’s formatVersion, workspace and exportedAt first,
when its template lays its JSON out flat or nested; it takes keys as these do.