@talonic/docs 0.18.0 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/content.js CHANGED
@@ -1,23 +1,23 @@
1
1
  // src/content/helpers.ts
2
- function deriveBreadcrumbs(sections36, leafId, domain) {
2
+ function deriveBreadcrumbs(sections44, leafId, domain) {
3
3
  const root = {
4
4
  label: domain === "api" ? "API Reference" : "Platform Guide",
5
5
  slug: domain
6
6
  };
7
- for (const group of sections36) {
7
+ for (const group of sections44) {
8
8
  const child = group.children?.find((c) => c.id === leafId);
9
9
  if (child) {
10
10
  return [root, { label: group.label, slug: group.id }, { label: child.label, slug: child.id }];
11
11
  }
12
12
  }
13
- const topLevel = sections36.find((s) => s.id === leafId);
13
+ const topLevel = sections44.find((s) => s.id === leafId);
14
14
  if (topLevel) {
15
15
  return [root, { label: topLevel.label, slug: topLevel.id }];
16
16
  }
17
17
  return [root];
18
18
  }
19
- function derivePrevNext(sections36, leafId) {
20
- const flat = sections36.flatMap(
19
+ function derivePrevNext(sections44, leafId) {
20
+ const flat = sections44.flatMap(
21
21
  (s) => s.children ?? [{ id: s.id, label: s.label }]
22
22
  );
23
23
  const idx = flat.findIndex((c) => c.id === leafId);
@@ -162,6 +162,70 @@ var API_NAV_SECTIONS = [
162
162
  { id: "agent-context", label: "Get Workspace Context" },
163
163
  { id: "agent-tools", label: "List Agent Tools" }
164
164
  ] },
165
+ { id: "matching", label: "Matching", children: [
166
+ { id: "list-matching-configs", label: "List Configs" },
167
+ { id: "create-matching-config", label: "Create Config" },
168
+ { id: "get-matching-config", label: "Get / Update / Delete Config" },
169
+ { id: "run-matching", label: "Run Matching" },
170
+ { id: "get-matching-run", label: "Get Run" },
171
+ { id: "get-matching-results", label: "Get Results" },
172
+ { id: "generate-strategy", label: "Generate Strategy" }
173
+ ] },
174
+ { id: "delivery", label: "Delivery", children: [
175
+ { id: "list-delivery-destinations", label: "List Destinations" },
176
+ { id: "create-delivery-destination", label: "Create Destination" },
177
+ { id: "manage-delivery-destination", label: "Manage Destination" },
178
+ { id: "list-delivery-bindings", label: "List Bindings" },
179
+ { id: "create-delivery-binding", label: "Create Binding" },
180
+ { id: "manage-delivery-binding", label: "Manage Binding" },
181
+ { id: "delivery-history", label: "History" },
182
+ { id: "delivery-dlq", label: "Dead Letter Queue" },
183
+ { id: "delivery-catalog", label: "Catalog" }
184
+ ] },
185
+ { id: "batches", label: "Batches", children: [
186
+ { id: "list-batches", label: "List Batches" },
187
+ { id: "get-batch", label: "Get Batch" },
188
+ { id: "sync-batch", label: "Sync Batch" },
189
+ { id: "cancel-batch", label: "Cancel Batch" }
190
+ ] },
191
+ { id: "cases", label: "Cases", children: [
192
+ { id: "list-cases", label: "List Cases" },
193
+ { id: "get-case", label: "Get Case" },
194
+ { id: "case-anomalies", label: "Anomalies" },
195
+ { id: "case-evidence", label: "Evidence" },
196
+ { id: "case-operations", label: "Operations" },
197
+ { id: "case-edges", label: "Edges" },
198
+ { id: "case-documents", label: "Documents" },
199
+ { id: "case-merge-split", label: "Merge & Split" }
200
+ ] },
201
+ { id: "review", label: "Review", children: [
202
+ { id: "list-review-items", label: "List Items" },
203
+ { id: "review-stats", label: "Stats" },
204
+ { id: "get-review-item", label: "Get Item" },
205
+ { id: "review-action", label: "Take Action" },
206
+ { id: "review-batch", label: "Batch Action" },
207
+ { id: "review-assign", label: "Assign" }
208
+ ] },
209
+ { id: "quality", label: "Quality", children: [
210
+ { id: "list-quality-datasets", label: "List Datasets" },
211
+ { id: "create-quality-dataset", label: "Create Dataset" },
212
+ { id: "get-quality-dataset", label: "Get / Delete Dataset" },
213
+ { id: "quality-entries", label: "Entries" },
214
+ { id: "list-benchmarks", label: "List Benchmarks" },
215
+ { id: "create-benchmark", label: "Create Benchmark" },
216
+ { id: "get-benchmark-results", label: "Results & Compare" }
217
+ ] },
218
+ { id: "routing-rules", label: "Routing Rules", children: [
219
+ { id: "list-routing-rules", label: "List Rules" },
220
+ { id: "create-routing-rule", label: "Create Rule" },
221
+ { id: "manage-routing-rule", label: "Manage Rule" },
222
+ { id: "reorder-routing-rules", label: "Reorder" }
223
+ ] },
224
+ { id: "billing", label: "Billing", children: [
225
+ { id: "billing-settings", label: "Settings" },
226
+ { id: "billing-topup", label: "Auto Top-Up" },
227
+ { id: "cost-headers", label: "Cost Headers" }
228
+ ] },
165
229
  { id: "errors-rate-limits", label: "Errors & Rate Limits", children: [
166
230
  { id: "error-format", label: "Error Format" },
167
231
  { id: "error-codes", label: "Error Codes" },
@@ -186,7 +250,8 @@ var PLATFORM_NAV_SECTIONS = [
186
250
  { id: "document-processing", label: "Document Processing" },
187
251
  { id: "document-types", label: "Document Types" },
188
252
  { id: "document-detail", label: "Document Detail" },
189
- { id: "routing-rules", label: "Routing Rules" }
253
+ { id: "routing-rules", label: "Routing Rules" },
254
+ { id: "source-connectors", label: "Source Connectors" }
190
255
  ] },
191
256
  { id: "field-intelligence", label: "Field Intelligence", children: [
192
257
  { id: "field-registry", label: "Field Registry" },
@@ -222,7 +287,9 @@ var PLATFORM_NAV_SECTIONS = [
222
287
  { id: "link-keys", label: "Link Keys" },
223
288
  { id: "entity-linking", label: "Entity Linking" },
224
289
  { id: "cases", label: "Cases" },
225
- { id: "document-graph", label: "Document Graph" }
290
+ { id: "document-graph", label: "Document Graph" },
291
+ { id: "anomaly-detection", label: "Anomaly Detection" },
292
+ { id: "evidence-validation", label: "Evidence Validation" }
226
293
  ] },
227
294
  { id: "batch-inference", label: "Batch Inference", children: [
228
295
  { id: "batch-overview", label: "Overview" },
@@ -237,7 +304,9 @@ var PLATFORM_NAV_SECTIONS = [
237
304
  ] },
238
305
  { id: "data-products", label: "Data Products", children: [
239
306
  { id: "dataset-templates", label: "Dataset Templates" },
240
- { id: "assemblies", label: "Assemblies" }
307
+ { id: "assemblies", label: "Assemblies" },
308
+ { id: "id-dispensers", label: "ID Dispensers" },
309
+ { id: "data-product-sharing", label: "Sharing & Export" }
241
310
  ] },
242
311
  { id: "validation-quality", label: "Validation & Quality", children: [
243
312
  { id: "validation-checks", label: "Validation Checks" },
@@ -745,8 +814,8 @@ var sections3 = [
745
814
  },
746
815
  {
747
816
  name: "OCR",
748
- type: "Talonic API",
749
- description: "PDF, DOCX, DOC, PPTX, PPT, XLSX, XLS, XLSM, MSG, BMP \u2014 converted to Markdown."
817
+ type: "Mistral Document AI",
818
+ description: "PDF, DOCX, DOC, PPTX, PPT, XLSX, XLS, XLSM, MSG, BMP \u2014 converted to Markdown via Mistral Document AI (with Talonic API fallback)."
750
819
  },
751
820
  {
752
821
  name: "Archives",
@@ -973,6 +1042,112 @@ var sections3 = [
973
1042
  }
974
1043
  ],
975
1044
  mentions: ["routing rules", "auto-assign", "schema assignment", "document workflows"]
1045
+ },
1046
+ {
1047
+ slug: "source-connectors",
1048
+ parentSlug: "sources-docs",
1049
+ title: "Source Connectors",
1050
+ seoTitle: "Source Connectors \u2014 Cloud & Database Ingestion \u2014 Talonic Docs",
1051
+ description: "Connect external systems to automatically ingest documents: Google Drive, Gmail, SharePoint, OneDrive, Outlook, Teams, Notion, SQL databases, Amazon S3, and Azure Blob Storage.",
1052
+ content: [
1053
+ {
1054
+ type: "paragraph",
1055
+ text: "Beyond manual upload and API ingestion, Talonic connects to external systems to automatically ingest documents. Each connector authenticates via OAuth or credentials and syncs documents into a source."
1056
+ },
1057
+ {
1058
+ type: "param-table",
1059
+ title: "Available connectors",
1060
+ params: [
1061
+ {
1062
+ name: "Google Drive",
1063
+ type: "OAuth",
1064
+ description: "Sync files from Google Drive folders. Shared drives supported."
1065
+ },
1066
+ {
1067
+ name: "Gmail",
1068
+ type: "OAuth",
1069
+ description: "Ingest email attachments. Search bar with Gmail query passthrough."
1070
+ },
1071
+ {
1072
+ name: "SharePoint",
1073
+ type: "OAuth",
1074
+ description: "Sync documents from SharePoint sites and document libraries."
1075
+ },
1076
+ {
1077
+ name: "OneDrive",
1078
+ type: "OAuth",
1079
+ description: "Sync files from OneDrive personal or business accounts."
1080
+ },
1081
+ {
1082
+ name: "Outlook",
1083
+ type: "OAuth",
1084
+ description: "Ingest email attachments with date range and body inclusion settings."
1085
+ },
1086
+ {
1087
+ name: "Teams",
1088
+ type: "OAuth",
1089
+ description: "Ingest meeting transcripts and channel attachments. Requires tenant-admin consent for privileged scopes."
1090
+ },
1091
+ {
1092
+ name: "Notion",
1093
+ type: "OAuth",
1094
+ description: "Sync pages and databases. Users choose which pages to share during OAuth consent."
1095
+ },
1096
+ {
1097
+ name: "SQL",
1098
+ type: "credentials",
1099
+ description: "Connect to MSSQL or PostgreSQL databases. Browse tables, run saved queries."
1100
+ },
1101
+ {
1102
+ name: "Amazon S3",
1103
+ type: "credentials",
1104
+ description: "Sync from S3 buckets (and S3-compatible storage like MinIO, R2)."
1105
+ },
1106
+ {
1107
+ name: "Azure Blob",
1108
+ type: "credentials",
1109
+ description: "Sync from Azure Blob Storage containers."
1110
+ }
1111
+ ]
1112
+ },
1113
+ {
1114
+ type: "paragraph",
1115
+ text: "Google and Microsoft connectors share a single OAuth client each. OAuth tokens are encrypted at rest using `aes-256-gcm`. Each source card includes a **Batch Processing** toggle to defer extraction at 50% cost."
1116
+ },
1117
+ {
1118
+ type: "callout",
1119
+ text: "Connectors are feature-gated on their OAuth client ID/secret. Without credentials configured, the connector dropdown entry is disabled."
1120
+ }
1121
+ ],
1122
+ related: [
1123
+ { label: "Uploading Documents", slug: "uploading" },
1124
+ { label: "Batch Processing Mode", slug: "batch-processing" },
1125
+ { label: "Document Processing", slug: "document-processing" }
1126
+ ],
1127
+ faq: [
1128
+ {
1129
+ question: "What external sources can Talonic connect to?",
1130
+ answer: "Google Drive, Gmail, SharePoint, OneDrive, Outlook, Teams, Notion, SQL databases (MSSQL/PostgreSQL), Amazon S3, and Azure Blob Storage."
1131
+ },
1132
+ {
1133
+ question: "How are OAuth tokens stored?",
1134
+ answer: "OAuth access and refresh tokens are encrypted at rest using AES-256-GCM. The encryption key is SOURCE_ENCRYPTION_KEY (falls back to JWT_SECRET)."
1135
+ }
1136
+ ],
1137
+ mentions: [
1138
+ "connectors",
1139
+ "Google Drive",
1140
+ "Gmail",
1141
+ "SharePoint",
1142
+ "OneDrive",
1143
+ "Outlook",
1144
+ "Teams",
1145
+ "Notion",
1146
+ "SQL",
1147
+ "S3",
1148
+ "Azure Blob",
1149
+ "OAuth"
1150
+ ]
976
1151
  }
977
1152
  ];
978
1153
 
@@ -2318,11 +2493,46 @@ var sections7 = [
2318
2493
  },
2319
2494
  {
2320
2495
  type: "paragraph",
2321
- text: "Each case detail page shows: documents, shared entities, evidence chain (which field keys produced each connection), timeline, and auto-generated AI narration."
2496
+ text: "The case detail page is organized into tabs:"
2497
+ },
2498
+ {
2499
+ type: "param-table",
2500
+ params: [
2501
+ {
2502
+ name: "Overview",
2503
+ type: "tab",
2504
+ description: "AI narration, anomaly banner, entity summary cards, and documents grid."
2505
+ },
2506
+ {
2507
+ name: "Anomalies",
2508
+ type: "tab",
2509
+ description: "Severity filter pills, dismissable anomaly cards, show-dismissed toggle. Advanced mode only."
2510
+ },
2511
+ {
2512
+ name: "Evidence",
2513
+ type: "tab",
2514
+ description: "Validation badges (colored dots), filter bar (status/document/category/search), group-by-document collapsible sections."
2515
+ },
2516
+ {
2517
+ name: "Timeline",
2518
+ type: "tab",
2519
+ description: "Chronological event log for the case."
2520
+ }
2521
+ ]
2522
+ },
2523
+ {
2524
+ type: "paragraph",
2525
+ text: "Cases display an AI-generated **case label** as the primary title and include anomaly count badges in the header. Evidence and Timeline tabs support export to MD, CSV, and JSON."
2526
+ },
2527
+ {
2528
+ type: "paragraph",
2529
+ text: "Additional case operations: **merge** multiple cases into one, **split** a case into separate groups, **pin** or remove documents from a case, and **confirm** or **reject** individual linking edges."
2322
2530
  }
2323
2531
  ],
2324
2532
  related: [
2325
2533
  { label: "Entity Linking", slug: "entity-linking" },
2534
+ { label: "Anomaly Detection", slug: "anomaly-detection" },
2535
+ { label: "Evidence Validation", slug: "evidence-validation" },
2326
2536
  { label: "Document Graph", slug: "document-graph" },
2327
2537
  { label: "Link Keys", slug: "link-keys" }
2328
2538
  ],
@@ -2333,10 +2543,14 @@ var sections7 = [
2333
2543
  },
2334
2544
  {
2335
2545
  question: "What does a case detail page show?",
2336
- answer: "The case detail page shows: connected documents, shared entities, evidence chain (which field keys produced each connection), a timeline, and auto-generated AI narration."
2546
+ answer: "The case detail page has four tabs: Overview (AI narration, anomaly banner, entity cards, documents), Anomalies (severity filters, dismissable cards), Evidence (validation badges, filters, group-by-document), and Timeline."
2547
+ },
2548
+ {
2549
+ question: "Can I merge or split cases?",
2550
+ answer: "Yes. Merge multiple cases into one from the cases list, or split a case into separate groups from the case detail page. You can also pin or remove individual documents and confirm or reject linking edges."
2337
2551
  }
2338
2552
  ],
2339
- mentions: ["cases", "entity groups", "evidence chain", "AI narration", "document connections"]
2553
+ mentions: ["cases", "entity groups", "evidence chain", "AI narration", "document connections", "case label", "merge", "split"]
2340
2554
  },
2341
2555
  {
2342
2556
  slug: "document-graph",
@@ -2365,6 +2579,116 @@ var sections7 = [
2365
2579
  }
2366
2580
  ],
2367
2581
  mentions: ["document graph", "D3-force layout", "bipartite graph", "case templates"]
2582
+ },
2583
+ {
2584
+ slug: "anomaly-detection",
2585
+ parentSlug: "linking-cases",
2586
+ title: "Anomaly Detection",
2587
+ seoTitle: "Anomaly Detection \u2014 Case-Level Data Quality \u2014 Talonic Docs",
2588
+ description: "Five structural detectors surface data quality issues at the case level: validation clusters, field conflicts, duplicate key divergence, missing document types, and value reuse patterns.",
2589
+ content: [
2590
+ {
2591
+ type: "paragraph",
2592
+ text: "The anomaly detection engine runs five structural detectors across case data to surface potential quality issues:"
2593
+ },
2594
+ {
2595
+ type: "param-table",
2596
+ title: "Anomaly detectors",
2597
+ params: [
2598
+ {
2599
+ name: "Validation Cluster",
2600
+ type: "D1",
2601
+ description: "Multiple validation failures concentrated in the same document or field group."
2602
+ },
2603
+ {
2604
+ name: "Field Conflict",
2605
+ type: "D2",
2606
+ description: "The same field has contradictory values across documents in a case."
2607
+ },
2608
+ {
2609
+ name: "Duplicate Key Divergence",
2610
+ type: "D3",
2611
+ description: "Documents share a link key value but differ on fields that should match."
2612
+ },
2613
+ {
2614
+ name: "Missing Document Type",
2615
+ type: "D4",
2616
+ description: "A case template expects a document type that is absent from this case."
2617
+ },
2618
+ {
2619
+ name: "Value Reuse",
2620
+ type: "D5",
2621
+ description: "Identical values appear across unrelated fields, suggesting copy-paste or extraction errors."
2622
+ }
2623
+ ]
2624
+ },
2625
+ {
2626
+ type: "paragraph",
2627
+ text: "Anomalies appear in the **Anomalies** tab of the case detail page (Advanced mode). Each anomaly card shows severity, affected fields, and a dismiss button. Dismissed anomalies are hidden by default but visible via the **show dismissed** toggle."
2628
+ }
2629
+ ],
2630
+ related: [
2631
+ { label: "Cases", slug: "cases" },
2632
+ { label: "Evidence Validation", slug: "evidence-validation" },
2633
+ { label: "Validation Checks", slug: "validation-checks" }
2634
+ ],
2635
+ faq: [
2636
+ {
2637
+ question: "What anomalies does Talonic detect?",
2638
+ answer: "Five structural patterns: validation clusters, field conflicts, duplicate key divergence, missing document types, and value reuse. Each is surfaced as a dismissable card on the case detail page."
2639
+ }
2640
+ ],
2641
+ mentions: ["anomaly detection", "validation cluster", "field conflict", "duplicate key divergence", "value reuse"]
2642
+ },
2643
+ {
2644
+ slug: "evidence-validation",
2645
+ parentSlug: "linking-cases",
2646
+ title: "Evidence Validation",
2647
+ seoTitle: "Evidence Validation \u2014 Field-Level Quality Rules \u2014 Talonic Docs",
2648
+ description: "Rule-based field validation engine with 7 structural validators, checksum validators (Luhn, ABA, IBAN, ISBN), and extensible domain packs for industry-specific rules.",
2649
+ content: [
2650
+ {
2651
+ type: "paragraph",
2652
+ text: "The evidence validation engine applies rule-based checks to extracted field values. Results appear as colored validation badges in the **Evidence** tab of the case detail page."
2653
+ },
2654
+ {
2655
+ type: "param-table",
2656
+ title: "Structural validators (S1\u2013S7)",
2657
+ params: [
2658
+ { name: "S1", type: "rule", description: "Free-text spillover \u2014 field value contains unstructured text that leaked from adjacent content." },
2659
+ { name: "S2", type: "rule", description: "Empty value \u2014 required field is blank or whitespace-only." },
2660
+ { name: "S3", type: "rule", description: "Email/URL misclassification \u2014 value looks like an email or URL but is in a non-email/URL field." },
2661
+ { name: "S4", type: "rule", description: "Name in URL field \u2014 a person or company name extracted into a URL-typed field." },
2662
+ { name: "S5", type: "rule", description: "Alpha in numeric field \u2014 alphabetic characters in a field expected to be numeric." },
2663
+ { name: "S6", type: "rule", description: "Cross-field duplicate \u2014 identical value appears in multiple unrelated fields on the same document." },
2664
+ { name: "S7", type: "rule", description: "Checksum validation \u2014 Luhn (credit cards), ABA (routing numbers), IBAN, ISBN checksums verified via parameterized factory." }
2665
+ ]
2666
+ },
2667
+ {
2668
+ type: "paragraph",
2669
+ text: "**Domain packs** extend validation with industry-specific rules. The freight domain pack includes DOT number state detection and MC number validation. Additional packs can be added to `domain-packs/` without modifying the core engine."
2670
+ },
2671
+ {
2672
+ type: "callout",
2673
+ text: "Evidence validation results are stored in a separate `evidence_validation_results` table keyed by (document_id, entity_id, field_key) \u2014 not in the extraction or linking tables."
2674
+ }
2675
+ ],
2676
+ related: [
2677
+ { label: "Cases", slug: "cases" },
2678
+ { label: "Anomaly Detection", slug: "anomaly-detection" },
2679
+ { label: "Validation Checks", slug: "validation-checks" }
2680
+ ],
2681
+ faq: [
2682
+ {
2683
+ question: "What is evidence validation?",
2684
+ answer: "A rule-based engine that checks extracted field values for structural errors (spillover, misclassification, duplicates) and checksum validity (Luhn, IBAN, etc.). Results appear as colored badges in the case Evidence tab."
2685
+ },
2686
+ {
2687
+ question: "What are domain packs?",
2688
+ answer: "Domain packs add industry-specific validation rules. For example, the freight domain pack validates DOT numbers and MC numbers. New packs can be added without modifying the core engine."
2689
+ }
2690
+ ],
2691
+ mentions: ["evidence validation", "structural validators", "checksum", "Luhn", "IBAN", "domain packs", "freight"]
2368
2692
  }
2369
2693
  ];
2370
2694
 
@@ -2455,6 +2779,114 @@ var sections8 = [
2455
2779
  "audit trail",
2456
2780
  "production datasets"
2457
2781
  ]
2782
+ },
2783
+ {
2784
+ slug: "id-dispensers",
2785
+ parentSlug: "data-products",
2786
+ title: "ID Dispensers",
2787
+ seoTitle: "ID Dispensers \u2014 Unique Record Identifiers \u2014 Talonic Docs",
2788
+ description: "Generate unique identifiers for data product rows using configurable rules: prefix generation, fallback chains for multi-field resolution, and resolution maps.",
2789
+ content: [
2790
+ {
2791
+ type: "paragraph",
2792
+ text: "ID dispensers generate unique identifiers for each row in a data product. Configure rules to build IDs from extracted field values with a prefix, fallback chains when the primary field is empty, and resolution maps that normalize values before ID generation."
2793
+ },
2794
+ {
2795
+ type: "param-table",
2796
+ title: "ID rule configuration",
2797
+ params: [
2798
+ {
2799
+ name: "Source field",
2800
+ type: "field",
2801
+ description: "The primary field to derive the ID from. When empty, generates a prefix-less sequential ID."
2802
+ },
2803
+ {
2804
+ name: "Fallback chain",
2805
+ type: "field[]",
2806
+ description: "Ordered list of alternative fields tried when the source field is empty on a row."
2807
+ },
2808
+ {
2809
+ name: "Resolution map",
2810
+ type: "map",
2811
+ description: 'Key-value lookup that normalizes field values before ID generation (e.g., "ACME Corp" → "ACME").'
2812
+ }
2813
+ ]
2814
+ },
2815
+ {
2816
+ type: "paragraph",
2817
+ text: "ID rules are persisted before generating IDs. Navigate to a data product detail page and use **Apply ID Rules** to generate or **Regenerate IDs** to refresh."
2818
+ }
2819
+ ],
2820
+ related: [
2821
+ { label: "Dataset Templates", slug: "dataset-templates" },
2822
+ { label: "Assemblies", slug: "assemblies" },
2823
+ { label: "Sharing & Export", slug: "data-product-sharing" }
2824
+ ],
2825
+ faq: [
2826
+ {
2827
+ question: "How do ID dispensers handle missing field values?",
2828
+ answer: "When the source field is empty, the dispenser tries each field in the fallback chain in order. If all are empty, it generates a prefix-less sequential ID."
2829
+ }
2830
+ ],
2831
+ mentions: ["ID dispenser", "unique identifiers", "fallback chain", "resolution map"]
2832
+ },
2833
+ {
2834
+ slug: "data-product-sharing",
2835
+ parentSlug: "data-products",
2836
+ title: "Sharing & Export",
2837
+ seoTitle: "Data Product Sharing & Export \u2014 Talonic Docs",
2838
+ description: "Share data products via public URLs with share tokens. The delivery website provides three views: Structured Data, Resolved, and Data Product. Export to CSV with leading zero preservation.",
2839
+ content: [
2840
+ {
2841
+ type: "paragraph",
2842
+ text: "Each data product can generate a **share token** \u2014 a public URL that grants read access without authentication. The delivery website renders three toggle views:"
2843
+ },
2844
+ {
2845
+ type: "param-table",
2846
+ params: [
2847
+ {
2848
+ name: "Structured Data",
2849
+ type: "view",
2850
+ description: "Raw extraction results per document, organized by schema fields."
2851
+ },
2852
+ {
2853
+ name: "Resolved",
2854
+ type: "view",
2855
+ description: "Values after resolution (lookups, normalization, format constraints applied)."
2856
+ },
2857
+ {
2858
+ name: "Data Product",
2859
+ type: "view",
2860
+ description: "Final assembled dataset with generated IDs and all transforms applied."
2861
+ }
2862
+ ]
2863
+ },
2864
+ {
2865
+ type: "paragraph",
2866
+ text: "The delivery website includes the Talonic logo, per-run selection, and **CSV export** with leading zero and long number preservation (values are not coerced to numbers)."
2867
+ },
2868
+ {
2869
+ type: "paragraph",
2870
+ text: "**Auto-review** and **auto-resolve singles** are available to streamline the approval process: auto-review uses LLM to propose approve/reject decisions, and auto-resolve singles automatically accepts fields with only one candidate value."
2871
+ }
2872
+ ],
2873
+ related: [
2874
+ { label: "Dataset Templates", slug: "dataset-templates" },
2875
+ { label: "Assemblies", slug: "assemblies" },
2876
+ { label: "ID Dispensers", slug: "id-dispensers" },
2877
+ { label: "Delivery Pipeline", slug: "delivery-pipeline" }
2878
+ ],
2879
+ faq: [
2880
+ {
2881
+ question: "Can I share a data product publicly?",
2882
+ answer: "Yes. Generate a share token from the data product detail page. The public URL provides a delivery website with three views (Structured Data, Resolved, Data Product) and CSV export."
2883
+ },
2884
+ {
2885
+ question: "Does CSV export preserve leading zeros?",
2886
+ answer: "Yes. All CSV exports preserve leading zeros and long numbers \u2014 values are never coerced to numeric types."
2887
+ }
2888
+ ],
2889
+ mentions: ["share token", "delivery website", "CSV export", "auto-review", "auto-resolve"]
2458
2890
  }
2459
2891
  ];
