Skip to content

Get template

GET
/v2/document/template/{templateId}

Get a template by template ID

templateId
required
string format: uuid

The ID of the template

Example
77a0049c-7683-45ff-956f-656f257048f7
X-API-Key
string

API Key

X-API-Secret
string

API Secret

The template.

object
templateVersionId

A unique template Version Id

string format: uuid
77a0049c-7683-45ff-956f-656f257048f7
templateId

A template Id grouped on version

string
77a0049c-7683-45ff-956f-656f257048f7
version

The Template Version

number
1
name

A template name

string
JapaneseInvoice
description

A template description

string
Used for extract all documents from the japanese providers.
type
required

Type of template, associated with the type of document. Must be one of the predefined document types.

string
Allowed values: account_statement airway_bill applications bill_of_lading business_general business_invoice certificate_of_origin contract financial health_certificate identification insurance invoice purchase_order receipt report_proposal other
invoice
tag

Identifies your templates in the dashboard UI

string
customer-template
prompts

Group of prompts or properties to be extracted or analyzed from the document

Array<object>
object
id
required

Unique identifier for the prompt. Used internally for tracking and referencing specific prompts.

string format: uuid
a1b2c3d4-5678-4e2a-9c1a-2b3c4d5e6f7a
name
required

Human-readable name for the prompt. Used for display purposes and should be descriptive of what the prompt extracts.

string
Invoice Total
fieldType
required

The data type for storing the extracted value. This determines how the value will be validated and stored in the database (e.g., string, number, float, date, boolean).

string
Allowed values: string number float date boolean
string
format

Optional formatting instructions for the extracted value. Can include transformation rules like “add # sign before all responses” or “convert to uppercase”. Leave empty if no formatting is needed.

string
Add # sign before all responses
description
required

Clear, specific instructions for the AI model on what information to extract from the document. Should be detailed enough to guide accurate extraction.

string
What is the total amount of the invoice?
itemType
required

The input/display type that determines how the field should be presented and extracted. This affects UI rendering, validation rules, and extraction behavior (e.g., single line text, email, phone, address, table).

string
Allowed values: singleLine multiLine dateTime boolean name email phone address table list currency
singleLine
children
Array<object> recursive
providerModelId

The provider model id

string format: uuid
77a0049c-7683-45ff-956f-656f257048f7
createdAt

The date the template was created

string
2021-01-01T00:00:00.000Z
updatedAt

The date the template was updated

string
2021-01-01T00:00:00.000Z

Bad Request

Unauthorized

Forbidden

Not Found

Internal Server Error