Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
81bca34
docs: expose supported document type schemas
dodeja Aug 25, 2026
a9a8711
fix(sdk): regenerate document type contract
dodeja Aug 25, 2026
79875e7
docs: reuse shared error schema in document type endpoints
dodeja Sep 13, 2026
e6929b6
fix(docs): generate Postman responses from explicit examples
dodeja Oct 6, 2026
65a043d
chore: validate regenerated document contract on current head
dodeja Oct 6, 2026
fed0b47
fix(docs): keep generated document examples valid on current main
dodeja Oct 14, 2026
c59b79d
chore: Auto-generate Postman collection from openapi.json [skip ci]
github-actions[bot] Oct 14, 2026
6a28357
test(docs): verify generated document response examples
dodeja Oct 14, 2026
6988660
chore: Auto-generate Postman collection from openapi.json [skip ci]
github-actions[bot] Oct 14, 2026
5a3be7e
test(sdk): verify document catalog collection examples
dodeja Oct 14, 2026
1c59513
style: format generated document example regression tests
dodeja Oct 14, 2026
2b39714
chore: Auto-generate Postman collection from openapi.json [skip ci]
github-actions[bot] Oct 14, 2026
7451d23
test(sdk): verify structural document schema collection examples
dodeja Oct 14, 2026
6d16dc7
fix(docs): preserve request schemas while generating response examples
dodeja Oct 14, 2026
11bf4ec
chore: Auto-generate Postman collection from openapi.json [skip ci]
github-actions[bot] Oct 14, 2026
ae10631
ci: verify the generated collection at the current PR head
dodeja Oct 14, 2026
a3a60a6
fix(postman): preserve declared path parameter examples in requests
dodeja Oct 14, 2026
93a2ff3
chore: Auto-generate Postman collection from openapi.json [skip ci]
github-actions[bot] Oct 14, 2026
6b4be4c
test(postman): run published request regressions in workspace CI
dodeja Oct 14, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/claude.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
Useful commands:
- cd docs && mintlify dev
- spectral lint --ruleset .spectral.mjs docs/openapi.json
- openapi2postmanv2 -s docs/openapi.json -o Terminal49-API.postman_collection.json -p -O folderStrategy=Tags,enableOptionalParameters=false
- node tools/generate-postman.mjs

If API behavior or schemas change, update docs/openapi.json first. Regenerate the Postman collection only when explicitly needed.
You have no shell. File edits are limited to the checked-out repository and commits go through the GitHub API; when validation needs shell commands, report the exact commands for a maintainer to run."
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/generate_postman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- 'docs/openapi.json'
- '.github/workflows/generate_postman.yml'
- 'tools/postman-generation.test.mjs'
- 'tools/generate-postman.mjs'

jobs:
generate-postman-collection:
Expand All @@ -29,7 +30,7 @@ jobs:
- name: Generate Postman Collection
run: |
echo "Generating Postman collection from OpenAPI spec..."
openapi2postmanv2 -s docs/openapi.json -o Terminal49-API.postman_collection.json -p -O folderStrategy=Tags,enableOptionalParameters=false
node tools/generate-postman.mjs

- name: Test Postman generation
run: node --test tools/postman-generation.test.mjs
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ For substantive documentation writing, use the repo-local skill at `skills/termi
### Docs
- Preview locally: `cd docs && mintlify dev`
- Lint the OpenAPI spec: `spectral lint --ruleset .spectral.mjs docs/openapi.json`
- Regenerate Postman: `openapi2postmanv2 -s docs/openapi.json -o Terminal49-API.postman_collection.json -p -O folderStrategy=Tags,enableOptionalParameters=false`
- Regenerate Postman: `node tools/generate-postman.mjs`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update the remaining direct Postman regeneration command

When a documentation contributor follows agent.md:43, the direct openapi2postmanv2 command bypasses the new wrapper's response- and path-example overlays and can overwrite the collection with schema-generated placeholders instead of the declared document-type examples. Update that instruction to use the same wrapper now documented here.

AGENTS.md reference: AGENTS.md:L64-L64

Useful? React with 👍 / 👎.


### Code (npm workspaces)
- Install: `vp install` at the root (`npm ci` remains the frozen CI and Vercel install command).
Expand Down
963 changes: 590 additions & 373 deletions Terminal49-API.postman_collection.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ For substantive documentation writing, use the repo-local skill at `../skills/te
## When updating API reference
- If you change API behavior or schemas, update `docs/openapi.json` first.
- Regenerate the Postman collection with:
`openapi2postmanv2 -s docs/openapi.json -o Terminal49-API.postman_collection.json -p -O folderStrategy=Tags,enableOptionalParameters=false`
`node tools/generate-postman.mjs`

## MDX conventions
- Every page must include frontmatter with a `title`.
Expand Down
Original file line number Diff line number Diff 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 API to 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 number Diff line number Diff 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).
8 changes: 6 additions & 2 deletions docs/api-docs/api-reference/documents/list-document-types.mdx
Original file line number Diff line number Diff 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 number Diff line number Diff line change
Expand Up @@ -161,6 +161,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