2460
2892
 
@@ -7778,8 +8210,2681 @@ var sections34 = [
7778
8210
  }
7779
8211
  ];
7780
8212
 
7781
- // src/content/api/errors-rate-limits.ts
8213
+ // src/content/api/matching.ts
7782
8214
  var sections35 = [
8215
+ {
8216
+ slug: "list-matching-configs",
8217
+ parentSlug: "matching",
8218
+ title: "List Configs",
8219
+ seoTitle: "List Matching Configs \u2014 Talonic Docs",
8220
+ description: "List all matching configurations for the current workspace. Each config defines field mappings, strategies, and weights used to match documents against reference data.",
8221
+ content: [
8222
+ { type: "paragraph", text: "Matching connects incoming documents to reference datasets using configurable field-level strategies. Each configuration defines which fields to compare, how to compare them (exact, fuzzy, date range, numeric range), and the relative weight of each field in the overall confidence score." },
8223
+ {
8224
+ type: "endpoint",
8225
+ method: "GET",
8226
+ path: "/v1/matching/configs",
8227
+ summary: "List all matching configurations.",
8228
+ description: "Requires read scope. Returns all matching configs for the authenticated workspace.",
8229
+ blocks: [
8230
+ {
8231
+ type: "code",
8232
+ title: "Response",
8233
+ code: `{
8234
+ "data": [
8235
+ {
8236
+ "id": "mc_a1b2c3d4",
8237
+ "name": "Vendor Invoice Match",
8238
+ "reference_data_id": "ref_x9y8z7",
8239
+ "fields": [
8240
+ { "source": "vendor_name", "target": "name", "strategy": "fuzzy", "weight": 0.4 },
8241
+ { "source": "invoice_date", "target": "date", "strategy": "date_range", "weight": 0.3 },
8242
+ { "source": "amount", "target": "total", "strategy": "numeric_range", "weight": 0.3 }
8243
+ ],
8244
+ "created_at": "2024-10-01T08:00:00Z",
8245
+ "updated_at": "2024-10-01T08:00:00Z"
8246
+ }
8247
+ ]
8248
+ }`
8249
+ }
8250
+ ]
8251
+ }
8252
+ ],
8253
+ related: [
8254
+ { label: "Create Config", slug: "create-matching-config" },
8255
+ { label: "Run Matching", slug: "run-matching" }
8256
+ ],
8257
+ faq: [
8258
+ { question: "What is a matching configuration?", answer: "A matching configuration defines which fields to compare between documents and reference data, what comparison strategy to use per field (exact, fuzzy, date_range, numeric_range), and how much weight each field carries in the overall confidence score." }
8259
+ ],
8260
+ mentions: ["matching", "reference data", "field mapping"]
8261
+ },
8262
+ {
8263
+ slug: "create-matching-config",
8264
+ parentSlug: "matching",
8265
+ title: "Create Config",
8266
+ seoTitle: "Create Matching Config \u2014 Talonic Docs",
8267
+ description: "Create a matching configuration with field mappings, comparison strategies (exact, fuzzy, date_range, numeric_range), and per-field weights that sum to 1.0.",
8268
+ content: [
8269
+ {
8270
+ type: "endpoint",
8271
+ method: "POST",
8272
+ path: "/v1/matching/configs",
8273
+ summary: "Create a new matching configuration.",
8274
+ description: "Requires write scope. Field weights must sum to 1.0. The referenced `reference_data_id` must exist.",
8275
+ blocks: [
8276
+ {
8277
+ type: "param-table",
8278
+ title: "Body parameters",
8279
+ params: [
8280
+ { name: "name", type: "string", required: true, description: "Human-readable name for the config." },
8281
+ { name: "reference_data_id", type: "string", required: true, description: "ID of the uploaded reference dataset to match against." },
8282
+ { name: "fields", type: "array", required: true, description: "Field mapping array. Each entry has `source`, `target`, `strategy`, and `weight`." },
8283
+ { name: "fields[].source", type: "string", required: true, description: "Field name in the source document." },
8284
+ { name: "fields[].target", type: "string", required: true, description: "Column name in the reference dataset." },
8285
+ { name: "fields[].strategy", type: "string", required: true, description: "Comparison strategy: `exact`, `fuzzy`, `date_range`, or `numeric_range`." },
8286
+ { name: "fields[].weight", type: "number", required: true, description: "Relative weight (0-1). All weights must sum to 1.0." }
8287
+ ]
8288
+ },
8289
+ {
8290
+ type: "code",
8291
+ title: "Request body",
8292
+ code: `{
8293
+ "name": "Vendor Invoice Match",
8294
+ "reference_data_id": "ref_x9y8z7",
8295
+ "fields": [
8296
+ { "source": "vendor_name", "target": "name", "strategy": "fuzzy", "weight": 0.4 },
8297
+ { "source": "invoice_date", "target": "date", "strategy": "date_range", "weight": 0.3 },
8298
+ { "source": "amount", "target": "total", "strategy": "numeric_range", "weight": 0.3 }
8299
+ ]
8300
+ }`
8301
+ },
8302
+ {
8303
+ type: "code",
8304
+ title: "Response (201 Created)",
8305
+ code: `{
8306
+ "id": "mc_a1b2c3d4",
8307
+ "name": "Vendor Invoice Match",
8308
+ "reference_data_id": "ref_x9y8z7",
8309
+ "fields": [...],
8310
+ "created_at": "2024-10-01T08:00:00Z"
8311
+ }`
8312
+ }
8313
+ ]
8314
+ }
8315
+ ],
8316
+ related: [
8317
+ { label: "List Configs", slug: "list-matching-configs" },
8318
+ { label: "Generate Strategy", slug: "generate-strategy" }
8319
+ ],
8320
+ faq: [
8321
+ { question: "What strategies are available for field matching?", answer: "Four strategies: exact (case-insensitive equality), fuzzy (Levenshtein/token similarity), date_range (date proximity within tolerance), and numeric_range (numeric proximity within tolerance)." }
8322
+ ],
8323
+ mentions: ["matching config", "field strategy", "weights"]
8324
+ },
8325
+ {
8326
+ slug: "get-matching-config",
8327
+ parentSlug: "matching",
8328
+ title: "Get / Update / Delete Config",
8329
+ seoTitle: "Manage Matching Config \u2014 Talonic Docs",
8330
+ description: "Get matching configuration details, update field mappings and weights, or delete a configuration. Deleting a config does not remove past run results.",
8331
+ content: [
8332
+ {
8333
+ type: "endpoint",
8334
+ method: "GET",
8335
+ path: "/v1/matching/configs/:id",
8336
+ summary: "Get configuration details.",
8337
+ blocks: [
8338
+ {
8339
+ type: "code",
8340
+ title: "Response",
8341
+ code: `{
8342
+ "id": "mc_a1b2c3d4",
8343
+ "name": "Vendor Invoice Match",
8344
+ "reference_data_id": "ref_x9y8z7",
8345
+ "fields": [
8346
+ { "source": "vendor_name", "target": "name", "strategy": "fuzzy", "weight": 0.4 },
8347
+ { "source": "invoice_date", "target": "date", "strategy": "date_range", "weight": 0.3 },
8348
+ { "source": "amount", "target": "total", "strategy": "numeric_range", "weight": 0.3 }
8349
+ ],
8350
+ "created_at": "2024-10-01T08:00:00Z",
8351
+ "updated_at": "2024-10-01T08:00:00Z"
8352
+ }`
8353
+ }
8354
+ ]
8355
+ },
8356
+ {
8357
+ type: "endpoint",
8358
+ method: "PUT",
8359
+ path: "/v1/matching/configs/:id",
8360
+ summary: "Update configuration fields, weights, or name.",
8361
+ blocks: [
8362
+ {
8363
+ type: "param-table",
8364
+ title: "Body parameters",
8365
+ params: [
8366
+ { name: "name", type: "string", description: "Updated config name." },
8367
+ { name: "fields", type: "array", description: "Updated field mappings. Weights must still sum to 1.0." }
8368
+ ]
8369
+ }
8370
+ ]
8371
+ },
8372
+ {
8373
+ type: "endpoint",
8374
+ method: "DELETE",
8375
+ path: "/v1/matching/configs/:id",
8376
+ summary: "Delete a configuration. Past run results are retained.",
8377
+ blocks: []
8378
+ }
8379
+ ],
8380
+ related: [
8381
+ { label: "List Configs", slug: "list-matching-configs" },
8382
+ { label: "Run Matching", slug: "run-matching" }
8383
+ ],
8384
+ faq: [],
8385
+ mentions: ["matching config management"]
8386
+ },
8387
+ {
8388
+ slug: "run-matching",
8389
+ parentSlug: "matching",
8390
+ title: "Run Matching",
8391
+ seoTitle: "Run Matching \u2014 Talonic Docs",
8392
+ description: "Execute a matching run against reference data asynchronously, or use smart-run for AI-assisted matching that auto-tunes strategies. Poll run status via the run detail endpoint.",
8393
+ content: [
8394
+ {
8395
+ type: "endpoint",
8396
+ method: "POST",
8397
+ path: "/v1/matching/configs/:id/run",
8398
+ summary: "Start a matching run asynchronously.",
8399
+ description: "Requires write scope. Queues matching against all unmatched documents. Returns 202 with the run ID. Poll status via GET /v1/matching/runs/:id.",
8400
+ blocks: [
8401
+ {
8402
+ type: "code",
8403
+ title: "Response (202 Accepted)",
8404
+ code: `{
8405
+ "id": "mr_p4q5r6s7",
8406
+ "config_id": "mc_a1b2c3d4",
8407
+ "status": "queued",
8408
+ "created_at": "2024-10-02T14:00:00Z"
8409
+ }`
8410
+ }
8411
+ ]
8412
+ },
8413
+ {
8414
+ type: "endpoint",
8415
+ method: "POST",
8416
+ path: "/v1/matching/configs/:id/smart-run",
8417
+ summary: "Start an AI-assisted matching run.",
8418
+ description: "Like a standard run, but uses AI to auto-tune comparison strategies and thresholds based on data distribution. Returns 202.",
8419
+ blocks: [
8420
+ {
8421
+ type: "code",
8422
+ title: "Response (202 Accepted)",
8423
+ code: `{
8424
+ "id": "mr_t8u9v0w1",
8425
+ "config_id": "mc_a1b2c3d4",
8426
+ "status": "queued",
8427
+ "smart": true,
8428
+ "created_at": "2024-10-02T14:05:00Z"
8429
+ }`
8430
+ }
8431
+ ]
8432
+ }
8433
+ ],
8434
+ related: [
8435
+ { label: "Run Detail", slug: "get-matching-run" },
8436
+ { label: "Results", slug: "get-matching-results" }
8437
+ ],
8438
+ faq: [
8439
+ { question: "What is the difference between run and smart-run?", answer: "A standard run uses the strategies and weights defined in the config. A smart-run uses AI to analyse data distribution and auto-tune comparison thresholds before executing, which can improve accuracy on heterogeneous datasets." }
8440
+ ],
8441
+ mentions: ["matching run", "smart matching", "async"]
8442
+ },
8443
+ {
8444
+ slug: "get-matching-run",
8445
+ parentSlug: "matching",
8446
+ title: "Run Detail",
8447
+ seoTitle: "Matching Run Detail \u2014 Talonic Docs",
8448
+ description: "Get the status, progress, and summary of a matching run. Status progresses from queued to running to completed or failed.",
8449
+ content: [
8450
+ {
8451
+ type: "endpoint",
8452
+ method: "GET",
8453
+ path: "/v1/matching/runs/:id",
8454
+ summary: "Get run status and progress.",
8455
+ description: "Requires read scope. Returns the current state of a matching run including progress percentage and document counts.",
8456
+ blocks: [
8457
+ {
8458
+ type: "code",
8459
+ title: "Response",
8460
+ code: `{
8461
+ "id": "mr_p4q5r6s7",
8462
+ "config_id": "mc_a1b2c3d4",
8463
+ "status": "running",
8464
+ "progress": 0.65,
8465
+ "total_documents": 200,
8466
+ "matched_documents": 130,
8467
+ "started_at": "2024-10-02T14:00:05Z",
8468
+ "completed_at": null
8469
+ }`
8470
+ }
8471
+ ]
8472
+ }
8473
+ ],
8474
+ related: [
8475
+ { label: "Results", slug: "get-matching-results" },
8476
+ { label: "Run Matching", slug: "run-matching" }
8477
+ ],
8478
+ faq: [],
8479
+ mentions: ["matching run status", "progress"]
8480
+ },
8481
+ {
8482
+ slug: "get-matching-results",
8483
+ parentSlug: "matching",
8484
+ title: "Results",
8485
+ seoTitle: "Matching Results \u2014 Talonic Docs",
8486
+ description: "Retrieve matching results for a completed run. Returns the top 5 candidates per document with weighted confidence scores and per-field evidence breakdowns.",
8487
+ content: [
8488
+ {
8489
+ type: "endpoint",
8490
+ method: "GET",
8491
+ path: "/v1/matching/runs/:id/results",
8492
+ summary: "Get matching results with per-document candidates.",
8493
+ description: "Requires read scope. Each document returns up to 5 candidate matches from the reference dataset, ranked by weighted confidence. Per-field evidence shows individual strategy scores.",
8494
+ blocks: [
8495
+ {
8496
+ type: "param-table",
8497
+ title: "Query parameters",
8498
+ params: [
8499
+ { name: "page", type: "integer", default: "1", description: "Page number." },
8500
+ { name: "per_page", type: "integer", default: "50", description: "Results per page." },
8501
+ { name: "min_confidence", type: "number", description: "Filter results below this confidence threshold (0-1)." }
8502
+ ]
8503
+ },
8504
+ {
8505
+ type: "code",
8506
+ title: "Response",
8507
+ code: `{
8508
+ "data": [
8509
+ {
8510
+ "document_id": "doc_uuid_1",
8511
+ "candidates": [
8512
+ {
8513
+ "reference_row_id": "ref_row_42",
8514
+ "confidence": 0.92,
8515
+ "evidence": [
8516
+ { "field": "vendor_name", "strategy": "fuzzy", "score": 0.95, "source_value": "Acme Corp.", "target_value": "Acme Corporation" },
8517
+ { "field": "invoice_date", "strategy": "date_range", "score": 1.0, "source_value": "2024-09-15", "target_value": "2024-09-15" },
8518
+ { "field": "amount", "strategy": "numeric_range", "score": 0.82, "source_value": "4950.00", "target_value": "5000.00" }
8519
+ ]
8520
+ }
8521
+ ]
8522
+ }
8523
+ ],
8524
+ "pagination": { "page": 1, "per_page": 50, "total": 200 }
8525
+ }`
8526
+ }
8527
+ ]
8528
+ }
8529
+ ],
8530
+ related: [
8531
+ { label: "Run Detail", slug: "get-matching-run" },
8532
+ { label: "List Configs", slug: "list-matching-configs" }
8533
+ ],
8534
+ faq: [
8535
+ { question: "How is the confidence score calculated?", answer: "Each field produces a strategy-specific score (0-1). The overall confidence is the weighted sum of per-field scores, using the weights defined in the matching config." }
8536
+ ],
8537
+ mentions: ["matching results", "confidence score", "evidence"]
8538
+ },
8539
+ {
8540
+ slug: "generate-strategy",
8541
+ parentSlug: "matching",
8542
+ title: "Generate Strategy",
8543
+ seoTitle: "Generate Matching Strategy \u2014 Talonic Docs",
8544
+ description: "Use AI to auto-suggest field mappings and strategies for a reference dataset. Analyses column names, data types, and sample values to recommend optimal matching configurations.",
8545
+ content: [
8546
+ {
8547
+ type: "endpoint",
8548
+ method: "POST",
8549
+ path: "/v1/matching/strategies/generate",
8550
+ summary: "AI auto-suggest field mappings and strategies.",
8551
+ description: "Requires write scope. Analyses the reference dataset columns against extracted document fields and suggests optimal source-target mappings with strategies and weights.",
8552
+ blocks: [
8553
+ {
8554
+ type: "param-table",
8555
+ title: "Body parameters",
8556
+ params: [
8557
+ { name: "reference_data_id", type: "string", required: true, description: "ID of the reference dataset to analyse." }
8558
+ ]
8559
+ },
8560
+ {
8561
+ type: "code",
8562
+ title: "Response",
8563
+ code: `{
8564
+ "suggestions": [
8565
+ { "source": "vendor_name", "target": "name", "strategy": "fuzzy", "weight": 0.4, "rationale": "High cardinality text field \u2014 fuzzy handles name variations." },
8566
+ { "source": "invoice_date", "target": "date", "strategy": "date_range", "weight": 0.3, "rationale": "Date field \u2014 range comparison tolerates minor discrepancies." },
8567
+ { "source": "total_amount", "target": "total", "strategy": "numeric_range", "weight": 0.3, "rationale": "Numeric field \u2014 range accounts for rounding differences." }
8568
+ ]
8569
+ }`
8570
+ }
8571
+ ]
8572
+ }
8573
+ ],
8574
+ related: [
8575
+ { label: "Create Config", slug: "create-matching-config" }
8576
+ ],
8577
+ faq: [],
8578
+ mentions: ["AI strategy", "auto-suggest", "field mapping"]
8579
+ }
8580
+ ];
8581
+
8582
+ // src/content/api/delivery.ts
8583
+ var sections36 = [
8584
+ {
8585
+ slug: "list-delivery-destinations",
8586
+ parentSlug: "delivery",
8587
+ title: "List Destinations",
8588
+ seoTitle: "List Delivery Destinations \u2014 Talonic Docs",
8589
+ description: "List all configured delivery destinations for the workspace. Destinations define where processed data is sent \u2014 webhook, SFTP, S3, Azure Blob, Google Drive, or OneDrive.",
8590
+ content: [
8591
+ { type: "paragraph", text: "Delivery routes processed data to external systems through a four-part pipeline: **signals** (domain events) are matched to **bindings** (routing rules), resolved into **deliverables** (payloads), serialized, and sent to **destinations** (connectors). Destinations define the transport protocol and credentials." },
8592
+ {
8593
+ type: "endpoint",
8594
+ method: "GET",
8595
+ path: "/v1/delivery/destinations",
8596
+ summary: "List all configured destinations.",
8597
+ description: "Requires read scope. Returns destinations with type and status. Auth credentials are redacted.",
8598
+ blocks: [
8599
+ {
8600
+ type: "code",
8601
+ title: "Response",
8602
+ code: `{
8603
+ "data": [
8604
+ {
8605
+ "id": "dst_k1l2m3n4",
8606
+ "name": "Production Webhook",
8607
+ "type": "webhook",
8608
+ "config": { "url": "https://api.example.com/ingest" },
8609
+ "status": "active",
8610
+ "created_at": "2024-09-01T10:00:00Z"
8611
+ },
8612
+ {
8613
+ "id": "dst_o5p6q7r8",
8614
+ "name": "Data Lake",
8615
+ "type": "s3",
8616
+ "config": { "bucket": "talonic-output", "prefix": "invoices/" },
8617
+ "status": "active",
8618
+ "created_at": "2024-09-05T14:30:00Z"
8619
+ }
8620
+ ]
8621
+ }`
8622
+ }
8623
+ ]
8624
+ }
8625
+ ],
8626
+ related: [
8627
+ { label: "Create Destination", slug: "create-delivery-destination" },
8628
+ { label: "List Bindings", slug: "list-delivery-bindings" }
8629
+ ],
8630
+ faq: [
8631
+ { question: "What destination types are supported?", answer: "Six connector types: webhook (HTTP POST with HMAC-SHA256 signing), sftp, s3, azure_blob, google_drive (OAuth), and onedrive (OAuth)." }
8632
+ ],
8633
+ mentions: ["delivery", "destinations", "connectors"]
8634
+ },
8635
+ {
8636
+ slug: "create-delivery-destination",
8637
+ parentSlug: "delivery",
8638
+ title: "Create Destination",
8639
+ seoTitle: "Create Delivery Destination \u2014 Talonic Docs",
8640
+ description: "Create a delivery destination with connector type, transport config, and authentication. Supported types: webhook, sftp, s3, azure_blob, google_drive, onedrive.",
8641
+ content: [
8642
+ {
8643
+ type: "endpoint",
8644
+ method: "POST",
8645
+ path: "/v1/delivery/destinations",
8646
+ summary: "Create a new delivery destination.",
8647
+ description: "Requires write scope. Config and auth_config schemas vary by destination type.",
8648
+ blocks: [
8649
+ {
8650
+ type: "param-table",
8651
+ title: "Body parameters",
8652
+ params: [
8653
+ { name: "name", type: "string", required: true, description: "Human-readable destination name." },
8654
+ { name: "type", type: "string", required: true, description: "Connector type: `webhook`, `sftp`, `s3`, `azure_blob`, `google_drive`, `onedrive`." },
8655
+ { name: "config", type: "object", required: true, description: "Transport-specific config (e.g. `url` for webhook, `bucket`/`prefix` for S3)." },
8656
+ { name: "auth_config", type: "object", description: "Authentication credentials. Schema varies by type (API key, OAuth tokens, access keys)." }
8657
+ ]
8658
+ },
8659
+ {
8660
+ type: "code",
8661
+ title: "Request body (webhook)",
8662
+ code: `{
8663
+ "name": "Production Webhook",
8664
+ "type": "webhook",
8665
+ "config": {
8666
+ "url": "https://api.example.com/ingest",
8667
+ "headers": { "X-Source": "talonic" }
8668
+ },
8669
+ "auth_config": {
8670
+ "signing_secret": "whsec_abc123..."
8671
+ }
8672
+ }`
8673
+ },
8674
+ {
8675
+ type: "code",
8676
+ title: "Response (201 Created)",
8677
+ code: `{
8678
+ "id": "dst_k1l2m3n4",
8679
+ "name": "Production Webhook",
8680
+ "type": "webhook",
8681
+ "config": { "url": "https://api.example.com/ingest" },
8682
+ "status": "active",
8683
+ "created_at": "2024-09-01T10:00:00Z"
8684
+ }`
8685
+ },
8686
+ { type: "callout", text: "Webhook destinations support HMAC-SHA256 request signing. Include a `signing_secret` in `auth_config` to enable signature verification on the receiving end." }
8687
+ ]
8688
+ }
8689
+ ],
8690
+ related: [
8691
+ { label: "List Destinations", slug: "list-delivery-destinations" },
8692
+ { label: "Test Destination", slug: "manage-delivery-destination" }
8693
+ ],
8694
+ faq: [],
8695
+ mentions: ["destination creation", "webhook", "HMAC"]
8696
+ },
8697
+ {
8698
+ slug: "manage-delivery-destination",
8699
+ parentSlug: "delivery",
8700
+ title: "Get / Update / Delete / Test",
8701
+ seoTitle: "Manage Delivery Destination \u2014 Talonic Docs",
8702
+ description: "Get destination details, update config, delete a destination, or send a test payload to verify connectivity. Auth credentials are always redacted in responses.",
8703
+ content: [
8704
+ {
8705
+ type: "endpoint",
8706
+ method: "GET",
8707
+ path: "/v1/delivery/destinations/:id",
8708
+ summary: "Get destination details.",
8709
+ blocks: []
8710
+ },
8711
+ {
8712
+ type: "endpoint",
8713
+ method: "PUT",
8714
+ path: "/v1/delivery/destinations/:id",
8715
+ summary: "Update destination config or credentials.",
8716
+ blocks: [
8717
+ {
8718
+ type: "param-table",
8719
+ title: "Body parameters",
8720
+ params: [
8721
+ { name: "name", type: "string", description: "Updated name." },
8722
+ { name: "config", type: "object", description: "Updated transport config." },
8723
+ { name: "auth_config", type: "object", description: "Updated credentials." }
8724
+ ]
8725
+ }
8726
+ ]
8727
+ },
8728
+ {
8729
+ type: "endpoint",
8730
+ method: "DELETE",
8731
+ path: "/v1/delivery/destinations/:id",
8732
+ summary: "Delete a destination. Active bindings referencing it will be deactivated.",
8733
+ blocks: []
8734
+ },
8735
+ {
8736
+ type: "endpoint",
8737
+ method: "POST",
8738
+ path: "/v1/delivery/destinations/:id/test",
8739
+ summary: "Send a test payload to verify connectivity.",
8740
+ description: "Sends a small synthetic payload through the transport layer and returns the result. Useful for verifying credentials and network reachability.",
8741
+ blocks: [
8742
+ {
8743
+ type: "code",
8744
+ title: "Response",
8745
+ code: `{
8746
+ "success": true,
8747
+ "status_code": 200,
8748
+ "latency_ms": 142
8749
+ }`
8750
+ }
8751
+ ]
8752
+ }
8753
+ ],
8754
+ related: [
8755
+ { label: "List Destinations", slug: "list-delivery-destinations" }
8756
+ ],
8757
+ faq: [],
8758
+ mentions: ["destination management", "test delivery"]
8759
+ },
8760
+ {
8761
+ slug: "list-delivery-bindings",
8762
+ parentSlug: "delivery",
8763
+ title: "List Bindings",
8764
+ seoTitle: "List Delivery Bindings \u2014 Talonic Docs",
8765
+ description: "List all delivery bindings that route signals to destinations. Each binding maps an event type to a deliverable resolver, serializer format, and destination.",
8766
+ content: [
8767
+ { type: "paragraph", text: "A binding connects the four parts of the delivery pipeline: a **signal filter** (which events to listen for), a **deliverable type** (what payload to build), a **serializer format** (how to encode it), and a **destination** (where to send it). The compatibility triangle is enforced on creation." },
8768
+ {
8769
+ type: "endpoint",
8770
+ method: "GET",
8771
+ path: "/v1/delivery/bindings",
8772
+ summary: "List all bindings.",
8773
+ description: "Requires read scope. Returns all delivery bindings with their signal filters, deliverable types, serializer formats, and destination references.",
8774
+ blocks: [
8775
+ {
8776
+ type: "code",
8777
+ title: "Response",
8778
+ code: `{
8779
+ "data": [
8780
+ {
8781
+ "id": "bnd_a1b2c3d4",
8782
+ "signal_filter": { "event_type": "document.extraction.completed" },
8783
+ "deliverable_type": "document_capture",
8784
+ "serializer_format": "json",
8785
+ "destination_id": "dst_k1l2m3n4",
8786
+ "field_map": { "vendor": "$.vendor_name", "total": "$.amount" },
8787
+ "delivery_policy": { "max_attempts": 5, "backoff_schedule": [1000, 5000, 30000, 120000, 600000] },
8788
+ "active": true,
8789
+ "created_at": "2024-09-10T09:00:00Z"
8790
+ }
8791
+ ]
8792
+ }`
8793
+ }
8794
+ ]
8795
+ }
8796
+ ],
8797
+ related: [
8798
+ { label: "Create Binding", slug: "create-delivery-binding" },
8799
+ { label: "Catalog", slug: "delivery-catalog" }
8800
+ ],
8801
+ faq: [
8802
+ { question: "What is the compatibility triangle?", answer: "When creating a binding, the system verifies that the signal event type, deliverable resolver, and serializer format are mutually compatible. For example, a CSV serializer cannot serialize a graph deliverable." }
8803
+ ],
8804
+ mentions: ["bindings", "signal filter", "compatibility triangle"]
8805
+ },
8806
+ {
8807
+ slug: "create-delivery-binding",
8808
+ parentSlug: "delivery",
8809
+ title: "Create Binding",
8810
+ seoTitle: "Create Delivery Binding \u2014 Talonic Docs",
8811
+ description: "Create a delivery binding that routes domain signals through a deliverable resolver and serializer to a destination. Includes field mapping and retry policy configuration.",
8812
+ content: [
8813
+ {
8814
+ type: "endpoint",
8815
+ method: "POST",
8816
+ path: "/v1/delivery/bindings",
8817
+ summary: "Create a new delivery binding.",
8818
+ description: "Requires write scope. The compatibility triangle is validated: event type, deliverable type, and serializer format must be mutually compatible.",
8819
+ blocks: [
8820
+ {
8821
+ type: "param-table",
8822
+ title: "Body parameters",
8823
+ params: [
8824
+ { name: "signal_filter", type: "object", required: true, description: "Event filter. Must include `event_type` (e.g. `document.extraction.completed`)." },
8825
+ { name: "deliverable_type", type: "string", required: true, description: "Payload resolver: `notification`, `document_capture`, `document_markdown`, `document_meta`, `run_outcomes`, `approved_record`." },
8826
+ { name: "serializer_format", type: "string", required: true, description: "Output format: `json`, `ndjson`, `csv`, `xlsx`, `rows`, `graph`, `raw`." },
8827
+ { name: "destination_id", type: "string", required: true, description: "Target destination ID." },
8828
+ { name: "field_map", type: "object", description: "JSONPath field projection map. Keys are output field names, values are JSONPath expressions." },
8829
+ { name: "delivery_policy", type: "object", description: "Retry policy with `max_attempts` (default 5) and `backoff_schedule` (array of ms delays)." }
8830
+ ]
8831
+ },
8832
+ {
8833
+ type: "code",
8834
+ title: "Request body",
8835
+ code: `{
8836
+ "signal_filter": { "event_type": "document.extraction.completed" },
8837
+ "deliverable_type": "document_capture",
8838
+ "serializer_format": "json",
8839
+ "destination_id": "dst_k1l2m3n4",
8840
+ "field_map": { "vendor": "$.vendor_name", "total": "$.amount" },
8841
+ "delivery_policy": { "max_attempts": 5, "backoff_schedule": [1000, 5000, 30000] }
8842
+ }`
8843
+ },
8844
+ {
8845
+ type: "code",
8846
+ title: "Response (201 Created)",
8847
+ code: `{
8848
+ "id": "bnd_e5f6g7h8",
8849
+ "signal_filter": { "event_type": "document.extraction.completed" },
8850
+ "deliverable_type": "document_capture",
8851
+ "serializer_format": "json",
8852
+ "destination_id": "dst_k1l2m3n4",
8853
+ "active": true,
8854
+ "created_at": "2024-09-10T09:00:00Z"
8855
+ }`
8856
+ }
8857
+ ]
8858
+ }
8859
+ ],
8860
+ related: [
8861
+ { label: "List Bindings", slug: "list-delivery-bindings" },
8862
+ { label: "Catalog", slug: "delivery-catalog" }
8863
+ ],
8864
+ faq: [],
8865
+ mentions: ["binding creation", "field map", "delivery policy"]
8866
+ },
8867
+ {
8868
+ slug: "manage-delivery-binding",
8869
+ parentSlug: "delivery",
8870
+ title: "Get / Update / Delete / Preview",
8871
+ seoTitle: "Manage Delivery Binding \u2014 Talonic Docs",
8872
+ description: "Get binding details, update signal filters or field maps, delete a binding, or preview the resolved payload for a binding without sending it.",
8873
+ content: [
8874
+ {
8875
+ type: "endpoint",
8876
+ method: "GET",
8877
+ path: "/v1/delivery/bindings/:id",
8878
+ summary: "Get binding details.",
8879
+ blocks: []
8880
+ },
8881
+ {
8882
+ type: "endpoint",
8883
+ method: "PUT",
8884
+ path: "/v1/delivery/bindings/:id",
8885
+ summary: "Update binding configuration.",
8886
+ blocks: [
8887
+ {
8888
+ type: "param-table",
8889
+ title: "Body parameters",
8890
+ params: [
8891
+ { name: "signal_filter", type: "object", description: "Updated event filter." },
8892
+ { name: "field_map", type: "object", description: "Updated field projection." },
8893
+ { name: "delivery_policy", type: "object", description: "Updated retry policy." },
8894
+ { name: "active", type: "boolean", description: "Enable or disable the binding." }
8895
+ ]
8896
+ }
8897
+ ]
8898
+ },
8899
+ {
8900
+ type: "endpoint",
8901
+ method: "DELETE",
8902
+ path: "/v1/delivery/bindings/:id",
8903
+ summary: "Delete a binding. In-flight deliveries complete but no new events are routed.",
8904
+ blocks: []
8905
+ },
8906
+ {
8907
+ type: "endpoint",
8908
+ method: "POST",
8909
+ path: "/v1/delivery/bindings/:id/preview",
8910
+ summary: "Preview the resolved and serialized payload without delivering.",
8911
+ description: "Generates a sample payload using the most recent matching signal and returns the resolved, field-mapped, serialized output.",
8912
+ blocks: [
8913
+ {
8914
+ type: "code",
8915
+ title: "Response",
8916
+ code: `{
8917
+ "preview": {
8918
+ "vendor": "Acme Corporation",
8919
+ "total": 4950.00
8920
+ },
8921
+ "serializer_format": "json",
8922
+ "size_bytes": 52
8923
+ }`
8924
+ }
8925
+ ]
8926
+ }
8927
+ ],
8928
+ related: [
8929
+ { label: "List Bindings", slug: "list-delivery-bindings" }
8930
+ ],
8931
+ faq: [],
8932
+ mentions: ["binding management", "preview"]
8933
+ },
8934
+ {
8935
+ slug: "delivery-history",
8936
+ parentSlug: "delivery",
8937
+ title: "Delivery History",
8938
+ seoTitle: "Delivery History \u2014 Talonic Docs",
8939
+ description: "View delivery attempt history with status, HTTP codes, and timing. Get detail for a single item or replay a failed delivery attempt.",
8940
+ content: [
8941
+ {
8942
+ type: "endpoint",
8943
+ method: "GET",
8944
+ path: "/v1/delivery/items",
8945
+ summary: "List delivery attempts.",
8946
+ description: "Requires read scope. Returns delivery items with status, HTTP status code, and timing information.",
8947
+ blocks: [
8948
+ {
8949
+ type: "param-table",
8950
+ title: "Query parameters",
8951
+ params: [
8952
+ { name: "binding_id", type: "string", description: "Filter by binding ID." },
8953
+ { name: "status", type: "string", description: "Filter by status: `pending`, `success`, `failed`, `dead_letter`." },
8954
+ { name: "page", type: "integer", default: "1", description: "Page number." },
8955
+ { name: "per_page", type: "integer", default: "50", description: "Results per page." }
8956
+ ]
8957
+ },
8958
+ {
8959
+ type: "code",
8960
+ title: "Response",
8961
+ code: `{
8962
+ "data": [
8963
+ {
8964
+ "id": "di_x1y2z3",
8965
+ "binding_id": "bnd_a1b2c3d4",
8966
+ "event_id": "evt_m7n8o9",
8967
+ "status": "success",
8968
+ "http_status": 200,
8969
+ "attempt": 1,
8970
+ "latency_ms": 234,
8971
+ "delivered_at": "2024-09-15T11:00:00Z"
8972
+ }
8973
+ ],
8974
+ "pagination": { "page": 1, "per_page": 50, "total": 1280 }
8975
+ }`
8976
+ }
8977
+ ]
8978
+ },
8979
+ {
8980
+ type: "endpoint",
8981
+ method: "GET",
8982
+ path: "/v1/delivery/items/:id",
8983
+ summary: "Get delivery item detail including request and response bodies.",
8984
+ blocks: [
8985
+ {
8986
+ type: "code",
8987
+ title: "Response",
8988
+ code: `{
8989
+ "id": "di_x1y2z3",
8990
+ "binding_id": "bnd_a1b2c3d4",
8991
+ "status": "success",
8992
+ "http_status": 200,
8993
+ "attempt": 1,
8994
+ "request_body": "{ ... }",
8995
+ "response_body": "{ "ok": true }",
8996
+ "latency_ms": 234,
8997
+ "delivered_at": "2024-09-15T11:00:00Z"
8998
+ }`
8999
+ }
9000
+ ]
9001
+ },
9002
+ {
9003
+ type: "endpoint",
9004
+ method: "POST",
9005
+ path: "/v1/delivery/items/:id/replay",
9006
+ summary: "Replay a delivery attempt. Enqueues a fresh attempt with the original payload.",
9007
+ blocks: [
9008
+ {
9009
+ type: "code",
9010
+ title: "Response (202 Accepted)",
9011
+ code: `{
9012
+ "replay_item_id": "di_a4b5c6",
9013
+ "status": "pending"
9014
+ }`
9015
+ }
9016
+ ]
9017
+ }
9018
+ ],
9019
+ related: [
9020
+ { label: "Dead Letter Queue", slug: "delivery-dlq" },
9021
+ { label: "List Bindings", slug: "list-delivery-bindings" }
9022
+ ],
9023
+ faq: [],
9024
+ mentions: ["delivery history", "replay", "attempt log"]
9025
+ },
9026
+ {
9027
+ slug: "delivery-dlq",
9028
+ parentSlug: "delivery",
9029
+ title: "Dead Letter Queue",
9030
+ seoTitle: "Delivery Dead Letter Queue \u2014 Talonic Docs",
9031
+ description: "Inspect and manage permanently failed deliveries in the dead letter queue. Replay individual items or discard them.",
9032
+ content: [
9033
+ { type: "paragraph", text: "Deliveries that exhaust all retry attempts are moved to the dead letter queue (DLQ). Items in the DLQ can be inspected, replayed (enqueues a fresh attempt), or deleted." },
9034
+ {
9035
+ type: "endpoint",
9036
+ method: "GET",
9037
+ path: "/v1/delivery/dlq",
9038
+ summary: "List dead-letter items.",
9039
+ description: "Requires read scope. Returns delivery attempts that exhausted all retries.",
9040
+ blocks: [
9041
+ {
9042
+ type: "param-table",
9043
+ title: "Query parameters",
9044
+ params: [
9045
+ { name: "binding_id", type: "string", description: "Filter by binding ID." },
9046
+ { name: "page", type: "integer", default: "1", description: "Page number." },
9047
+ { name: "per_page", type: "integer", default: "50", description: "Results per page." }
9048
+ ]
9049
+ },
9050
+ {
9051
+ type: "code",
9052
+ title: "Response",
9053
+ code: `{
9054
+ "data": [
9055
+ {
9056
+ "id": "dlq_f1g2h3",
9057
+ "binding_id": "bnd_a1b2c3d4",
9058
+ "event_id": "evt_j4k5l6",
9059
+ "error_code": "ECONNREFUSED",
9060
+ "last_attempt_at": "2024-09-16T03:00:00Z",
9061
+ "attempts_exhausted": 5
9062
+ }
9063
+ ],
9064
+ "pagination": { "page": 1, "per_page": 50, "total": 3 }
9065
+ }`
9066
+ }
9067
+ ]
9068
+ },
9069
+ {
9070
+ type: "endpoint",
9071
+ method: "POST",
9072
+ path: "/v1/delivery/dlq/:id/replay",
9073
+ summary: "Replay a dead-letter item. Enqueues a fresh delivery attempt.",
9074
+ blocks: [
9075
+ {
9076
+ type: "code",
9077
+ title: "Response (202 Accepted)",
9078
+ code: `{
9079
+ "replay_item_id": "di_p7q8r9",
9080
+ "status": "pending"
9081
+ }`
9082
+ }
9083
+ ]
9084
+ },
9085
+ {
9086
+ type: "endpoint",
9087
+ method: "DELETE",
9088
+ path: "/v1/delivery/dlq/:id",
9089
+ summary: "Discard a dead-letter item permanently.",
9090
+ blocks: []
9091
+ }
9092
+ ],
9093
+ related: [
9094
+ { label: "Delivery History", slug: "delivery-history" },
9095
+ { label: "List Destinations", slug: "list-delivery-destinations" }
9096
+ ],
9097
+ faq: [
9098
+ { question: "When does a delivery end up in the DLQ?", answer: "A delivery enters the dead letter queue after exhausting all retry attempts defined in the binding delivery_policy (default 5 attempts with exponential backoff)." }
9099
+ ],
9100
+ mentions: ["dead letter queue", "DLQ", "failed delivery"]
9101
+ },
9102
+ {
9103
+ slug: "delivery-catalog",
9104
+ parentSlug: "delivery",
9105
+ title: "Catalog",
9106
+ seoTitle: "Delivery Catalog \u2014 Talonic Docs",
9107
+ description: "Discover available signals, deliverable types, serializer formats, and connector types from the delivery registry. Use the catalog to build valid bindings.",
9108
+ content: [
9109
+ { type: "paragraph", text: "The catalog endpoints expose the four delivery registries. Use them to discover which event types, deliverable resolvers, serializer formats, and connectors are available before creating bindings." },
9110
+ {
9111
+ type: "endpoint",
9112
+ method: "GET",
9113
+ path: "/v1/delivery/catalog/signals",
9114
+ summary: "List available signal event types.",
9115
+ blocks: [
9116
+ {
9117
+ type: "code",
9118
+ title: "Response",
9119
+ code: `{
9120
+ "signals": [
9121
+ { "event_type": "document.extraction.completed", "description": "Fired when document extraction finishes." },
9122
+ { "event_type": "run.completed", "description": "Fired when a structuring run completes." },
9123
+ { "event_type": "record.approved", "description": "Fired when a record passes review." }
9124
+ ]
9125
+ }`
9126
+ }
9127
+ ]
9128
+ },
9129
+ {
9130
+ type: "endpoint",
9131
+ method: "GET",
9132
+ path: "/v1/delivery/catalog/deliverables",
9133
+ summary: "List available deliverable types and their compatible signals.",
9134
+ blocks: [
9135
+ {
9136
+ type: "code",
9137
+ title: "Response",
9138
+ code: `{
9139
+ "deliverables": [
9140
+ { "type": "document_capture", "compatible_signals": ["document.extraction.completed"], "shape": "record" },
9141
+ { "type": "run_outcomes", "compatible_signals": ["run.completed"], "shape": "table" }
9142
+ ]
9143
+ }`
9144
+ }
9145
+ ]
9146
+ },
9147
+ {
9148
+ type: "endpoint",
9149
+ method: "GET",
9150
+ path: "/v1/delivery/catalog/serializers",
9151
+ summary: "List available serializer formats and supported shapes.",
9152
+ blocks: [
9153
+ {
9154
+ type: "code",
9155
+ title: "Response",
9156
+ code: `{
9157
+ "serializers": [
9158
+ { "format": "json", "supported_shapes": ["record", "table", "graph"] },
9159
+ { "format": "csv", "supported_shapes": ["table"] },
9160
+ { "format": "xlsx", "supported_shapes": ["table"] }
9161
+ ]
9162
+ }`
9163
+ }
9164
+ ]
9165
+ },
9166
+ {
9167
+ type: "endpoint",
9168
+ method: "GET",
9169
+ path: "/v1/delivery/catalog/connectors",
9170
+ summary: "List available connector types and their capabilities.",
9171
+ blocks: [
9172
+ {
9173
+ type: "code",
9174
+ title: "Response",
9175
+ code: `{
9176
+ "connectors": [
9177
+ { "type": "webhook", "supported_serializers": ["json", "ndjson", "raw"], "requires_oauth": false },
9178
+ { "type": "s3", "supported_serializers": ["json", "csv", "xlsx", "ndjson"], "requires_oauth": false },
9179
+ { "type": "google_drive", "supported_serializers": ["json", "csv", "xlsx"], "requires_oauth": true }
9180
+ ]
9181
+ }`
9182
+ }
9183
+ ]
9184
+ }
9185
+ ],
9186
+ related: [
9187
+ { label: "Create Binding", slug: "create-delivery-binding" },
9188
+ { label: "List Destinations", slug: "list-delivery-destinations" }
9189
+ ],
9190
+ faq: [
9191
+ { question: "How do I know which combinations are valid for a binding?", answer: "Use the catalog endpoints to check compatibility. A valid binding requires: the signal event_type exists, the deliverable type lists that signal in compatible_signals, the serializer supports the deliverable shape, and the connector supports the serializer format." }
9192
+ ],
9193
+ mentions: ["delivery catalog", "registry discovery"]
9194
+ }
9195
+ ];
9196
+
9197
+ // src/content/api/batches.ts
9198
+ var sections37 = [
9199
+ {
9200
+ slug: "list-batches",
9201
+ parentSlug: "batches",
9202
+ title: "List Batches",
9203
+ seoTitle: "List Extraction Batches \u2014 Talonic Docs",
9204
+ description: "List all extraction batches with status, item counts, and provider information. Batches group documents submitted for deferred extraction at 50% cost.",
9205
+ content: [
9206
+ { type: "paragraph", text: "Batch inference defers Claude extraction to the provider batch API at **50% cost**. Documents uploaded with `processing_mode=batch` run OCR and classification immediately but queue extraction. Batches accumulate items, submit to the provider on a timer or threshold, and poll for results." },
9207
+ {
9208
+ type: "endpoint",
9209
+ method: "GET",
9210
+ path: "/v1/batches",
9211
+ summary: "List all extraction batches.",
9212
+ description: "Requires read scope. Returns batches ordered by creation date descending.",
9213
+ blocks: [
9214
+ {
9215
+ type: "param-table",
9216
+ title: "Query parameters",
9217
+ params: [
9218
+ { name: "status", type: "string", description: "Filter by status: `accumulating`, `submitted`, `completed`, `failed`, `cancelled`." },
9219
+ { name: "page", type: "integer", default: "1", description: "Page number." },
9220
+ { name: "per_page", type: "integer", default: "50", description: "Results per page." }
9221
+ ]
9222
+ },
9223
+ {
9224
+ type: "code",
9225
+ title: "Response",
9226
+ code: `{
9227
+ "data": [
9228
+ {
9229
+ "id": "batch_r1s2t3u4",
9230
+ "status": "completed",
9231
+ "item_count": 142,
9232
+ "completed_count": 142,
9233
+ "failed_count": 0,
9234
+ "provider": "anthropic",
9235
+ "submitted_at": "2024-10-01T06:00:00Z",
9236
+ "completed_at": "2024-10-01T14:23:00Z",
9237
+ "created_at": "2024-10-01T05:45:00Z"
9238
+ },
9239
+ {
9240
+ "id": "batch_v5w6x7y8",
9241
+ "status": "accumulating",
9242
+ "item_count": 37,
9243
+ "completed_count": 0,
9244
+ "failed_count": 0,
9245
+ "provider": "anthropic",
9246
+ "submitted_at": null,
9247
+ "completed_at": null,
9248
+ "created_at": "2024-10-02T08:10:00Z"
9249
+ }
9250
+ ],
9251
+ "pagination": { "page": 1, "per_page": 50, "total": 12 }
9252
+ }`
9253
+ }
9254
+ ]
9255
+ }
9256
+ ],
9257
+ related: [
9258
+ { label: "Batch Detail", slug: "get-batch" },
9259
+ { label: "Sync Batch", slug: "sync-batch" }
9260
+ ],
9261
+ faq: [
9262
+ { question: "What are the batch statuses?", answer: "Batches progress through: accumulating (collecting items), submitted (sent to provider), completed (all results received), failed (provider error), or cancelled (manually cancelled)." },
9263
+ { question: "How much does batch processing cost?", answer: "Batch processing runs at 50% of the standard extraction cost. Results are delivered within 48 hours." }
9264
+ ],
9265
+ mentions: ["batch inference", "extraction batches", "cost reduction"]
9266
+ },
9267
+ {
9268
+ slug: "get-batch",
9269
+ parentSlug: "batches",
9270
+ title: "Batch Detail",
9271
+ seoTitle: "Get Batch Detail \u2014 Talonic Docs",
9272
+ description: "Get detailed information for a single extraction batch including item counts, provider, status, and timing. Shows per-item breakdown when the batch is completed.",
9273
+ content: [
9274
+ {
9275
+ type: "endpoint",
9276
+ method: "GET",
9277
+ path: "/v1/batches/:id",
9278
+ summary: "Get batch detail with item counts and provider info.",
9279
+ description: "Requires read scope. Returns the full batch record including provider metadata and timing.",
9280
+ blocks: [
9281
+ {
9282
+ type: "code",
9283
+ title: "Response",
9284
+ code: `{
9285
+ "id": "batch_r1s2t3u4",
9286
+ "status": "completed",
9287
+ "item_count": 142,
9288
+ "completed_count": 142,
9289
+ "failed_count": 0,
9290
+ "provider": "anthropic",
9291
+ "provider_batch_id": "msgbatch_abc123",
9292
+ "submitted_at": "2024-10-01T06:00:00Z",
9293
+ "completed_at": "2024-10-01T14:23:00Z",
9294
+ "created_at": "2024-10-01T05:45:00Z"
9295
+ }`
9296
+ }
9297
+ ]
9298
+ }
9299
+ ],
9300
+ related: [
9301
+ { label: "List Batches", slug: "list-batches" },
9302
+ { label: "Sync Batch", slug: "sync-batch" }
9303
+ ],
9304
+ faq: [],
9305
+ mentions: ["batch detail", "provider metadata"]
9306
+ },
9307
+ {
9308
+ slug: "sync-batch",
9309
+ parentSlug: "batches",
9310
+ title: "Sync Batch",
9311
+ seoTitle: "Sync Batch with Provider \u2014 Talonic Docs",
9312
+ description: "Force a sync with the provider to check for batch results. Useful when you do not want to wait for the hourly automatic poll.",
9313
+ content: [
9314
+ {
9315
+ type: "endpoint",
9316
+ method: "POST",
9317
+ path: "/v1/batches/:id/sync",
9318
+ summary: "Force sync with the provider to check for results.",
9319
+ description: "Requires write scope. Immediately polls the provider for batch status and results. Only valid for batches in `submitted` status. Returns 202.",
9320
+ blocks: [
9321
+ { type: "callout", text: "Batches are polled automatically every hour. Use this endpoint only when you need results sooner." },
9322
+ {
9323
+ type: "code",
9324
+ title: "Response (202 Accepted)",
9325
+ code: `{
9326
+ "id": "batch_r1s2t3u4",
9327
+ "status": "submitted",
9328
+ "sync_requested": true,
9329
+ "message": "Sync with provider initiated."
9330
+ }`
9331
+ }
9332
+ ]
9333
+ }
9334
+ ],
9335
+ related: [
9336
+ { label: "Batch Detail", slug: "get-batch" },
9337
+ { label: "Cancel Batch", slug: "cancel-batch" }
9338
+ ],
9339
+ faq: [
9340
+ { question: "How often are batches polled automatically?", answer: "The system polls the provider every hour for results. Use the sync endpoint to trigger an immediate check." }
9341
+ ],
9342
+ mentions: ["batch sync", "provider poll"]
9343
+ },
9344
+ {
9345
+ slug: "cancel-batch",
9346
+ parentSlug: "batches",
9347
+ title: "Cancel Batch",
9348
+ seoTitle: "Cancel Extraction Batch \u2014 Talonic Docs",
9349
+ description: "Cancel an in-progress extraction batch. Only batches in accumulating or submitted status can be cancelled. Completed batches cannot be rolled back.",
9350
+ content: [
9351
+ {
9352
+ type: "endpoint",
9353
+ method: "POST",
9354
+ path: "/v1/batches/:id/cancel",
9355
+ summary: "Cancel a batch.",
9356
+ description: "Requires write scope. Cancels the batch and notifies the provider if already submitted. Documents in the batch revert to `batch_queued` status and can be reprocessed.",
9357
+ blocks: [
9358
+ {
9359
+ type: "code",
9360
+ title: "Response",
9361
+ code: `{
9362
+ "id": "batch_r1s2t3u4",
9363
+ "status": "cancelled",
9364
+ "cancelled_at": "2024-10-02T09:15:00Z"
9365
+ }`
9366
+ },
9367
+ { type: "callout", variant: "warning", text: "Cancelling a submitted batch sends a cancellation request to the provider. Items already processed by the provider may still have their results applied." }
9368
+ ]
9369
+ }
9370
+ ],
9371
+ related: [
9372
+ { label: "List Batches", slug: "list-batches" },
9373
+ { label: "Batch Detail", slug: "get-batch" }
9374
+ ],
9375
+ faq: [],
9376
+ mentions: ["batch cancellation"]
9377
+ }
9378
+ ];
9379
+
9380
+ // src/content/api/cases.ts
9381
+ var sections38 = [
9382
+ {
9383
+ slug: "list-cases",
9384
+ parentSlug: "cases",
9385
+ title: "List Cases",
9386
+ seoTitle: "List Cases Endpoint \u2014 Talonic Docs",
9387
+ description: "List cases with optional status and search filters. Supports pagination for large result sets. Cases group related documents via shared entities.",
9388
+ content: [
9389
+ { type: "paragraph", text: "Cases group documents that share entities discovered through linking. Use filters to narrow results by status or search term." },
9390
+ {
9391
+ type: "endpoint",
9392
+ method: "GET",
9393
+ path: "/v1/cases",
9394
+ summary: "List cases with optional filtering and pagination.",
9395
+ blocks: [
9396
+ {
9397
+ type: "param-table",
9398
+ title: "Query parameters",
9399
+ params: [
9400
+ { name: "status", type: "string", description: "Filter by case status (e.g. `open`, `closed`, `flagged`)." },
9401
+ { name: "search", type: "string", description: "Search cases by label or document content." },
9402
+ { name: "page", type: "number", description: "Page number for pagination.", default: "1" },
9403
+ { name: "limit", type: "number", description: "Results per page.", default: "20" }
9404
+ ]
9405
+ },
9406
+ {
9407
+ type: "code",
9408
+ title: "Response",
9409
+ code: `{
9410
+ "data": [
9411
+ {
9412
+ "key": "CASE-001",
9413
+ "label": "Acme Corp Q4 Invoices",
9414
+ "status": "open",
9415
+ "document_count": 5,
9416
+ "anomaly_count": 2,
9417
+ "created_at": "2024-10-01T08:30:00Z",
9418
+ "updated_at": "2024-10-15T14:20:00Z"
9419
+ }
9420
+ ],
9421
+ "total": 42,
9422
+ "page": 1,
9423
+ "limit": 20
9424
+ }`
9425
+ }
9426
+ ]
9427
+ }
9428
+ ],
9429
+ related: [
9430
+ { label: "Get Case", slug: "get-case" },
9431
+ { label: "Case Anomalies", slug: "case-anomalies" }
9432
+ ],
9433
+ faq: [
9434
+ { question: "How are cases created?", answer: "Cases are created automatically when the linking engine discovers shared entities across two or more documents." }
9435
+ ],
9436
+ mentions: ["cases", "linking", "documents"]
9437
+ },
9438
+ {
9439
+ slug: "get-case",
9440
+ parentSlug: "cases",
9441
+ title: "Get Case",
9442
+ seoTitle: "Get Case Endpoint \u2014 Talonic Docs",
9443
+ description: "Retrieve a case by its key (e.g. CASE-001) including linked documents, shared entities, AI-generated narration, label, and anomaly count.",
9444
+ content: [
9445
+ {
9446
+ type: "endpoint",
9447
+ method: "GET",
9448
+ path: "/v1/cases/:key",
9449
+ summary: "Get a case by key, including documents, shared entities, narration, and anomaly count.",
9450
+ blocks: [
9451
+ {
9452
+ type: "param-table",
9453
+ title: "Path parameters",
9454
+ params: [
9455
+ { name: "key", type: "string", required: true, description: "Case key, e.g. `CASE-001`." }
9456
+ ]
9457
+ },
9458
+ {
9459
+ type: "code",
9460
+ title: "Response",
9461
+ code: `{
9462
+ "key": "CASE-001",
9463
+ "label": "Acme Corp Q4 Invoices",
9464
+ "status": "open",
9465
+ "narration": "Five invoices from Acme Corp share a vendor ID and billing address...",
9466
+ "anomaly_count": 2,
9467
+ "documents": [
9468
+ { "id": "doc_abc123", "name": "invoice_oct.pdf", "pinned": true }
9469
+ ],
9470
+ "shared_entities": [
9471
+ { "field": "vendor_id", "value": "ACME-001", "document_count": 5 }
9472
+ ],
9473
+ "created_at": "2024-10-01T08:30:00Z",
9474
+ "updated_at": "2024-10-15T14:20:00Z"
9475
+ }`
9476
+ }
9477
+ ]
9478
+ }
9479
+ ],
9480
+ related: [
9481
+ { label: "List Cases", slug: "list-cases" },
9482
+ { label: "Case Operations", slug: "case-operations" },
9483
+ { label: "Case Evidence", slug: "case-evidence" }
9484
+ ],
9485
+ faq: [],
9486
+ mentions: ["case detail", "narration", "shared entities"]
9487
+ },
9488
+ {
9489
+ slug: "case-anomalies",
9490
+ parentSlug: "cases",
9491
+ title: "Case Anomalies",
9492
+ seoTitle: "Case Anomalies Endpoint \u2014 Talonic Docs",
9493
+ description: "List anomalies detected within a case with severity filtering and dismissed toggle. Dismiss individual anomalies after review.",
9494
+ content: [
9495
+ { type: "paragraph", text: "Anomalies are structural issues detected across the documents in a case \u2014 field conflicts, duplicate key divergence, value reuse patterns, and more." },
9496
+ {
9497
+ type: "endpoint",
9498
+ method: "GET",
9499
+ path: "/v1/cases/:key/anomalies",
9500
+ summary: "List anomalies for a case.",
9501
+ blocks: [
9502
+ {
9503
+ type: "param-table",
9504
+ title: "Query parameters",
9505
+ params: [
9506
+ { name: "severity", type: "string", description: "Filter by severity (`low`, `medium`, `high`, `critical`)." },
9507
+ { name: "include_dismissed", type: "boolean", description: "Include dismissed anomalies in results.", default: "false" }
9508
+ ]
9509
+ },
9510
+ {
9511
+ type: "code",
9512
+ title: "Response",
9513
+ code: `{
9514
+ "data": [
9515
+ {
9516
+ "id": "anom_x1y2z3",
9517
+ "type": "field_conflict",
9518
+ "severity": "high",
9519
+ "description": "Conflicting vendor_name across 3 documents",
9520
+ "dismissed": false,
9521
+ "created_at": "2024-10-02T10:00:00Z"
9522
+ }
9523
+ ]
9524
+ }`
9525
+ }
9526
+ ]
9527
+ },
9528
+ {
9529
+ type: "endpoint",
9530
+ method: "PATCH",
9531
+ path: "/v1/cases/:key/anomalies/:id/dismiss",
9532
+ summary: "Dismiss an anomaly after review.",
9533
+ blocks: [
9534
+ {
9535
+ type: "code",
9536
+ title: "Response",
9537
+ code: `{ "dismissed": true }`
9538
+ }
9539
+ ]
9540
+ }
9541
+ ],
9542
+ related: [
9543
+ { label: "Get Case", slug: "get-case" },
9544
+ { label: "Case Evidence", slug: "case-evidence" }
9545
+ ],
9546
+ faq: [
9547
+ { question: "What types of anomalies are detected?", answer: "Five structural detectors: validation cluster, field conflict, duplicate key divergence, missing document type, and value reuse." }
9548
+ ],
9549
+ mentions: ["anomalies", "severity", "dismiss"]
9550
+ },
9551
+ {
9552
+ slug: "case-evidence",
9553
+ parentSlug: "cases",
9554
+ title: "Case Evidence",
9555
+ seoTitle: "Case Evidence Endpoint \u2014 Talonic Docs",
9556
+ description: "List evidence items within a case. Filter by validation status, source document, category, or free-text search across evidence fields.",
9557
+ content: [
9558
+ {
9559
+ type: "endpoint",
9560
+ method: "GET",
9561
+ path: "/v1/cases/:key/evidence",
9562
+ summary: "List evidence for a case with filtering.",
9563
+ blocks: [
9564
+ {
9565
+ type: "param-table",
9566
+ title: "Query parameters",
9567
+ params: [
9568
+ { name: "status", type: "string", description: "Filter by validation status (`valid`, `invalid`, `pending`)." },
9569
+ { name: "document_id", type: "string", description: "Filter evidence from a specific document." },
9570
+ { name: "category", type: "string", description: "Filter by evidence category." },
9571
+ { name: "search", type: "string", description: "Free-text search across evidence fields." }
9572
+ ]
9573
+ },
9574
+ {
9575
+ type: "code",
9576
+ title: "Response",
9577
+ code: `{
9578
+ "data": [
9579
+ {
9580
+ "id": "ev_abc123",
9581
+ "field_key": "vendor_name",
9582
+ "value": "Acme Corp",
9583
+ "status": "valid",
9584
+ "document_id": "doc_abc123",
9585
+ "category": "identity",
9586
+ "confidence": 0.95
9587
+ }
9588
+ ]
9589
+ }`
9590
+ }
9591
+ ]
9592
+ }
9593
+ ],
9594
+ related: [
9595
+ { label: "Get Case", slug: "get-case" },
9596
+ { label: "Case Anomalies", slug: "case-anomalies" }
9597
+ ],
9598
+ faq: [],
9599
+ mentions: ["evidence", "validation", "case evidence"]
9600
+ },
9601
+ {
9602
+ slug: "case-operations",
9603
+ parentSlug: "cases",
9604
+ title: "Case Operations",
9605
+ seoTitle: "Case Operations Endpoints \u2014 Talonic Docs",
9606
+ description: "Trigger AI narration, generate a label, or update the status of a case. These operations modify case metadata and trigger background processing.",
9607
+ content: [
9608
+ { type: "paragraph", text: "Operations that modify a case: generate an AI narration summarizing the case, auto-generate a label, or update the case status." },
9609
+ {
9610
+ type: "endpoint",
9611
+ method: "POST",
9612
+ path: "/v1/cases/:key/narrate",
9613
+ summary: "Generate an AI narration summarizing the case.",
9614
+ blocks: [
9615
+ {
9616
+ type: "code",
9617
+ title: "Response",
9618
+ code: `{
9619
+ "narration": "Five invoices from Acme Corp spanning Q4 2024 share a common vendor ID and billing address. Total value is $72,450 with two anomalies flagged for review."
9620
+ }`
9621
+ }
9622
+ ]
9623
+ },
9624
+ {
9625
+ type: "endpoint",
9626
+ method: "POST",
9627
+ path: "/v1/cases/:key/label",
9628
+ summary: "Generate an AI label for the case.",
9629
+ blocks: [
9630
+ {
9631
+ type: "code",
9632
+ title: "Response",
9633
+ code: `{ "label": "Acme Corp Q4 Invoices" }`
9634
+ }
9635
+ ]
9636
+ },
9637
+ {
9638
+ type: "endpoint",
9639
+ method: "PATCH",
9640
+ path: "/v1/cases/:key/status",
9641
+ summary: "Update the case status.",
9642
+ blocks: [
9643
+ {
9644
+ type: "param-table",
9645
+ title: "Body parameters",
9646
+ params: [
9647
+ { name: "status", type: "string", required: true, description: "New status for the case (e.g. `open`, `closed`, `flagged`)." }
9648
+ ]
9649
+ },
9650
+ {
9651
+ type: "code",
9652
+ title: "Response",
9653
+ code: `{ "key": "CASE-001", "status": "closed" }`
9654
+ }
9655
+ ]
9656
+ }
9657
+ ],
9658
+ related: [
9659
+ { label: "Get Case", slug: "get-case" },
9660
+ { label: "Case Merge & Split", slug: "case-merge-split" }
9661
+ ],
9662
+ faq: [
9663
+ { question: "Does narration happen synchronously?", answer: "Yes. The endpoint blocks until the AI narration is generated and returns the text directly." }
9664
+ ],
9665
+ mentions: ["narrate", "label", "status", "case operations"]
9666
+ },
9667
+ {
9668
+ slug: "case-edges",
9669
+ parentSlug: "cases",
9670
+ title: "Case Edges",
9671
+ seoTitle: "Case Edges Endpoints \u2014 Talonic Docs",
9672
+ description: "List, confirm, or reject linking edges within a case. Edges represent shared-value connections between documents in the linking graph.",
9673
+ content: [
9674
+ { type: "paragraph", text: "Edges are the connections between documents in a case, created by the linking engine when documents share field values. Confirm or reject edges to refine case membership." },
9675
+ {
9676
+ type: "endpoint",
9677
+ method: "GET",
9678
+ path: "/v1/cases/:key/edges",
9679
+ summary: "List linking edges in a case.",
9680
+ blocks: [
9681
+ {
9682
+ type: "code",
9683
+ title: "Response",
9684
+ code: `{
9685
+ "data": [
9686
+ {
9687
+ "id": "edge_abc123",
9688
+ "source_document_id": "doc_001",
9689
+ "target_document_id": "doc_002",
9690
+ "shared_field": "vendor_id",
9691
+ "shared_value": "ACME-001",
9692
+ "status": "pending",
9693
+ "confidence": 0.92
9694
+ }
9695
+ ]
9696
+ }`
9697
+ }
9698
+ ]
9699
+ },
9700
+ {
9701
+ type: "endpoint",
9702
+ method: "POST",
9703
+ path: "/v1/cases/:key/edges/:edgeId/confirm",
9704
+ summary: "Confirm a linking edge.",
9705
+ blocks: [
9706
+ {
9707
+ type: "code",
9708
+ title: "Response",
9709
+ code: `{ "id": "edge_abc123", "status": "confirmed" }`
9710
+ }
9711
+ ]
9712
+ },
9713
+ {
9714
+ type: "endpoint",
9715
+ method: "POST",
9716
+ path: "/v1/cases/:key/edges/:edgeId/reject",
9717
+ summary: "Reject a linking edge.",
9718
+ blocks: [
9719
+ {
9720
+ type: "code",
9721
+ title: "Response",
9722
+ code: `{ "id": "edge_abc123", "status": "rejected" }`
9723
+ }
9724
+ ]
9725
+ }
9726
+ ],
9727
+ related: [
9728
+ { label: "Get Case", slug: "get-case" },
9729
+ { label: "Linking", slug: "linking-overview" }
9730
+ ],
9731
+ faq: [
9732
+ { question: "What happens when I reject an edge?", answer: "The connection between the two documents is removed. If this disconnects a document from all others in the case, it may be removed from the case." }
9733
+ ],
9734
+ mentions: ["edges", "linking", "confirm", "reject"]
9735
+ },
9736
+ {
9737
+ slug: "case-documents",
9738
+ parentSlug: "cases",
9739
+ title: "Case Documents",
9740
+ seoTitle: "Case Documents Endpoints \u2014 Talonic Docs",
9741
+ description: "Pin or remove documents within a case. Pinned documents are highlighted in the case view and preserved during case operations.",
9742
+ content: [
9743
+ {
9744
+ type: "endpoint",
9745
+ method: "POST",
9746
+ path: "/v1/cases/:key/documents/:docId/pin",
9747
+ summary: "Pin a document within the case.",
9748
+ blocks: [
9749
+ {
9750
+ type: "code",
9751
+ title: "Response",
9752
+ code: `{ "document_id": "doc_abc123", "pinned": true }`
9753
+ }
9754
+ ]
9755
+ },
9756
+ {
9757
+ type: "endpoint",
9758
+ method: "DELETE",
9759
+ path: "/v1/cases/:key/documents/:docId",
9760
+ summary: "Remove a document from the case.",
9761
+ blocks: [
9762
+ {
9763
+ type: "code",
9764
+ title: "Response",
9765
+ code: `{ "deleted": true }`
9766
+ }
9767
+ ]
9768
+ }
9769
+ ],
9770
+ related: [
9771
+ { label: "Get Case", slug: "get-case" },
9772
+ { label: "Case Edges", slug: "case-edges" }
9773
+ ],
9774
+ faq: [],
9775
+ mentions: ["pin", "documents", "case documents"]
9776
+ },
9777
+ {
9778
+ slug: "case-merge-split",
9779
+ parentSlug: "cases",
9780
+ title: "Case Merge & Split",
9781
+ seoTitle: "Merge and Split Cases \u2014 Talonic Docs",
9782
+ description: "Split a case into multiple cases or merge multiple cases into one. Restructure case boundaries when automatic grouping needs adjustment.",
9783
+ content: [
9784
+ { type: "paragraph", text: "When the automatic case grouping does not match your needs, split a case into parts or merge multiple cases together." },
9785
+ {
9786
+ type: "endpoint",
9787
+ method: "POST",
9788
+ path: "/v1/cases/:key/split",
9789
+ summary: "Split a case into multiple cases.",
9790
+ blocks: [
9791
+ {
9792
+ type: "param-table",
9793
+ title: "Body parameters",
9794
+ params: [
9795
+ { name: "document_groups", type: "string[][]", required: true, description: "Array of document ID arrays, each group becomes a new case." }
9796
+ ]
9797
+ },
9798
+ {
9799
+ type: "code",
9800
+ title: "Response",
9801
+ code: `{
9802
+ "cases": [
9803
+ { "key": "CASE-002", "document_count": 3 },
9804
+ { "key": "CASE-003", "document_count": 2 }
9805
+ ]
9806
+ }`
9807
+ }
9808
+ ]
9809
+ },
9810
+ {
9811
+ type: "endpoint",
9812
+ method: "POST",
9813
+ path: "/v1/cases/merge",
9814
+ summary: "Merge multiple cases into one.",
9815
+ blocks: [
9816
+ {
9817
+ type: "param-table",
9818
+ title: "Body parameters",
9819
+ params: [
9820
+ { name: "case_keys", type: "string[]", required: true, description: "Keys of cases to merge." }
9821
+ ]
9822
+ },
9823
+ {
9824
+ type: "code",
9825
+ title: "Response",
9826
+ code: `{
9827
+ "key": "CASE-004",
9828
+ "document_count": 7,
9829
+ "merged_from": ["CASE-001", "CASE-002"]
9830
+ }`
9831
+ }
9832
+ ]
9833
+ }
9834
+ ],
9835
+ related: [
9836
+ { label: "List Cases", slug: "list-cases" },
9837
+ { label: "Case Operations", slug: "case-operations" }
9838
+ ],
9839
+ faq: [
9840
+ { question: "What happens to anomalies when cases are merged?", answer: "Anomalies from all source cases are carried over to the merged case and re-evaluated." }
9841
+ ],
9842
+ mentions: ["merge", "split", "case restructuring"]
9843
+ }
9844
+ ];
9845
+
9846
+ // src/content/api/review.ts
9847
+ var sections39 = [
9848
+ {
9849
+ slug: "list-review-items",
9850
+ parentSlug: "review",
9851
+ title: "List Review Items",
9852
+ seoTitle: "List Review Items Endpoint \u2014 Talonic Docs",
9853
+ description: "List pending review items in the review queue with pagination. Review items are validation records awaiting human approval, rejection, or flagging.",
9854
+ content: [
9855
+ { type: "paragraph", text: "The review queue surfaces validation records that require human judgment before delivery. Items appear when extraction confidence is below the auto-approval threshold or when anomalies are detected." },
9856
+ {
9857
+ type: "endpoint",
9858
+ method: "GET",
9859
+ path: "/v1/review",
9860
+ summary: "List pending review items with pagination.",
9861
+ blocks: [
9862
+ {
9863
+ type: "param-table",
9864
+ title: "Query parameters",
9865
+ params: [
9866
+ { name: "page", type: "number", description: "Page number.", default: "1" },
9867
+ { name: "limit", type: "number", description: "Results per page.", default: "20" }
9868
+ ]
9869
+ },
9870
+ {
9871
+ type: "code",
9872
+ title: "Response",
9873
+ code: `{
9874
+ "data": [
9875
+ {
9876
+ "id": "rev_abc123",
9877
+ "document_id": "doc_xyz789",
9878
+ "document_name": "invoice_q4.pdf",
9879
+ "status": "pending",
9880
+ "assigned_to": null,
9881
+ "created_at": "2024-10-12T09:00:00Z"
9882
+ }
9883
+ ],
9884
+ "total": 15,
9885
+ "page": 1,
9886
+ "limit": 20
9887
+ }`
9888
+ }
9889
+ ]
9890
+ }
9891
+ ],
9892
+ related: [
9893
+ { label: "Review Stats", slug: "review-stats" },
9894
+ { label: "Get Review Item", slug: "get-review-item" }
9895
+ ],
9896
+ faq: [
9897
+ { question: "When do items appear in the review queue?", answer: "Items are queued when extraction confidence falls below the auto-approval threshold or when anomalies require human verification." }
9898
+ ],
9899
+ mentions: ["review", "queue", "validation"]
9900
+ },
9901
+ {
9902
+ slug: "review-stats",
9903
+ parentSlug: "review",
9904
+ title: "Review Stats",
9905
+ seoTitle: "Review Queue Statistics \u2014 Talonic Docs",
9906
+ description: "Get statistics for the review queue including total pending items, items by status, and average time in queue. Useful for monitoring review backlog.",
9907
+ content: [
9908
+ {
9909
+ type: "endpoint",
9910
+ method: "GET",
9911
+ path: "/v1/review/stats",
9912
+ summary: "Get review queue statistics.",
9913
+ blocks: [
9914
+ {
9915
+ type: "code",
9916
+ title: "Response",
9917
+ code: `{
9918
+ "total_pending": 15,
9919
+ "total_approved": 230,
9920
+ "total_rejected": 12,
9921
+ "total_flagged": 3,
9922
+ "avg_time_in_queue_ms": 84000
9923
+ }`
9924
+ }
9925
+ ]
9926
+ }
9927
+ ],
9928
+ related: [
9929
+ { label: "List Review Items", slug: "list-review-items" },
9930
+ { label: "Review Batch", slug: "review-batch" }
9931
+ ],
9932
+ faq: [],
9933
+ mentions: ["review statistics", "queue metrics"]
9934
+ },
9935
+ {
9936
+ slug: "get-review-item",
9937
+ parentSlug: "review",
9938
+ title: "Get Review Item",
9939
+ seoTitle: "Get Review Item Endpoint \u2014 Talonic Docs",
9940
+ description: "Retrieve a single review item by ID with full detail including extracted data, confidence scores, and validation flags for human review.",
9941
+ content: [
9942
+ {
9943
+ type: "endpoint",
9944
+ method: "GET",
9945
+ path: "/v1/review/:id",
9946
+ summary: "Get a review item by ID with full detail.",
9947
+ blocks: [
9948
+ {
9949
+ type: "code",
9950
+ title: "Response",
9951
+ code: `{
9952
+ "id": "rev_abc123",
9953
+ "document_id": "doc_xyz789",
9954
+ "document_name": "invoice_q4.pdf",
9955
+ "status": "pending",
9956
+ "assigned_to": null,
9957
+ "fields": [
9958
+ {
9959
+ "key": "vendor_name",
9960
+ "value": "Acme Corp",
9961
+ "confidence": 0.97,
9962
+ "flagged": false
9963
+ },
9964
+ {
9965
+ "key": "total_amount",
9966
+ "value": 14250.00,
9967
+ "confidence": 0.72,
9968
+ "flagged": true,
9969
+ "flag_reason": "Below confidence threshold"
9970
+ }
9971
+ ],
9972
+ "created_at": "2024-10-12T09:00:00Z"
9973
+ }`
9974
+ }
9975
+ ]
9976
+ }
9977
+ ],
9978
+ related: [
9979
+ { label: "Review Action", slug: "review-action" },
9980
+ { label: "Review Assign", slug: "review-assign" }
9981
+ ],
9982
+ faq: [],
9983
+ mentions: ["review detail", "confidence", "flagged fields"]
9984
+ },
9985
+ {
9986
+ slug: "review-action",
9987
+ parentSlug: "review",
9988
+ title: "Review Action",
9989
+ seoTitle: "Review Action Endpoint \u2014 Talonic Docs",
9990
+ description: "Take an action on a review item: approve, reject, or flag. Optionally include a comment explaining the decision for audit purposes.",
9991
+ content: [
9992
+ {
9993
+ type: "endpoint",
9994
+ method: "POST",
9995
+ path: "/v1/review/:id/action",
9996
+ summary: "Approve, reject, or flag a review item.",
9997
+ blocks: [
9998
+ {
9999
+ type: "param-table",
10000
+ title: "Body parameters",
10001
+ params: [
10002
+ { name: "action", type: "string", required: true, description: "Action to take: `approve`, `reject`, or `flag`." },
10003
+ { name: "comment", type: "string", description: "Optional comment explaining the decision." }
10004
+ ]
10005
+ },
10006
+ {
10007
+ type: "code",
10008
+ title: "Response",
10009
+ code: `{
10010
+ "id": "rev_abc123",
10011
+ "status": "approved",
10012
+ "actioned_by": "user_def456",
10013
+ "comment": "Values verified against source document.",
10014
+ "actioned_at": "2024-10-12T10:30:00Z"
10015
+ }`
10016
+ }
10017
+ ]
10018
+ }
10019
+ ],
10020
+ related: [
10021
+ { label: "Get Review Item", slug: "get-review-item" },
10022
+ { label: "Review Batch", slug: "review-batch" }
10023
+ ],
10024
+ faq: [
10025
+ { question: "What happens after approval?", answer: "Approved items proceed to delivery. Rejected items are returned for re-extraction or manual correction." }
10026
+ ],
10027
+ mentions: ["approve", "reject", "flag", "review action"]
10028
+ },
10029
+ {
10030
+ slug: "review-batch",
10031
+ parentSlug: "review",
10032
+ title: "Review Batch",
10033
+ seoTitle: "Batch Review Endpoint \u2014 Talonic Docs",
10034
+ description: "Batch approve or reject multiple review items in a single request. Useful for clearing the review queue when items share similar characteristics.",
10035
+ content: [
10036
+ {
10037
+ type: "endpoint",
10038
+ method: "POST",
10039
+ path: "/v1/review/batch",
10040
+ summary: "Batch approve or reject multiple review items.",
10041
+ blocks: [
10042
+ {
10043
+ type: "param-table",
10044
+ title: "Body parameters",
10045
+ params: [
10046
+ { name: "ids", type: "string[]", required: true, description: "Array of review item IDs." },
10047
+ { name: "action", type: "string", required: true, description: "Action to apply: `approve` or `reject`." },
10048
+ { name: "comment", type: "string", description: "Optional comment applied to all items." }
10049
+ ]
10050
+ },
10051
+ {
10052
+ type: "code",
10053
+ title: "Response",
10054
+ code: `{
10055
+ "processed": 5,
10056
+ "failed": 0,
10057
+ "results": [
10058
+ { "id": "rev_abc123", "status": "approved" },
10059
+ { "id": "rev_def456", "status": "approved" }
10060
+ ]
10061
+ }`
10062
+ }
10063
+ ]
10064
+ }
10065
+ ],
10066
+ related: [
10067
+ { label: "Review Action", slug: "review-action" },
10068
+ { label: "Review Stats", slug: "review-stats" }
10069
+ ],
10070
+ faq: [],
10071
+ mentions: ["batch", "bulk review"]
10072
+ },
10073
+ {
10074
+ slug: "review-assign",
10075
+ parentSlug: "review",
10076
+ title: "Review Assign",
10077
+ seoTitle: "Assign Review Item Endpoint \u2014 Talonic Docs",
10078
+ description: "Assign a review item to a team member for review. Assigned items appear in the assignee's personal review queue.",
10079
+ content: [
10080
+ {
10081
+ type: "endpoint",
10082
+ method: "POST",
10083
+ path: "/v1/review/:id/assign",
10084
+ summary: "Assign a review item to a team member.",
10085
+ blocks: [
10086
+ {
10087
+ type: "param-table",
10088
+ title: "Body parameters",
10089
+ params: [
10090
+ { name: "user_id", type: "string", required: true, description: "ID of the team member to assign." }
10091
+ ]
10092
+ },
10093
+ {
10094
+ type: "code",
10095
+ title: "Response",
10096
+ code: `{
10097
+ "id": "rev_abc123",
10098
+ "assigned_to": "user_def456",
10099
+ "assigned_at": "2024-10-12T10:00:00Z"
10100
+ }`
10101
+ }
10102
+ ]
10103
+ }
10104
+ ],
10105
+ related: [
10106
+ { label: "Get Review Item", slug: "get-review-item" },
10107
+ { label: "Review Action", slug: "review-action" }
10108
+ ],
10109
+ faq: [],
10110
+ mentions: ["assign", "team", "review assignment"]
10111
+ }
10112
+ ];
10113
+
10114
+ // src/content/api/quality.ts
10115
+ var sections40 = [
10116
+ {
10117
+ slug: "list-quality-datasets",
10118
+ parentSlug: "quality",
10119
+ title: "List Ground Truth Datasets",
10120
+ seoTitle: "List Ground Truth Datasets \u2014 Talonic Docs",
10121
+ description: "List all ground truth datasets used for benchmarking extraction accuracy. Each dataset contains manually verified entries that serve as the gold standard.",
10122
+ content: [
10123
+ { type: "paragraph", text: "Ground truth datasets contain manually verified data entries that serve as the gold standard for measuring extraction accuracy. Create datasets, add entries, then run benchmarks against extraction results." },
10124
+ {
10125
+ type: "endpoint",
10126
+ method: "GET",
10127
+ path: "/v1/quality/ground-truth",
10128
+ summary: "List all ground truth datasets.",
10129
+ blocks: [
10130
+ {
10131
+ type: "code",
10132
+ title: "Response",
10133
+ code: `{
10134
+ "data": [
10135
+ {
10136
+ "id": "gt_abc123",
10137
+ "name": "Invoice Accuracy Set",
10138
+ "schema_id": "sch_def456",
10139
+ "entry_count": 50,
10140
+ "created_at": "2024-09-01T10:00:00Z",
10141
+ "updated_at": "2024-09-20T15:30:00Z"
10142
+ }
10143
+ ]
10144
+ }`
10145
+ }
10146
+ ]
10147
+ }
10148
+ ],
10149
+ related: [
10150
+ { label: "Create Dataset", slug: "create-quality-dataset" },
10151
+ { label: "List Benchmarks", slug: "list-benchmarks" }
10152
+ ],
10153
+ faq: [],
10154
+ mentions: ["ground truth", "quality", "benchmarking"]
10155
+ },
10156
+ {
10157
+ slug: "create-quality-dataset",
10158
+ parentSlug: "quality",
10159
+ title: "Create Ground Truth Dataset",
10160
+ seoTitle: "Create Ground Truth Dataset \u2014 Talonic Docs",
10161
+ description: "Create a new ground truth dataset linked to a schema. The dataset defines the expected extraction output used for accuracy benchmarking.",
10162
+ content: [
10163
+ {
10164
+ type: "endpoint",
10165
+ method: "POST",
10166
+ path: "/v1/quality/ground-truth",
10167
+ summary: "Create a new ground truth dataset.",
10168
+ blocks: [
10169
+ {
10170
+ type: "param-table",
10171
+ title: "Body parameters",
10172
+ params: [
10173
+ { name: "name", type: "string", required: true, description: "Name for the dataset." },
10174
+ { name: "schema_id", type: "string", required: true, description: "Schema ID the dataset maps to." }
10175
+ ]
10176
+ },
10177
+ {
10178
+ type: "code",
10179
+ title: "Response (201 Created)",
10180
+ code: `{
10181
+ "id": "gt_abc123",
10182
+ "name": "Invoice Accuracy Set",
10183
+ "schema_id": "sch_def456",
10184
+ "entry_count": 0,
10185
+ "created_at": "2024-09-01T10:00:00Z"
10186
+ }`
10187
+ }
10188
+ ]
10189
+ }
10190
+ ],
10191
+ related: [
10192
+ { label: "List Datasets", slug: "list-quality-datasets" },
10193
+ { label: "Quality Entries", slug: "quality-entries" }
10194
+ ],
10195
+ faq: [],
10196
+ mentions: ["create ground truth", "dataset"]
10197
+ },
10198
+ {
10199
+ slug: "get-quality-dataset",
10200
+ parentSlug: "quality",
10201
+ title: "Get / Delete Dataset",
10202
+ seoTitle: "Get or Delete Ground Truth Dataset \u2014 Talonic Docs",
10203
+ description: "Retrieve a ground truth dataset by ID with metadata and entry count, or delete it permanently. Deleting a dataset does not remove associated benchmark results.",
10204
+ content: [
10205
+ {
10206
+ type: "endpoint",
10207
+ method: "GET",
10208
+ path: "/v1/quality/ground-truth/:id",
10209
+ summary: "Get a ground truth dataset by ID.",
10210
+ blocks: [
10211
+ {
10212
+ type: "code",
10213
+ title: "Response",
10214
+ code: `{
10215
+ "id": "gt_abc123",
10216
+ "name": "Invoice Accuracy Set",
10217
+ "schema_id": "sch_def456",
10218
+ "entry_count": 50,
10219
+ "created_at": "2024-09-01T10:00:00Z",
10220
+ "updated_at": "2024-09-20T15:30:00Z"
10221
+ }`
10222
+ }
10223
+ ]
10224
+ },
10225
+ {
10226
+ type: "endpoint",
10227
+ method: "DELETE",
10228
+ path: "/v1/quality/ground-truth/:id",
10229
+ summary: "Delete a ground truth dataset. Associated benchmark results are retained.",
10230
+ blocks: [
10231
+ {
10232
+ type: "code",
10233
+ title: "Response",
10234
+ code: `{ "deleted": true }`
10235
+ }
10236
+ ]
10237
+ }
10238
+ ],
10239
+ related: [
10240
+ { label: "List Datasets", slug: "list-quality-datasets" },
10241
+ { label: "Quality Entries", slug: "quality-entries" }
10242
+ ],
10243
+ faq: [],
10244
+ mentions: ["ground truth detail", "delete dataset"]
10245
+ },
10246
+ {
10247
+ slug: "quality-entries",
10248
+ parentSlug: "quality",
10249
+ title: "Quality Entries",
10250
+ seoTitle: "Ground Truth Entries \u2014 Talonic Docs",
10251
+ description: "List, add, import, or delete entries in a ground truth dataset. Entries represent individual verified data points used for benchmarking extraction accuracy.",
10252
+ content: [
10253
+ { type: "paragraph", text: "Entries are the individual verified data points within a ground truth dataset. Add them manually, or import in bulk via CSV." },
10254
+ {
10255
+ type: "endpoint",
10256
+ method: "GET",
10257
+ path: "/v1/quality/ground-truth/:datasetId/entries",
10258
+ summary: "List entries in a dataset.",
10259
+ blocks: [
10260
+ {
10261
+ type: "code",
10262
+ title: "Response",
10263
+ code: `{
10264
+ "data": [
10265
+ {
10266
+ "id": "entry_x1y2z3",
10267
+ "document_id": "doc_abc123",
10268
+ "values": {
10269
+ "vendor_name": "Acme Corp",
10270
+ "total_amount": 14250.00,
10271
+ "invoice_number": "INV-2024-0847"
10272
+ }
10273
+ }
10274
+ ]
10275
+ }`
10276
+ }
10277
+ ]
10278
+ },
10279
+ {
10280
+ type: "endpoint",
10281
+ method: "POST",
10282
+ path: "/v1/quality/ground-truth/:datasetId/entries",
10283
+ summary: "Add an entry to the dataset.",
10284
+ blocks: [
10285
+ {
10286
+ type: "param-table",
10287
+ title: "Body parameters",
10288
+ params: [
10289
+ { name: "document_id", type: "string", required: true, description: "Document this entry corresponds to." },
10290
+ { name: "values", type: "object", required: true, description: "Key-value map of verified field values." }
10291
+ ]
10292
+ }
10293
+ ]
10294
+ },
10295
+ {
10296
+ type: "endpoint",
10297
+ method: "POST",
10298
+ path: "/v1/quality/ground-truth/:datasetId/entries/import-csv",
10299
+ summary: "Import entries from a CSV file.",
10300
+ description: "Upload a CSV where each row is an entry and columns map to schema fields. The first column must be `document_id`.",
10301
+ blocks: [
10302
+ {
10303
+ type: "param-table",
10304
+ title: "Form data parameters",
10305
+ params: [
10306
+ { name: "file", type: "binary", required: true, description: "CSV file with ground truth values." }
10307
+ ]
10308
+ },
10309
+ {
10310
+ type: "code",
10311
+ title: "Response",
10312
+ code: `{ "imported": 25, "skipped": 2 }`
10313
+ }
10314
+ ]
10315
+ },
10316
+ {
10317
+ type: "endpoint",
10318
+ method: "DELETE",
10319
+ path: "/v1/quality/ground-truth/:datasetId/entries/:entryId",
10320
+ summary: "Delete an entry from the dataset.",
10321
+ blocks: [
10322
+ {
10323
+ type: "code",
10324
+ title: "Response",
10325
+ code: `{ "deleted": true }`
10326
+ }
10327
+ ]
10328
+ }
10329
+ ],
10330
+ related: [
10331
+ { label: "Get Dataset", slug: "get-quality-dataset" },
10332
+ { label: "Create Benchmark", slug: "create-benchmark" }
10333
+ ],
10334
+ faq: [
10335
+ { question: "What CSV format is expected for import?", answer: "The first column must be document_id. Remaining columns should match the schema field names. Header row is required." }
10336
+ ],
10337
+ mentions: ["entries", "ground truth values", "CSV import"]
10338
+ },
10339
+ {
10340
+ slug: "list-benchmarks",
10341
+ parentSlug: "quality",
10342
+ title: "List Benchmarks",
10343
+ seoTitle: "List Benchmark Runs \u2014 Talonic Docs",
10344
+ description: "List benchmark runs that compare extraction results against ground truth datasets. Each run produces per-field accuracy metrics.",
10345
+ content: [
10346
+ {
10347
+ type: "endpoint",
10348
+ method: "GET",
10349
+ path: "/v1/quality/benchmarks",
10350
+ summary: "List all benchmark runs.",
10351
+ blocks: [
10352
+ {
10353
+ type: "code",
10354
+ title: "Response",
10355
+ code: `{
10356
+ "data": [
10357
+ {
10358
+ "id": "bench_abc123",
10359
+ "ground_truth_id": "gt_abc123",
10360
+ "dataspace_run_id": "run_xyz789",
10361
+ "status": "complete",
10362
+ "overall_accuracy": 0.93,
10363
+ "created_at": "2024-09-25T12:00:00Z"
10364
+ }
10365
+ ]
10366
+ }`
10367
+ }
10368
+ ]
10369
+ }
10370
+ ],
10371
+ related: [
10372
+ { label: "Create Benchmark", slug: "create-benchmark" },
10373
+ { label: "Benchmark Results", slug: "get-benchmark-results" }
10374
+ ],
10375
+ faq: [],
10376
+ mentions: ["benchmarks", "accuracy", "quality runs"]
10377
+ },
10378
+ {
10379
+ slug: "create-benchmark",
10380
+ parentSlug: "quality",
10381
+ title: "Create Benchmark",
10382
+ seoTitle: "Create Benchmark Run \u2014 Talonic Docs",
10383
+ description: "Start a benchmark run that compares a job run output against a ground truth dataset. Produces per-field accuracy scores and overall metrics.",
10384
+ content: [
10385
+ {
10386
+ type: "endpoint",
10387
+ method: "POST",
10388
+ path: "/v1/quality/benchmarks",
10389
+ summary: "Start a new benchmark run.",
10390
+ blocks: [
10391
+ {
10392
+ type: "param-table",
10393
+ title: "Body parameters",
10394
+ params: [
10395
+ { name: "ground_truth_id", type: "string", required: true, description: "Ground truth dataset to benchmark against." },
10396
+ { name: "dataspace_run_id", type: "string", required: true, description: "Job run whose output will be compared." }
10397
+ ]
10398
+ },
10399
+ {
10400
+ type: "code",
10401
+ title: "Response (201 Created)",
10402
+ code: `{
10403
+ "id": "bench_def456",
10404
+ "ground_truth_id": "gt_abc123",
10405
+ "dataspace_run_id": "run_xyz789",
10406
+ "status": "running",
10407
+ "created_at": "2024-09-25T12:00:00Z"
10408
+ }`
10409
+ }
10410
+ ]
10411
+ }
10412
+ ],
10413
+ related: [
10414
+ { label: "List Benchmarks", slug: "list-benchmarks" },
10415
+ { label: "Benchmark Results", slug: "get-benchmark-results" }
10416
+ ],
10417
+ faq: [],
10418
+ mentions: ["create benchmark", "run comparison"]
10419
+ },
10420
+ {
10421
+ slug: "get-benchmark-results",
10422
+ parentSlug: "quality",
10423
+ title: "Benchmark Results",
10424
+ seoTitle: "Benchmark Results & Comparison \u2014 Talonic Docs",
10425
+ description: "Get per-field accuracy results for a benchmark run, or compare two benchmark runs side by side to track extraction quality improvements over time.",
10426
+ content: [
10427
+ {
10428
+ type: "endpoint",
10429
+ method: "GET",
10430
+ path: "/v1/quality/benchmarks/:id/results",
10431
+ summary: "Get per-field accuracy results for a benchmark run.",
10432
+ blocks: [
10433
+ {
10434
+ type: "code",
10435
+ title: "Response",
10436
+ code: `{
10437
+ "benchmark_id": "bench_abc123",
10438
+ "overall_accuracy": 0.93,
10439
+ "field_results": [
10440
+ { "field": "vendor_name", "accuracy": 0.98, "total": 50, "correct": 49 },
10441
+ { "field": "total_amount", "accuracy": 0.90, "total": 50, "correct": 45 },
10442
+ { "field": "invoice_number", "accuracy": 0.92, "total": 50, "correct": 46 }
10443
+ ]
10444
+ }`
10445
+ }
10446
+ ]
10447
+ },
10448
+ {
10449
+ type: "endpoint",
10450
+ method: "GET",
10451
+ path: "/v1/quality/benchmarks/compare",
10452
+ summary: "Compare two benchmark runs side by side.",
10453
+ blocks: [
10454
+ {
10455
+ type: "param-table",
10456
+ title: "Query parameters",
10457
+ params: [
10458
+ { name: "baseline_id", type: "string", required: true, description: "Benchmark ID to use as baseline." },
10459
+ { name: "candidate_id", type: "string", required: true, description: "Benchmark ID to compare against baseline." }
10460
+ ]
10461
+ },
10462
+ {
10463
+ type: "code",
10464
+ title: "Response",
10465
+ code: `{
10466
+ "baseline_id": "bench_abc123",
10467
+ "candidate_id": "bench_def456",
10468
+ "overall_delta": +0.03,
10469
+ "field_deltas": [
10470
+ { "field": "vendor_name", "baseline": 0.96, "candidate": 0.98, "delta": +0.02 },
10471
+ { "field": "total_amount", "baseline": 0.88, "candidate": 0.92, "delta": +0.04 }
10472
+ ]
10473
+ }`
10474
+ }
10475
+ ]
10476
+ }
10477
+ ],
10478
+ related: [
10479
+ { label: "Create Benchmark", slug: "create-benchmark" },
10480
+ { label: "List Datasets", slug: "list-quality-datasets" }
10481
+ ],
10482
+ faq: [
10483
+ { question: "How is field accuracy calculated?", answer: "Each extracted value is compared to the ground truth entry for the same document and field. Accuracy is the ratio of correct matches to total entries." }
10484
+ ],
10485
+ mentions: ["accuracy", "benchmark results", "comparison", "field-level metrics"]
10486
+ }
10487
+ ];
10488
+
10489
+ // src/content/api/routing-rules.ts
10490
+ var sections41 = [
10491
+ {
10492
+ slug: "list-routing-rules",
10493
+ parentSlug: "routing-rules",
10494
+ title: "List Routing Rules",
10495
+ seoTitle: "List Routing Rules Endpoint \u2014 Talonic Docs",
10496
+ description: "List all routing rules ordered by priority. Routing rules match incoming documents by conditions and apply actions like schema assignment, job triggering, or team routing.",
10497
+ content: [
10498
+ { type: "paragraph", text: "Routing rules automate document processing by matching incoming documents against conditions and applying actions. Rules are evaluated in priority order \u2014 the first matching rule wins." },
10499
+ {
10500
+ type: "endpoint",
10501
+ method: "GET",
10502
+ path: "/v1/routing-rules",
10503
+ summary: "List all routing rules, ordered by priority.",
10504
+ blocks: [
10505
+ {
10506
+ type: "code",
10507
+ title: "Response",
10508
+ code: `{
10509
+ "data": [
10510
+ {
10511
+ "id": "rr_abc123",
10512
+ "name": "Route invoices to finance schema",
10513
+ "priority": 1,
10514
+ "conditions": [
10515
+ { "field": "document_type", "operator": "eq", "value": "invoice" }
10516
+ ],
10517
+ "actions": [
10518
+ { "type": "assign_schema", "schema_id": "sch_def456" }
10519
+ ],
10520
+ "enabled": true,
10521
+ "created_at": "2024-09-01T10:00:00Z"
10522
+ }
10523
+ ]
10524
+ }`
10525
+ }
10526
+ ]
10527
+ }
10528
+ ],
10529
+ related: [
10530
+ { label: "Create Routing Rule", slug: "create-routing-rule" },
10531
+ { label: "Reorder Rules", slug: "reorder-routing-rules" }
10532
+ ],
10533
+ faq: [
10534
+ { question: "How are routing rules evaluated?", answer: "Rules are evaluated in priority order (lowest number first). The first rule whose conditions match the incoming document is applied." }
10535
+ ],
10536
+ mentions: ["routing rules", "priority", "document routing"]
10537
+ },
10538
+ {
10539
+ slug: "create-routing-rule",
10540
+ parentSlug: "routing-rules",
10541
+ title: "Create Routing Rule",
10542
+ seoTitle: "Create Routing Rule Endpoint \u2014 Talonic Docs",
10543
+ description: "Create a new routing rule with conditions on document properties and actions to apply when matched. Conditions can match document type, source, and other metadata.",
10544
+ content: [
10545
+ {
10546
+ type: "endpoint",
10547
+ method: "POST",
10548
+ path: "/v1/routing-rules",
10549
+ summary: "Create a new routing rule.",
10550
+ blocks: [
10551
+ {
10552
+ type: "param-table",
10553
+ title: "Body parameters",
10554
+ params: [
10555
+ { name: "name", type: "string", required: true, description: "Human-readable name for the rule." },
10556
+ { name: "conditions", type: "object[]", required: true, description: "Array of conditions. Each has `field`, `operator` (`eq`, `contains`, `regex`), and `value`." },
10557
+ { name: "actions", type: "object[]", required: true, description: "Array of actions. Types: `assign_schema`, `trigger_job`, `route_to`." },
10558
+ { name: "priority", type: "number", description: "Priority order (lower = higher priority). Auto-assigned if omitted." },
10559
+ { name: "enabled", type: "boolean", description: "Whether the rule is active.", default: "true" }
10560
+ ]
10561
+ },
10562
+ {
10563
+ type: "code",
10564
+ title: "Request body example",
10565
+ code: `{
10566
+ "name": "Route contracts to legal schema",
10567
+ "conditions": [
10568
+ { "field": "document_type", "operator": "eq", "value": "contract" },
10569
+ { "field": "source", "operator": "contains", "value": "legal-inbox" }
10570
+ ],
10571
+ "actions": [
10572
+ { "type": "assign_schema", "schema_id": "sch_legal789" },
10573
+ { "type": "trigger_job", "job_config": { "extraction_type": "pipeline" } }
10574
+ ]
10575
+ }`
10576
+ },
10577
+ {
10578
+ type: "code",
10579
+ title: "Response (201 Created)",
10580
+ code: `{
10581
+ "id": "rr_def456",
10582
+ "name": "Route contracts to legal schema",
10583
+ "priority": 2,
10584
+ "conditions": [
10585
+ { "field": "document_type", "operator": "eq", "value": "contract" },
10586
+ { "field": "source", "operator": "contains", "value": "legal-inbox" }
10587
+ ],
10588
+ "actions": [
10589
+ { "type": "assign_schema", "schema_id": "sch_legal789" },
10590
+ { "type": "trigger_job", "job_config": { "extraction_type": "pipeline" } }
10591
+ ],
10592
+ "enabled": true,
10593
+ "created_at": "2024-09-15T14:00:00Z"
10594
+ }`
10595
+ }
10596
+ ]
10597
+ }
10598
+ ],
10599
+ related: [
10600
+ { label: "List Routing Rules", slug: "list-routing-rules" },
10601
+ { label: "Manage Routing Rule", slug: "manage-routing-rule" }
10602
+ ],
10603
+ faq: [
10604
+ { question: "What condition fields are available?", answer: "Conditions can match on `document_type`, `source`, `language`, `sensitivity`, and other document metadata fields." },
10605
+ { question: "Can a rule have multiple actions?", answer: "Yes. Actions are executed in order. Common combinations include assigning a schema and triggering a job." }
10606
+ ],
10607
+ mentions: ["create rule", "conditions", "actions", "assign_schema", "trigger_job", "route_to"]
10608
+ },
10609
+ {
10610
+ slug: "manage-routing-rule",
10611
+ parentSlug: "routing-rules",
10612
+ title: "Manage Routing Rule",
10613
+ seoTitle: "Get, Update, Delete Routing Rule \u2014 Talonic Docs",
10614
+ description: "Retrieve, update, or delete a routing rule by ID. Update conditions, actions, priority, or enabled state. Deleting a rule does not affect previously routed documents.",
10615
+ content: [
10616
+ {
10617
+ type: "endpoint",
10618
+ method: "GET",
10619
+ path: "/v1/routing-rules/:id",
10620
+ summary: "Get a routing rule by ID.",
10621
+ blocks: []
10622
+ },
10623
+ {
10624
+ type: "endpoint",
10625
+ method: "PATCH",
10626
+ path: "/v1/routing-rules/:id",
10627
+ summary: "Update a routing rule.",
10628
+ blocks: [
10629
+ {
10630
+ type: "param-table",
10631
+ title: "Body parameters",
10632
+ params: [
10633
+ { name: "name", type: "string", description: "Updated rule name." },
10634
+ { name: "conditions", type: "object[]", description: "Updated conditions array." },
10635
+ { name: "actions", type: "object[]", description: "Updated actions array." },
10636
+ { name: "priority", type: "number", description: "Updated priority." },
10637
+ { name: "enabled", type: "boolean", description: "Enable or disable the rule." }
10638
+ ]
10639
+ }
10640
+ ]
10641
+ },
10642
+ {
10643
+ type: "endpoint",
10644
+ method: "DELETE",
10645
+ path: "/v1/routing-rules/:id",
10646
+ summary: "Delete a routing rule. Previously routed documents are not affected.",
10647
+ blocks: [
10648
+ {
10649
+ type: "code",
10650
+ title: "Response",
10651
+ code: `{ "deleted": true }`
10652
+ }
10653
+ ]
10654
+ }
10655
+ ],
10656
+ related: [
10657
+ { label: "List Routing Rules", slug: "list-routing-rules" },
10658
+ { label: "Reorder Rules", slug: "reorder-routing-rules" }
10659
+ ],
10660
+ faq: [],
10661
+ mentions: ["update rule", "delete rule", "manage routing"]
10662
+ },
10663
+ {
10664
+ slug: "reorder-routing-rules",
10665
+ parentSlug: "routing-rules",
10666
+ title: "Reorder Routing Rules",
10667
+ seoTitle: "Reorder Routing Rules Endpoint \u2014 Talonic Docs",
10668
+ description: "Reorder routing rules by providing an ordered array of rule IDs. Priority values are reassigned sequentially based on the new order.",
10669
+ content: [
10670
+ {
10671
+ type: "endpoint",
10672
+ method: "POST",
10673
+ path: "/v1/routing-rules/reorder",
10674
+ summary: "Reorder rules by priority.",
10675
+ blocks: [
10676
+ {
10677
+ type: "param-table",
10678
+ title: "Body parameters",
10679
+ params: [
10680
+ { name: "rule_ids", type: "string[]", required: true, description: "Ordered array of rule IDs. First ID gets priority 1, second gets priority 2, and so on." }
10681
+ ]
10682
+ },
10683
+ {
10684
+ type: "code",
10685
+ title: "Response",
10686
+ code: `{
10687
+ "reordered": [
10688
+ { "id": "rr_def456", "priority": 1 },
10689
+ { "id": "rr_abc123", "priority": 2 },
10690
+ { "id": "rr_ghi789", "priority": 3 }
10691
+ ]
10692
+ }`
10693
+ }
10694
+ ]
10695
+ }
10696
+ ],
10697
+ related: [
10698
+ { label: "List Routing Rules", slug: "list-routing-rules" },
10699
+ { label: "Manage Routing Rule", slug: "manage-routing-rule" }
10700
+ ],
10701
+ faq: [
10702
+ { question: "Do I need to include all rule IDs?", answer: "Yes. All active rule IDs must be included in the array. Omitting a rule ID will result in an error." }
10703
+ ],
10704
+ mentions: ["reorder", "priority", "rule ordering"]
10705
+ }
10706
+ ];
10707
+
10708
+ // src/content/api/billing.ts
10709
+ var sections42 = [
10710
+ {
10711
+ slug: "billing-settings",
10712
+ parentSlug: "billing",
10713
+ title: "Get / Update Settings",
10714
+ seoTitle: "Billing Settings Endpoint \u2014 Talonic Docs",
10715
+ description: "Get and update auto top-up billing settings. A human must enable auto top-up before agents can use the topup endpoint.",
10716
+ content: [
10717
+ {
10718
+ type: "paragraph",
10719
+ text: "Billing settings control whether AI agents can autonomously top up credits. A human must enable auto top-up and configure the threshold and amount before agents can call the topup endpoint."
10720
+ },
10721
+ {
10722
+ type: "endpoint",
10723
+ method: "GET",
10724
+ path: "/v1/billing/settings",
10725
+ summary: "Get current billing settings.",
10726
+ description: "Requires read scope.",
10727
+ blocks: [
10728
+ {
10729
+ type: "code",
10730
+ title: "Response",
10731
+ code: `{
10732
+ "auto_topup_enabled": false,
10733
+ "auto_topup_threshold": 5000,
10734
+ "auto_topup_amount": 50000
10735
+ }`
10736
+ }
10737
+ ]
10738
+ },
10739
+ {
10740
+ type: "endpoint",
10741
+ method: "PATCH",
10742
+ path: "/v1/billing/settings",
10743
+ summary: "Update billing settings.",
10744
+ description: "Requires write scope. All fields are optional \u2014 only provided fields are updated.",
10745
+ blocks: [
10746
+ {
10747
+ type: "param-table",
10748
+ title: "Body parameters",
10749
+ params: [
10750
+ { name: "auto_topup_enabled", type: "boolean", description: "Enable or disable auto top-up for agents." },
10751
+ { name: "auto_topup_threshold", type: "integer", description: "Balance threshold (credits) below which agents can top up. Minimum 1,000.", default: "5000" },
10752
+ { name: "auto_topup_amount", type: "integer", description: "Credits added per top-up. Minimum 1,000, maximum 500,000.", default: "50000" }
10753
+ ]
10754
+ }
10755
+ ]
10756
+ }
10757
+ ],
10758
+ related: [
10759
+ { label: "Auto Top-Up", slug: "billing-topup" },
10760
+ { label: "Credits Balance", slug: "credits-balance" }
10761
+ ],
10762
+ faq: [
10763
+ {
10764
+ question: "Who can enable auto top-up?",
10765
+ answer: "Only a human with write access can enable auto top-up via PATCH /v1/billing/settings. Agents cannot enable it themselves."
10766
+ }
10767
+ ],
10768
+ mentions: ["billing settings", "auto top-up", "threshold", "credits"]
10769
+ },
10770
+ {
10771
+ slug: "billing-topup",
10772
+ parentSlug: "billing",
10773
+ title: "Auto Top-Up",
10774
+ seoTitle: "Auto Top-Up Endpoint \u2014 Talonic Docs",
10775
+ description: "Agent-callable endpoint to autonomously top up credits. Requires auto_topup_enabled to be set by a human. Returns 403 if not enabled.",
10776
+ content: [
10777
+ {
10778
+ type: "paragraph",
10779
+ text: "AI agents call this endpoint to autonomously add credits when the balance falls below the configured threshold. **A human must first enable auto top-up** via `PATCH /v1/billing/settings`."
10780
+ },
10781
+ {
10782
+ type: "endpoint",
10783
+ method: "POST",
10784
+ path: "/v1/billing/topup",
10785
+ summary: "Top up credits autonomously. Requires billing scope.",
10786
+ description: "Returns 403 if auto_topup_enabled is false. If balance is already above threshold, returns topped_up: false without adding credits.",
10787
+ blocks: [
10788
+ {
10789
+ type: "code",
10790
+ title: "Response (topped up)",
10791
+ code: `{
10792
+ "topped_up": true,
10793
+ "amount_credits": 50000,
10794
+ "new_balance_credits": 54930,
10795
+ "new_balance_eur": 54.93
10796
+ }`
10797
+ },
10798
+ {
10799
+ type: "code",
10800
+ title: "Response (not needed)",
10801
+ code: `{
10802
+ "topped_up": false,
10803
+ "reason": "balance_above_threshold",
10804
+ "balance_credits": 64930,
10805
+ "balance_eur": 64.93,
10806
+ "threshold_credits": 5000
10807
+ }`
10808
+ },
10809
+ {
10810
+ type: "callout",
10811
+ variant: "warning",
10812
+ text: "The `billing` scope must be explicitly granted to the API key. Existing keys do not have it by default."
10813
+ }
10814
+ ]
10815
+ }
10816
+ ],
10817
+ related: [
10818
+ { label: "Billing Settings", slug: "billing-settings" },
10819
+ { label: "Credits Balance", slug: "credits-balance" }
10820
+ ],
10821
+ faq: [
10822
+ {
10823
+ question: "Can an agent enable auto top-up itself?",
10824
+ answer: "No. Auto top-up must be enabled by a human via PATCH /v1/billing/settings. The POST /v1/billing/topup endpoint returns 403 if it is not enabled."
10825
+ },
10826
+ {
10827
+ question: "What scope does the API key need?",
10828
+ answer: "The billing scope. This must be explicitly granted when creating the API key \u2014 existing keys do not have it by default."
10829
+ }
10830
+ ],
10831
+ mentions: ["auto top-up", "agent", "billing scope", "credits", "autonomous"]
10832
+ },
10833
+ {
10834
+ slug: "cost-headers",
10835
+ parentSlug: "billing",
10836
+ title: "Cost Response Headers",
10837
+ seoTitle: "Cost Response Headers \u2014 Talonic Docs",
10838
+ description: "Every successful POST /v1/extract response includes X-Talonic-Cost-* headers showing credits consumed, EUR equivalent, remaining balance, and cell resolution breakdown.",
10839
+ content: [
10840
+ {
10841
+ type: "paragraph",
10842
+ text: "Every successful `POST /v1/extract` response includes cost headers so AI agents can track spending without a separate API call:"
10843
+ },
10844
+ {
10845
+ type: "param-table",
10846
+ title: "Response headers",
10847
+ params: [
10848
+ { name: "X-Talonic-Cost-Credits", type: "integer", description: "Credits consumed for this extraction request." },
10849
+ { name: "X-Talonic-Cost-EUR", type: "float", description: "EUR equivalent of credits consumed (at the configured rate)." },
10850
+ { name: "X-Talonic-Balance-Credits", type: "integer", description: "Remaining credit balance after this request." },
10851
+ { name: "X-Talonic-Cells-Resolved-Registry", type: "integer", description: "Number of fields resolved from the registry (no AI cost)." },
10852
+ { name: "X-Talonic-Cells-Resolved-AI", type: "integer", description: "Number of fields resolved by AI extraction." }
10853
+ ]
10854
+ },
10855
+ {
10856
+ type: "code",
10857
+ title: "Example response headers",
10858
+ language: "http",
10859
+ code: `HTTP/1.1 200 OK
10860
+ X-Talonic-Cost-Credits: 70
10861
+ X-Talonic-Cost-EUR: 0.07
10862
+ X-Talonic-Balance-Credits: 64930
10863
+ X-Talonic-Cells-Resolved-Registry: 0
10864
+ X-Talonic-Cells-Resolved-AI: 1`
10865
+ },
10866
+ {
10867
+ type: "paragraph",
10868
+ text: "Agents can read these headers after every extraction to decide whether to call `POST /v1/billing/topup` to replenish credits."
10869
+ }
10870
+ ],
10871
+ related: [
10872
+ { label: "POST /v1/extract", slug: "post-extract" },
10873
+ { label: "Auto Top-Up", slug: "billing-topup" },
10874
+ { label: "Credits Balance", slug: "credits-balance" }
10875
+ ],
10876
+ faq: [
10877
+ {
10878
+ question: "Are cost headers included on async (202) responses?",
10879
+ answer: "No. Cost headers are only included on synchronous 200 responses where extraction completes immediately. Async responses return a poll URL instead."
10880
+ }
10881
+ ],
10882
+ mentions: ["cost headers", "X-Talonic-Cost", "credits", "balance", "cells resolved"]
10883
+ }
10884
+ ];
10885
+
10886
+ // src/content/api/errors-rate-limits.ts
10887
+ var sections43 = [
7783
10888
  {
7784
10889
  slug: "error-format",
7785
10890
  parentSlug: "errors-rate-limits",
@@ -7924,7 +11029,15 @@ var ALL_API_RAW = [
7924
11029
  ...sections32,
7925
11030
  ...sections33,
7926
11031
  ...sections34,
7927
- ...sections35
11032
+ ...sections35,
11033
+ ...sections36,
11034
+ ...sections37,
11035
+ ...sections38,
11036
+ ...sections39,
11037
+ ...sections40,
11038
+ ...sections41,
11039
+ ...sections42,
11040
+ ...sections43
7928
11041
  ];
7929
11042
  function enrich(raw, navSections, domain) {
7930
11043
  return raw.map((r) => {