Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
---
title: "Get a document schema"
description: "Retrieve a Terminal49 document schema for an extraction output, including the schema version and the structured payload contract for parsed fields."
description: "Retrieve a versioned Terminal49 JSON Schema that validates a document_representation.payload."
og:title: Get a Document Schema | Terminal49 API
og:description: Retrieve a document schema by ID from the Terminal49 API. Returns the schema definition used to validate and extract structured shipping documents.
og:description: Retrieve a versioned JSON Schema by ID from the Terminal49 APIto validate a document representation payload.
openapi: get /document_schemas/{id}
---
<Info>
**Beta Feature** - This endpoint is currently in beta. The API is stable, but the schema and behavior may evolve based on feedback.
</Info>

Returns the versioned JSON Schema used to validate `document_representation.payload`. It does not return the sanitized extraction-field structure for a supported document type; use [Get a document type](/api-docs/api-reference/documents/get-a-document-type) for that structure.
17 changes: 17 additions & 0 deletions docs/api-docs/api-reference/documents/get-a-document-type.mdx
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
---
title: "Get a document type"
description: "Retrieve one account-visible document type and its sanitized extraction-field structure."
openapi: "get /documents/types/{code}"
---

<Info>
**Beta Feature** - This endpoint is currently in beta. The API is stable, but the schema and behavior may evolve based on feedback.
</Info>

Returns one document type visible to the authenticated account. A code that is not in that account's catalog returns `404`.

## Schema payload

`schema.payload` is a sanitized structural projection for rendering the type's extraction fields. It can contain field types, formats, enum values, nested properties, array items, and required fields. A field type can be a string or an array of strings, such as `["string", "null"]`. Array `items` can be one schema or an array of schemas. It omits internal extensions, prompts, instructions, titles, and descriptions.

This extraction-field structure does not validate `document_representation.payload`. For the versioned JSON Schema used to validate a document representation payload, use [Get a document schema](/api-docs/api-reference/document-schemas/get-a-document-schema).
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
---
title: "List document types"
description: "List the allowed document types and labels configured for your Terminal49 account so your app can populate selectors and validate uploads correctly."
description: "List every document type allowed for your Terminal49 account, with public descriptions and schema links when available."
openapi: "get /documents/types"
---

<Info>
**Beta Feature** - This endpoint is currently in beta. The API is stable, but the schema and behavior may evolve based on feedback.
</Info>
</Info>

Returns every document type allowed for the authenticated account so existing selectors and upload validation remain compatible.

Types included in the public catalog also contain a description and `schema.detail_url` for retrieving their extraction-field structure on demand. The list does not include schema payloads, field counts, or derived field paths. See [Get a document type](/api-docs/api-reference/documents/get-a-document-type) for the detail response.
1 change: 1 addition & 0 deletions docs/docs.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -158,6 +158,7 @@
"api-docs/api-reference/documents/edit-a-document",
"api-docs/api-reference/documents/delete-a-document",
"api-docs/api-reference/documents/list-document-types",
"api-docs/api-reference/documents/get-a-document-type",
"api-docs/api-reference/documents/get-a-document-download-url",
"api-docs/api-reference/documents/re-extract-a-document",
"api-docs/api-reference/documents/re-classify-a-document",
Expand Down
Loading
Loading