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

Get a template's fields

GET
/v1/templates/{templateId}
#!/usr/bin/env bash
set -euo pipefail
API=https://api.speccapture.com
AUTH="Authorization: Bearer $SPECCAPTURE_API_KEY"
TEMPLATE_ID=c2b8f3a1-7e5d-4c9a-8f6b-1a2d3e4f5a6b # drawing, or a templateId from the list of templates
template=$(curl -sS --fail-with-body "$API/v1/templates/$TEMPLATE_ID" \
-H "$AUTH") || { echo "$template" >&2; exit 1; }
jq -r '"\(.name), version \(.version):"' <<<"$template"
jq -r '.fields[] as $field | " \($field.path) is called \"\($field.name)\""' <<<"$template"

Each field’s path (the key its values carry, never changed by a rename), name (the name on its values), standardName, order, required, alwaysCheck, section, definedBy and measured (measured for the four fields whose accuracy SpecCapture publishes, standard for the rest, notMeasured for sizes and counts); each table with its kept columns in order; the notes when delivered; and the export layout. Add ?version= for an earlier version: the one a job’s templateVersion names never changes.

templateId
required
string

Drawing, the standard template, or the id of one of the workspace’s own templates, as GET /v1/templates lists them.

version
integer format: int32

A published version of the template, from 1; its newest when left out. The version a job’s templateVersion names never changes.

OK

Media typeapplication/json

One template, at one version: GET /v1/templates/{templateId}, the newest unless ?version= asks for an earlier one - the version a job names in its templateVersion keeps for good what it said.

object
templateId
required

drawing, or the workspace template’s id.

string
name
required

What the workspace calls it; “Standard” for drawing.

string
version
required

The version described.

integer format: int32
currentVersion
required

The template’s newest version.

integer format: int32
isDefault
required

What a submission naming no template is delivered with.

boolean
archived
required

True for a workspace template its owner archived: jobs read with it still name it, and nothing new can be.

boolean
definedBy
required

speccapture for the standard template, workspace for the workspace’s own.

string
publishedAt
required

When this version was published; null for the standard template.

null | string format: date-time
basedOn
required

The standard template it configures: drawing.

string
basedOnVersion
required

That template’s version.

integer format: int32
fields
required

The single-valued fields a job delivers, in order.

Array<object>

One field a template delivers.

object
path
required

The key every value carries (titleBlock.partNumber, or custom.customerPartNumber for a field of the workspace’s own): never changed by a rename.

string
name
required

What the template calls it - the name on its values.

string
standardName
required

The standard template’s name for it; for a field of the workspace’s own, which has no standard name, its own name.

string
order
required

Its place among the template’s fields, from 1.

integer format: int32
required
required

A drawing that does not give it waits for a person, with RequiredButNotFound. A part number or revision SpecCapture requires - the standard template’s, and one a template made from one of its presets requires, as the preset set it - waits only on a scan: on a drawing made on a computer, a value SpecCapture is sure is not printed is settled like any other, notPrinted.

boolean
alwaysCheck
required

Its value always waits for a person, whatever the workspace accepts automatically.

boolean
section
required

The heading the dashboard’s review list shows it under; null for its standard group.

null | string
definedBy
required

speccapture for a field of the standard template; workspace for a field the workspace added, read beside the standard ones and never changing them.

string
measured
required

What SpecCapture says about its accuracy: a field of the workspace’s own is notMeasured.

string
Allowed values: measured standard notMeasured
workedOut

For a calculated field of the workspace’s own - one worked out from other values rather than read off the drawing - how, in words: How many rows in Bill of Materials, The total of Quantity in Bill of Materials. Each of its values carries workedOut saying what it came to. Left out for every other field.

null | string
tables
required

The tables a job delivers, in order, each with the columns it keeps in order.

Array<object>

One table a template delivers.

object
path
required

Its key: bom, as each of its values’ paths begins (bom[0].partNumber).

string
name
required

What the template calls it (“Bill of Materials”, or the workspace’s own name).

string
standardName
required

The standard template’s name for it.

string
keyColumn
required

The column that numbers or names its rows (item): always kept. Null for a table whose rows have no such column.

null | string
columns
required

The columns it keeps, in order.

Array<object>

One column a table keeps: its key in each row’s cells, and its name.

object
path
required

Its key in each row’s cells: partNumber.

string
name
required

What the template calls it - the name on its values.

string
standardName
required

The standard template’s name for it.

string
notes
required
One of:
null
exportLayout
required

