Skip to content
API console (try a request with your own key)Get early access

Get one sheet's values in its template's shape

GET
/v1/extractions/{jobId}/sheets/{sheetNumber}/values
JOB_ID=7c9e6679-7425-40de-944b-e07fc1f90ae7 # the jobId the submission answered with
SHEET_NUMBER=1 # which sheet: 1 is the first page
curl -sS "https://api.speccapture.com/v1/extractions/$JOB_ID/sheets/$SHEET_NUMBER/values" \
-H "Authorization: Bearer $SPECCAPTURE_API_KEY"

One sheet as GET /v1/extractions/{jobId}/values gives it, with the job’s id and template: data holds the sheet’s values under the template’s keys, waitingForReview names the values left out because they wait for a person (when the template does not carry the review state), and evidence mirrors data with the extras the template carries. keys=paths or keys=names chooses the keys, as on GET /v1/extractions/{jobId}/values. A sheet not read yet answers with its status and no data.

jobId
required
string format: uuid

The job’s id: the jobId POST /v1/extractions answered with, or one GET /v1/extractions lists.

sheetNumber
required
integer format: int32

Which sheet of the job: 1 for the file’s first page, up to the job’s sheetCount.

keys
string
Allowed values: names paths

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.

OK

Media typeapplication/json

One sheet in its template’s shape: GET /v1/extractions/{jobId}/sheets/{sheetNumber}?shape=template.

object
jobId
required

The job the sheet belongs to.

string format: uuid
shape
required

flat or nested.

string
keys
required

names or paths.

string
template
required

The template and version the job keeps.

object
templateId
required

drawing, or the workspace template’s id.

string
version
required

The template’s version the job was uploaded with, and keeps for good.

integer format: int32
name
required

What the workspace calls the template now; “Standard” for drawing.

string
sheet
required

The sheet.

object
sheetNumber
required

1 for the file’s first page.

integer format: int32
status
required

Where the sheet is: a sheet not read has no data.

string
Allowed values: queued running completed failed held skipped
reviewState
required
One of:
null
data
required
One of:
null
waitingForReview

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.

Array<string> | null
evidence
One of:
null
engineVersion

The engine version that read the sheet; present only when the template carries each sheet’s details and the sheet has been read.

null | string
completedAt

When the sheet was read; present only when the template carries each sheet’s details and the sheet has been read.

null | string format: date-time
noteNumbers

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.

Array<null | integer> | null

Examples

Examplevalues

Sheet 1 in the template's shape: the drawn-by value waits for a person, so it is null in data and named in waitingForReview

{
"jobId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"shape": "flat",
"keys": "names",
"template": {
"templateId": "c2b8f3a1-7e5d-4c9a-8f6b-1a2d3e4f5a6b",
"version": 3,
"name": "ERP import"
},
"sheet": {
"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
]
}
}

Bad Request: a problem with a stable code. See Errors for every code and what to do about it.

Media typeapplication/problem+json

Every error: a problem with a stable code. https://speccapture.com/docs/api/errors lists every code.

object
type
required

A link to the code’s entry in the docs.

string
title
required

What went wrong, in a few words for a person: the same for every problem with this code.

string
status
required

The HTTP status of the answer.

integer format: int32
detail

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.

string
instance
required

The path of the request that was refused.

string
code
required

What went wrong, as a stable code to branch on: a published code never changes meaning.

string
traceId
required

This request’s trace: quote it when asking for help.

string

Examples

Exampleinvalid_request

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/sheets/1/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.

Media typeapplication/problem+json

Every error: a problem with a stable code. https://speccapture.com/docs/api/errors lists every code.

object
type
required

A link to the code’s entry in the docs.

string
title
required

What went wrong, in a few words for a person: the same for every problem with this code.

string
status
required

The HTTP status of the answer.

integer format: int32
detail

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.

string
instance
required

The path of the request that was refused.

string
code
required

What went wrong, as a stable code to branch on: a published code never changes meaning.

string
traceId
required

This request’s trace: quote it when asking for help.

string

Examples

Examplenot_found

Not found.

{
"type": "https://speccapture.com/docs/api/errors#not_found",
"title": "Not found.",
"status": 404,
"detail": "There is no extraction with this id, or this sheet, in your workspace.",
"instance": "/v1/extractions/7c9e6679-7425-40de-944b-e07fc1f90ae7/sheets/3/values",
"code": "not_found",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
}