How the CSV and XLSX exports lay values out, in two words: full when each value carries its review state, valuesOnly when it does not. output says exactly what the files hold.

string
Allowed values: full valuesOnly
output
required

What the template’s exports and its /values answers hold: the extras beside each value, the JSON’s shape, keys and numbers, and the spreadsheets’ rows.

object
include
required

What each value carries beside it, in this order: sheetDetails (each sheet’s status, engine version and when it was read), asRead (what was read, beside a correction), reviewState (its review state and reasons; without it, a value still waiting for a person is left blank and named as waiting), confidence, box and quote (the text on the drawing it was read from). Empty for plain values.

Array<string>
jsonShape
required

The JSON export: flat (each field its key, each table an array of rows, the notes an array), nested (the fields grouped by section) or complete (the job and every sheet exactly as GET /v1/extractions/{jobId} and its sheets answer). /values is flat for a template whose JSON is complete.

string
jsonKeys
required

names (the template’s names for its fields, tables and columns) or paths (SpecCapture’s keys, which a rename never changes).

string
jsonNumbers
required

text (every value as text) or numbers (a count or quantity that is a plain whole number as a JSON number, and a number or dimension field of the workspace’s own that is a plain number, its digits as delivered).

string
spreadsheetRows
required

The CSV and Excel files’ single-valued fields: perSheet (one row per sheet, a column per field) or perValue (one row per value).

string

Examples

Exampletemplate

The workspace's own template: its fields under its own names, its parts list and its notes

{
"templateId": "c2b8f3a1-7e5d-4c9a-8f6b-1a2d3e4f5a6b",
"name": "ERP import",
"version": 3,
"currentVersion": 3,
"isDefault": true,
"archived": false,
"definedBy": "workspace",
"publishedAt": "2026-10-02T15:04:00+00:00",
"basedOn": "drawing",
"basedOnVersion": 1,
"fields": [
{
"path": "titleBlock.partNumber",
"name": "Part No.",
"standardName": "Part Number",
"order": 1,
"required": true,
"alwaysCheck": false,
"section": null,
"definedBy": "speccapture",
"measured": "measured"
},
{
"path": "titleBlock.revision",
"name": "Rev",
"standardName": "Revision",
"order": 2,
"required": true,
"alwaysCheck": false,
"section": null,
"definedBy": "speccapture",
"measured": "measured"
},
{
"path": "titleBlock.title",
"name": "Description",
"standardName": "Title",
"order": 3,
"required": false,
"alwaysCheck": false,
"section": null,
"definedBy": "speccapture",
"measured": "standard"
},
{
"path": "titleBlock.materialSpec",
"name": "Material",
"standardName": "Material Specification",
"order": 4,
"required": false,
"alwaysCheck": true,
"section": null,
"definedBy": "speccapture",
"measured": "measured"
},
{
"path": "titleBlock.finish",
"name": "Finish",
"standardName": "Finish / Coating",
"order": 5,
"required": false,
"alwaysCheck": false,
"section": null,
"definedBy": "speccapture",
"measured": "measured"
},
{
"path": "titleBlock.drawnBy",
"name": "Drawn by",
"standardName": "Drawn By",
"order": 6,
"required": false,
"alwaysCheck": false,
"section": null,
"definedBy": "speccapture",
"measured": "standard"
}
],
"tables": [
{
"path": "bom",
"name": "Parts list",
"standardName": "Bill of Materials",
"keyColumn": "item",
"columns": [
{
"path": "item",
"name": "Item",
"standardName": "Item"
},
{
"path": "qty",
"name": "Quantity",
"standardName": "Quantity"
},
{
"path": "partNumber",
"name": "Part Number",
"standardName": "Part Number"
},
{
"path": "description",
"name": "Description",
"standardName": "Description"
}
]
}
],
"notes": {
"path": "generalNotes",
"name": "General notes"
},
"exportLayout": "valuesOnly",
"output": {
"include": [
"confidence",
"quote"
],
"jsonShape": "flat",
"jsonKeys": "names",
"jsonNumbers": "text",
"spreadsheetRows": "perSheet"
}
}

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": "version is a published version: a whole number from 1.",
"instance": "/v1/templates/c2b8f3a1-7e5d-4c9a-8f6b-1a2d3e4f5a6b",
"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 template with this id in your workspace, or no such version of it. GET /v1/templates lists them.",
"instance": "/v1/templates/c2b8f3a1-7e5d-4c9a-8f6b-1a2d3e4f5a6b",
"code": "not_found",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
}