@talonic/docs 0.20.18 → 0.20.19

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,5 +1,5 @@
1
1
  // src/content/helpers.ts
2
- function deriveBreadcrumbs(sections52, leafId, domain) {
2
+ function deriveBreadcrumbs(sections55, leafId, domain) {
3
3
  const domainLabels = {
4
4
  api: "API Reference",
5
5
  platform: "Platform Guide",
@@ -10,20 +10,20 @@ function deriveBreadcrumbs(sections52, leafId, domain) {
10
10
  label: domainLabels[domain] ?? domain,
11
11
  slug: domain
12
12
  };
13
- for (const group of sections52) {
13
+ for (const group of sections55) {
14
14
  const child = group.children?.find((c) => c.id === leafId);
15
15
  if (child) {
16
16
  return [root, { label: group.label, slug: group.id }, { label: child.label, slug: child.id }];
17
17
  }
18
18
  }
19
- const topLevel = sections52.find((s) => s.id === leafId);
19
+ const topLevel = sections55.find((s) => s.id === leafId);
20
20
  if (topLevel) {
21
21
  return [root, { label: topLevel.label, slug: topLevel.id }];
22
22
  }
23
23
  return [root];
24
24
  }
25
- function derivePrevNext(sections52, leafId) {
26
- const flat = sections52.flatMap(
25
+ function derivePrevNext(sections55, leafId) {
26
+ const flat = sections55.flatMap(
27
27
  (s) => s.children ?? [{ id: s.id, label: s.label }]
28
28
  );
29
29
  const idx = flat.findIndex((c) => c.id === leafId);
@@ -250,6 +250,29 @@ var API_NAV_SECTIONS = [
250
250
  { id: "registry", label: "Registry", children: [
251
251
  { id: "registry-query", label: "Query" }
252
252
  ] },
253
+ { id: "data-products", label: "Data Products", children: [
254
+ { id: "list-data-products", label: "List Data Products" },
255
+ { id: "get-data-product", label: "Get Data Product" },
256
+ { id: "delete-data-product", label: "Delete Data Product" },
257
+ { id: "get-data-product-results", label: "Get Results" }
258
+ ] },
259
+ { id: "data-policies", label: "Data Policies", children: [
260
+ { id: "list-data-policies", label: "List Policies" },
261
+ { id: "create-data-policy", label: "Create Policy" },
262
+ { id: "get-data-policy", label: "Get Policy" },
263
+ { id: "update-data-policy", label: "Update Policy" },
264
+ { id: "delete-data-policy", label: "Delete Policy" },
265
+ { id: "list-data-policy-versions", label: "List Versions" },
266
+ { id: "list-data-policy-fields", label: "List Fields" },
267
+ { id: "list-data-policy-rules", label: "List Rules" }
268
+ ] },
269
+ { id: "record-sets", label: "Record Sets", children: [
270
+ { id: "list-record-sets", label: "List Record Sets" },
271
+ { id: "get-record-set", label: "Get Record Set" },
272
+ { id: "list-record-set-fields", label: "List Fields" },
273
+ { id: "list-record-set-records", label: "List Records" },
274
+ { id: "export-record-set", label: "Export" }
275
+ ] },
253
276
  { id: "billing", label: "Billing", children: [
254
277
  { id: "billing-settings", label: "Settings" },
255
278
  { id: "billing-topup", label: "Auto Top-Up" },
@@ -25906,6 +25929,1500 @@ var sections49 = [
25906
25929
  }
25907
25930
  ];
25908
25931
 
25932
+ // src/content/api/data-products.ts
25933
+ var sections50 = [
25934
+ {
25935
+ slug: "list-data-products",
25936
+ parentSlug: "data-products",
25937
+ title: "List Data Products",
25938
+ seoTitle: "List Data Products Endpoint \u2014 Talonic Docs",
25939
+ description: "List assembled data products with cursor-based pagination. Filter by status to find active, draft, or archived products across your workspace.",
25940
+ content: [
25941
+ { type: "paragraph", text: "Data products are the final assembled output datasets produced by the Talonic pipeline. Each data product represents a structured, validated, and optionally resolved collection of records ready for downstream consumption. Data products are created automatically when a job run completes validation, or manually via the platform UI." },
25942
+ { type: "paragraph", text: "Use this endpoint to list all data products in your workspace. Results are returned in reverse chronological order by default and support cursor-based pagination. You can filter by status to find only active products, or locate draft and archived products for lifecycle management." },
25943
+ {
25944
+ type: "endpoint",
25945
+ method: "GET",
25946
+ path: "/v1/data-products",
25947
+ summary: "List data products with optional status filter and cursor-based pagination.",
25948
+ description: "Requires read scope.",
25949
+ blocks: [
25950
+ {
25951
+ type: "param-table",
25952
+ title: "Query parameters",
25953
+ params: [
25954
+ { name: "status", type: "string", description: "Filter by product status (e.g. active, draft, archived)." },
25955
+ { name: "limit", type: "integer", default: "20", description: "Maximum number of items to return (1-100)." },
25956
+ { name: "cursor", type: "string", description: "Opaque pagination cursor from a previous response." },
25957
+ { name: "order", type: "string", default: "desc", description: "Sort order by creation date (asc | desc)." }
25958
+ ]
25959
+ }
25960
+ ]
25961
+ },
25962
+ { type: "heading", level: 2, id: "list-data-products-response", text: "Response" },
25963
+ {
25964
+ type: "param-table",
25965
+ title: "Response fields",
25966
+ params: [
25967
+ { name: "data", type: "array", description: "Array of data product objects." },
25968
+ { name: "data[].id", type: "string", description: "Data product UUID." },
25969
+ { name: "data[].name", type: "string", description: "Human-readable product name." },
25970
+ { name: "data[].description", type: "string | null", description: "Optional description of the data product." },
25971
+ { name: "data[].schema_id", type: "string", description: "UUID of the user schema that defines the output columns." },
25972
+ { name: "data[].run_id", type: "string", description: "UUID of the source job run that produced the data." },
25973
+ { name: "data[].status", type: "string", description: "Product status: active, draft, or archived." },
25974
+ { name: "data[].created_at", type: "string", description: "ISO 8601 creation timestamp." },
25975
+ { name: "data[].updated_at", type: "string", description: "ISO 8601 last update timestamp." }
25976
+ ]
25977
+ },
25978
+ {
25979
+ type: "code",
25980
+ title: "curl",
25981
+ language: "bash",
25982
+ code: `curl -s https://api.talonic.ai/v1/data-products?status=active&limit=10 \\
25983
+ -H "Authorization: Bearer tlnc_your_api_key"`
25984
+ },
25985
+ {
25986
+ type: "code",
25987
+ title: "Response",
25988
+ code: `{
25989
+ "data": [
25990
+ {
25991
+ "id": "d1a2b3c4-e5f6-7890-abcd-ef1234567890",
25992
+ "name": "Q4 Invoice Extract",
25993
+ "description": "Structured invoice data from Q4 batch",
25994
+ "schema_id": "s1a2b3c4-e5f6-7890-abcd-ef1234567890",
25995
+ "run_id": "r1a2b3c4-e5f6-7890-abcd-ef1234567890",
25996
+ "status": "active",
25997
+ "created_at": "2024-11-01T14:20:00.000Z",
25998
+ "updated_at": "2024-11-01T14:25:30.000Z"
25999
+ }
26000
+ ],
26001
+ "cursor": "eyJpZCI6ImQxYTJiM2M0In0="
26002
+ }`
26003
+ },
26004
+ { type: "heading", level: 2, id: "list-data-products-errors", text: "Errors" },
26005
+ {
26006
+ type: "param-table",
26007
+ title: "Error responses",
26008
+ params: [
26009
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
26010
+ { name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
26011
+ ]
26012
+ }
26013
+ ],
26014
+ related: [
26015
+ { label: "Resolutions", slug: "list-resolutions" },
26016
+ { label: "Jobs", slug: "list-jobs" },
26017
+ { label: "Schemas", slug: "list-schemas" }
26018
+ ],
26019
+ faq: [
26020
+ { question: "What is a data product?", answer: "A data product is the final assembled dataset from the Talonic pipeline. It contains structured, validated, and optionally resolved records ready for export or delivery. Each product is tied to a schema and a source job run." },
26021
+ { question: "How do data product statuses work?", answer: "Data products start as `draft` during assembly, move to `active` once validated and ready for consumption, and can be `archived` when no longer needed. Only `active` products are included in delivery bindings by default." },
26022
+ { question: "Can I filter data products by schema?", answer: "The list endpoint currently supports filtering by `status`. To find products for a specific schema, list all products and filter client-side by `schema_id`, or use the filter/search endpoints for more advanced queries." }
26023
+ ],
26024
+ mentions: ["data product", "export", "structured output"]
26025
+ },
26026
+ {
26027
+ slug: "get-data-product",
26028
+ parentSlug: "data-products",
26029
+ title: "Get Data Product",
26030
+ seoTitle: "Get Data Product Endpoint \u2014 Talonic Docs",
26031
+ description: "Retrieve a single data product by ID with its schema reference, source run, status, and metadata. Requires read scope for the workspace.",
26032
+ content: [
26033
+ { type: "paragraph", text: "Retrieve the full details of a specific data product by its UUID. The response includes the product name, description, associated schema and source run references, current status, and timestamps. Use this endpoint to inspect a product before fetching its result rows." },
26034
+ { type: "paragraph", text: "The `schema_id` field references the user schema that defines the output columns. The `run_id` field references the job run that produced the underlying extracted data. Together these let you trace the full lineage of the data product back to the original documents." },
26035
+ {
26036
+ type: "endpoint",
26037
+ method: "GET",
26038
+ path: "/v1/data-products/{id}",
26039
+ summary: "Get a single data product by ID.",
26040
+ description: "Requires read scope.",
26041
+ blocks: [
26042
+ {
26043
+ type: "param-table",
26044
+ title: "Path parameters",
26045
+ params: [
26046
+ { name: "id", type: "uuid", required: true, description: "Data product UUID." }
26047
+ ]
26048
+ }
26049
+ ]
26050
+ },
26051
+ { type: "heading", level: 2, id: "get-data-product-response", text: "Response" },
26052
+ {
26053
+ type: "param-table",
26054
+ title: "Response fields",
26055
+ params: [
26056
+ { name: "id", type: "string", description: "Data product UUID." },
26057
+ { name: "name", type: "string", description: "Human-readable product name." },
26058
+ { name: "description", type: "string | null", description: "Optional description." },
26059
+ { name: "schema_id", type: "string", description: "UUID of the user schema." },
26060
+ { name: "run_id", type: "string", description: "UUID of the source job run." },
26061
+ { name: "status", type: "string", description: "Product status: active, draft, or archived." },
26062
+ { name: "created_at", type: "string", description: "ISO 8601 creation timestamp." },
26063
+ { name: "updated_at", type: "string", description: "ISO 8601 last update timestamp." }
26064
+ ]
26065
+ },
26066
+ {
26067
+ type: "code",
26068
+ title: "curl",
26069
+ language: "bash",
26070
+ code: `curl -s https://api.talonic.ai/v1/data-products/d1a2b3c4-e5f6-7890-abcd-ef1234567890 \\
26071
+ -H "Authorization: Bearer tlnc_your_api_key"`
26072
+ },
26073
+ {
26074
+ type: "code",
26075
+ title: "Response",
26076
+ code: `{
26077
+ "id": "d1a2b3c4-e5f6-7890-abcd-ef1234567890",
26078
+ "name": "Q4 Invoice Extract",
26079
+ "description": "Structured invoice data from Q4 batch",
26080
+ "schema_id": "s1a2b3c4-e5f6-7890-abcd-ef1234567890",
26081
+ "run_id": "r1a2b3c4-e5f6-7890-abcd-ef1234567890",
26082
+ "status": "active",
26083
+ "created_at": "2024-11-01T14:20:00.000Z",
26084
+ "updated_at": "2024-11-01T14:25:30.000Z"
26085
+ }`
26086
+ },
26087
+ { type: "heading", level: 2, id: "get-data-product-errors", text: "Errors" },
26088
+ {
26089
+ type: "param-table",
26090
+ title: "Error responses",
26091
+ params: [
26092
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
26093
+ { name: "404", type: "not_found", description: "Data product not found or does not belong to your organization." },
26094
+ { name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
26095
+ ]
26096
+ }
26097
+ ],
26098
+ related: [
26099
+ { label: "List Data Products", slug: "list-data-products" },
26100
+ { label: "Get Data Product Results", slug: "get-data-product-results" },
26101
+ { label: "Jobs", slug: "list-jobs" }
26102
+ ],
26103
+ faq: [
26104
+ { question: "How do I trace a data product back to its source documents?", answer: "The `run_id` field references the job run. Use `GET /v1/jobs/{run_id}` to find the job details, including the list of documents that were processed. The `schema_id` field tells you which output schema was used." },
26105
+ { question: "What does the schema_id represent?", answer: "The `schema_id` references the user schema that defines the output columns and field mappings for this data product. It determines which fields appear in the result rows and how they are named." }
26106
+ ],
26107
+ mentions: ["data product", "export", "structured output", "lineage"]
26108
+ },
26109
+ {
26110
+ slug: "delete-data-product",
26111
+ parentSlug: "data-products",
26112
+ title: "Delete Data Product",
26113
+ seoTitle: "Delete Data Product Endpoint \u2014 Talonic Docs",
26114
+ description: "Permanently delete a data product and its result rows. Requires write scope. The source job run and extracted data are not affected.",
26115
+ content: [
26116
+ { type: "paragraph", text: "Permanently delete a data product and all associated result rows. This action is irreversible. The source job run, its documents, and extracted data are not affected by this operation. Use this to remove products that are no longer needed or to clean up test data." },
26117
+ { type: "callout", variant: "warning", text: "Deletion is permanent. All result rows associated with this data product are removed. Any active delivery bindings referencing this product will stop delivering data." },
26118
+ {
26119
+ type: "endpoint",
26120
+ method: "DELETE",
26121
+ path: "/v1/data-products/{id}",
26122
+ summary: "Delete a data product and its results.",
26123
+ description: "Requires write scope.",
26124
+ blocks: [
26125
+ {
26126
+ type: "param-table",
26127
+ title: "Path parameters",
26128
+ params: [
26129
+ { name: "id", type: "uuid", required: true, description: "Data product UUID." }
26130
+ ]
26131
+ }
26132
+ ]
26133
+ },
26134
+ { type: "heading", level: 2, id: "delete-data-product-response", text: "Response" },
26135
+ {
26136
+ type: "param-table",
26137
+ title: "Response fields",
26138
+ params: [
26139
+ { name: "deleted", type: "boolean", description: "Always true on success." }
26140
+ ]
26141
+ },
26142
+ {
26143
+ type: "code",
26144
+ title: "curl",
26145
+ language: "bash",
26146
+ code: `curl -s -X DELETE https://api.talonic.ai/v1/data-products/d1a2b3c4-e5f6-7890-abcd-ef1234567890 \\
26147
+ -H "Authorization: Bearer tlnc_your_api_key"`
26148
+ },
26149
+ {
26150
+ type: "code",
26151
+ title: "Response",
26152
+ code: `{
26153
+ "deleted": true
26154
+ }`
26155
+ },
26156
+ { type: "heading", level: 2, id: "delete-data-product-errors", text: "Errors" },
26157
+ {
26158
+ type: "param-table",
26159
+ title: "Error responses",
26160
+ params: [
26161
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
26162
+ { name: "404", type: "not_found", description: "Data product not found or does not belong to your organization." },
26163
+ { name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
26164
+ ]
26165
+ }
26166
+ ],
26167
+ related: [
26168
+ { label: "List Data Products", slug: "list-data-products" },
26169
+ { label: "Resolutions", slug: "list-resolutions" },
26170
+ { label: "Schemas", slug: "list-schemas" }
26171
+ ],
26172
+ faq: [
26173
+ { question: "Does deleting a data product affect the source job run?", answer: "No. The source job run, its documents, and all extracted data are completely unaffected. Only the data product and its assembled result rows are removed." },
26174
+ { question: "What happens to delivery bindings when a product is deleted?", answer: "Any delivery bindings that reference the deleted product will stop delivering data. The bindings themselves are not deleted, but they will produce errors on the next delivery attempt. Update or remove affected bindings after deleting a product." }
26175
+ ],
26176
+ mentions: ["data product", "export", "structured output"]
26177
+ },
26178
+ {
26179
+ slug: "get-data-product-results",
26180
+ parentSlug: "data-products",
26181
+ title: "Get Data Product Results",
26182
+ seoTitle: "Get Data Product Results \u2014 Talonic Docs",
26183
+ description: "Retrieve the structured result rows of a data product with cursor-based pagination. Each row contains field values aligned to the product schema.",
26184
+ content: [
26185
+ { type: "paragraph", text: "Retrieve the assembled result rows for a data product. Each row contains the structured field values aligned to the product's schema, with one row per document or entity. Results are returned with cursor-based pagination for efficient traversal of large datasets." },
26186
+ { type: "paragraph", text: "The result rows represent the final output of the Talonic pipeline: extracted, validated, and optionally resolved field values. Each row maps field names (from the associated user schema) to their values. Use this endpoint to programmatically consume the structured data for downstream integration, analytics, or export." },
26187
+ {
26188
+ type: "endpoint",
26189
+ method: "GET",
26190
+ path: "/v1/data-products/{id}/results",
26191
+ summary: "Get paginated result rows for a data product.",
26192
+ description: "Requires read scope.",
26193
+ blocks: [
26194
+ {
26195
+ type: "param-table",
26196
+ title: "Path parameters",
26197
+ params: [
26198
+ { name: "id", type: "uuid", required: true, description: "Data product UUID." }
26199
+ ]
26200
+ },
26201
+ {
26202
+ type: "param-table",
26203
+ title: "Query parameters",
26204
+ params: [
26205
+ { name: "limit", type: "integer", default: "20", description: "Maximum number of rows to return (1-100)." },
26206
+ { name: "cursor", type: "string", description: "Opaque pagination cursor from a previous response." }
26207
+ ]
26208
+ }
26209
+ ]
26210
+ },
26211
+ { type: "heading", level: 2, id: "get-data-product-results-response", text: "Response" },
26212
+ {
26213
+ type: "param-table",
26214
+ title: "Response fields",
26215
+ params: [
26216
+ { name: "data", type: "array", description: "Array of result row objects." },
26217
+ { name: "data[].id", type: "string", description: "Result row UUID." },
26218
+ { name: "data[].document_id", type: "string", description: "Source document UUID." },
26219
+ { name: "data[].fields", type: "object", description: "Key-value map of field names to extracted values." },
26220
+ { name: "data[].created_at", type: "string", description: "ISO 8601 timestamp." },
26221
+ { name: "cursor", type: "string | null", description: "Pagination cursor for the next page, or null if no more results." }
26222
+ ]
26223
+ },
26224
+ {
26225
+ type: "code",
26226
+ title: "curl",
26227
+ language: "bash",
26228
+ code: `curl -s "https://api.talonic.ai/v1/data-products/d1a2b3c4-e5f6-7890-abcd-ef1234567890/results?limit=10" \\
26229
+ -H "Authorization: Bearer tlnc_your_api_key"`
26230
+ },
26231
+ {
26232
+ type: "code",
26233
+ title: "Response",
26234
+ code: `{
26235
+ "data": [
26236
+ {
26237
+ "id": "row-1a2b3c4d-e5f6-7890-abcd-ef1234567890",
26238
+ "document_id": "doc-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
26239
+ "fields": {
26240
+ "invoice_number": "INV-2024-0042",
26241
+ "vendor_name": "Acme Corp",
26242
+ "total_amount": "1250.00",
26243
+ "currency": "USD",
26244
+ "invoice_date": "2024-10-15"
26245
+ },
26246
+ "created_at": "2024-11-01T14:25:00.000Z"
26247
+ }
26248
+ ],
26249
+ "cursor": "eyJpZCI6InJvdy0xYTJiIn0="
26250
+ }`
26251
+ },
26252
+ { type: "heading", level: 2, id: "get-data-product-results-errors", text: "Errors" },
26253
+ {
26254
+ type: "param-table",
26255
+ title: "Error responses",
26256
+ params: [
26257
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
26258
+ { name: "404", type: "not_found", description: "Data product not found or does not belong to your organization." },
26259
+ { name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
26260
+ ]
26261
+ }
26262
+ ],
26263
+ related: [
26264
+ { label: "Get Data Product", slug: "get-data-product" },
26265
+ { label: "Resolutions", slug: "list-resolutions" },
26266
+ { label: "Jobs", slug: "list-jobs" },
26267
+ { label: "Schemas", slug: "list-schemas" }
26268
+ ],
26269
+ faq: [
26270
+ { question: "What format are the result row fields in?", answer: "The `fields` object is a flat key-value map where keys are field names from the associated schema and values are strings. All values are returned as strings regardless of the field type defined in the schema." },
26271
+ { question: "How do I export all results at once?", answer: "Paginate through all results using the `cursor` parameter until `cursor` is null. Alternatively, use the platform UI to export the data product as CSV or XLSX, which handles pagination automatically." },
26272
+ { question: "Are resolved values included in the results?", answer: "Yes. If a resolution run was executed against the source job, the result rows contain the resolved canonical values rather than the raw extracted values. The data product always reflects the latest resolved state." }
26273
+ ],
26274
+ mentions: ["data product", "export", "structured output", "result rows"]
26275
+ }
26276
+ ];
26277
+
26278
+ // src/content/api/data-policies.ts
26279
+ var sections51 = [
26280
+ {
26281
+ slug: "list-data-policies",
26282
+ parentSlug: "data-policies",
26283
+ title: "List Data Policies",
26284
+ seoTitle: "List Data Policies Endpoint \u2014 Talonic Docs",
26285
+ description: "List data policies that define field transformations, normalization rules, and lookup cascades applied during resolution runs. Supports cursor-based pagination.",
26286
+ content: [
26287
+ { type: "paragraph", text: "Data policies are first-class, versioned configuration objects that define how field values are transformed, normalized, and validated during resolution runs. Each policy contains a set of fields (output contract) and rules (transformation logic) that are compiled into an executable pipeline. Policies support 14 rule types including direct mapping, lookup cascades, Lua scripting, and deterministic computation." },
26288
+ { type: "paragraph", text: "Use this endpoint to list all data policies in your workspace. Policies are returned in reverse chronological order by default. Each policy can have multiple versions, allowing you to iterate on transformation logic without affecting in-flight resolution runs that have already captured a policy snapshot." },
26289
+ {
26290
+ type: "endpoint",
26291
+ method: "GET",
26292
+ path: "/v1/data-policies",
26293
+ summary: "List all data policies in the workspace.",
26294
+ description: "Requires read scope.",
26295
+ blocks: [
26296
+ {
26297
+ type: "param-table",
26298
+ title: "Query parameters",
26299
+ params: [
26300
+ { name: "limit", type: "integer", default: "20", description: "Maximum number of items to return (1-100)." },
26301
+ { name: "cursor", type: "string", description: "Opaque pagination cursor from a previous response." },
26302
+ { name: "order", type: "string", default: "desc", description: "Sort order by creation date (asc | desc)." }
26303
+ ]
26304
+ }
26305
+ ]
26306
+ },
26307
+ { type: "heading", level: 2, id: "list-data-policies-response", text: "Response" },
26308
+ {
26309
+ type: "param-table",
26310
+ title: "Response fields",
26311
+ params: [
26312
+ { name: "data", type: "array", description: "Array of data policy objects." },
26313
+ { name: "data[].id", type: "string", description: "Data policy UUID." },
26314
+ { name: "data[].name", type: "string", description: "Human-readable policy name." },
26315
+ { name: "data[].description", type: "string | null", description: "Optional description of the policy purpose." },
26316
+ { name: "data[].version", type: "integer", description: "Current version number." },
26317
+ { name: "data[].created_at", type: "string", description: "ISO 8601 creation timestamp." },
26318
+ { name: "data[].updated_at", type: "string", description: "ISO 8601 last update timestamp." }
26319
+ ]
26320
+ },
26321
+ {
26322
+ type: "code",
26323
+ title: "curl",
26324
+ language: "bash",
26325
+ code: `curl -s https://api.talonic.ai/v1/data-policies \\
26326
+ -H "Authorization: Bearer tlnc_your_api_key"`
26327
+ },
26328
+ {
26329
+ type: "code",
26330
+ title: "Response",
26331
+ code: `{
26332
+ "data": [
26333
+ {
26334
+ "id": "p1a2b3c4-e5f6-7890-abcd-ef1234567890",
26335
+ "name": "Invoice Normalization",
26336
+ "description": "Standardize currency codes, country names, and date formats for invoice processing",
26337
+ "version": 3,
26338
+ "created_at": "2024-10-01T09:00:00.000Z",
26339
+ "updated_at": "2024-10-15T11:30:00.000Z"
26340
+ }
26341
+ ],
26342
+ "cursor": "eyJpZCI6InAxYTJiM2M0In0="
26343
+ }`
26344
+ },
26345
+ { type: "heading", level: 2, id: "list-data-policies-errors", text: "Errors" },
26346
+ {
26347
+ type: "param-table",
26348
+ title: "Error responses",
26349
+ params: [
26350
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
26351
+ { name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
26352
+ ]
26353
+ }
26354
+ ],
26355
+ related: [
26356
+ { label: "Create Data Policy", slug: "create-data-policy" },
26357
+ { label: "Resolutions", slug: "list-resolutions" },
26358
+ { label: "Schemas", slug: "list-schemas" }
26359
+ ],
26360
+ faq: [
26361
+ { question: "What do data policies do?", answer: "Data policies define how field values are transformed and normalized during resolution runs. They support lookup cascades (mapping raw values to canonical codes via reference tables), Lua scripting for custom logic, deterministic computation, and direct field-to-field mappings." },
26362
+ { question: "How do data policy versions work?", answer: "Each time you update a policy, a new version is created. Resolution runs capture a snapshot of the active version at run time, so changes to a policy do not retroactively affect completed runs. You can inspect which version was used via the `policy_snapshot` field on a resolution run." },
26363
+ { question: "Can I have multiple data policies per workspace?", answer: "Yes. You can create multiple policies for different transformation scenarios. Each resolution run uses the active policy configured for the workspace, but you can switch between policies as needed." }
26364
+ ],
26365
+ mentions: ["data policy", "transformation", "normalization", "lookup", "Lua"]
26366
+ },
26367
+ {
26368
+ slug: "create-data-policy",
26369
+ parentSlug: "data-policies",
26370
+ title: "Create Data Policy",
26371
+ seoTitle: "Create Data Policy Endpoint \u2014 Talonic Docs",
26372
+ description: "Create a new data policy to define field transformation rules, lookup cascades, and normalization logic for resolution runs.",
26373
+ content: [
26374
+ { type: "paragraph", text: "Create a new data policy in your workspace. The policy starts at version 1 with no fields or rules. After creation, use the fields and rules endpoints to define the output contract and transformation logic. Policies are not active until they contain at least one field and one rule." },
26375
+ { type: "paragraph", text: "The policy name should be descriptive enough to distinguish it from other policies in the workspace. Use the optional description field to document the policy purpose, the types of documents it targets, and the normalization strategies it employs." },
26376
+ {
26377
+ type: "endpoint",
26378
+ method: "POST",
26379
+ path: "/v1/data-policies",
26380
+ summary: "Create a new data policy.",
26381
+ description: "Requires write scope.",
26382
+ blocks: [
26383
+ {
26384
+ type: "param-table",
26385
+ title: "Body parameters",
26386
+ params: [
26387
+ { name: "name", type: "string", required: true, description: "Human-readable policy name." },
26388
+ { name: "description", type: "string", description: "Optional description of the policy purpose." }
26389
+ ]
26390
+ },
26391
+ {
26392
+ type: "code",
26393
+ title: "Request body",
26394
+ code: `{
26395
+ "name": "Invoice Normalization",
26396
+ "description": "Standardize currency codes, country names, and date formats"
26397
+ }`
26398
+ }
26399
+ ]
26400
+ },
26401
+ { type: "heading", level: 2, id: "create-data-policy-response", text: "Response" },
26402
+ {
26403
+ type: "param-table",
26404
+ title: "Response fields (201 Created)",
26405
+ params: [
26406
+ { name: "id", type: "string", description: "Data policy UUID." },
26407
+ { name: "name", type: "string", description: "Policy name." },
26408
+ { name: "description", type: "string | null", description: "Policy description." },
26409
+ { name: "version", type: "integer", description: "Initial version, always 1." },
26410
+ { name: "created_at", type: "string", description: "ISO 8601 creation timestamp." },
26411
+ { name: "updated_at", type: "string", description: "ISO 8601 last update timestamp." }
26412
+ ]
26413
+ },
26414
+ {
26415
+ type: "code",
26416
+ title: "curl",
26417
+ language: "bash",
26418
+ code: `curl -s -X POST https://api.talonic.ai/v1/data-policies \\
26419
+ -H "Authorization: Bearer tlnc_your_api_key" \\
26420
+ -H "Content-Type: application/json" \\
26421
+ -d '{"name":"Invoice Normalization","description":"Standardize currency codes, country names, and date formats"}'`
26422
+ },
26423
+ {
26424
+ type: "code",
26425
+ title: "Response (201 Created)",
26426
+ code: `{
26427
+ "id": "p1a2b3c4-e5f6-7890-abcd-ef1234567890",
26428
+ "name": "Invoice Normalization",
26429
+ "description": "Standardize currency codes, country names, and date formats",
26430
+ "version": 1,
26431
+ "created_at": "2024-10-01T09:00:00.000Z",
26432
+ "updated_at": "2024-10-01T09:00:00.000Z"
26433
+ }`
26434
+ },
26435
+ { type: "heading", level: 2, id: "create-data-policy-errors", text: "Errors" },
26436
+ {
26437
+ type: "param-table",
26438
+ title: "Error responses",
26439
+ params: [
26440
+ { name: "400", type: "bad_request", description: "Invalid request body or missing required fields." },
26441
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
26442
+ { name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
26443
+ ]
26444
+ }
26445
+ ],
26446
+ related: [
26447
+ { label: "List Data Policies", slug: "list-data-policies" },
26448
+ { label: "List Data Policy Fields", slug: "list-data-policy-fields" },
26449
+ { label: "List Data Policy Rules", slug: "list-data-policy-rules" }
26450
+ ],
26451
+ faq: [
26452
+ { question: "What should I do after creating a policy?", answer: "After creating a policy, define its output fields via the fields endpoint and add transformation rules via the rules endpoint. The policy is not active until it has at least one field and one rule configured." },
26453
+ { question: "Can I rename a policy after creation?", answer: "Yes. Use the `PATCH /v1/data-policies/{id}` endpoint to update the name or description. Renaming does not affect the policy version or any existing resolution runs that captured a snapshot of this policy." }
26454
+ ],
26455
+ mentions: ["data policy", "transformation", "normalization"]
26456
+ },
26457
+ {
26458
+ slug: "get-data-policy",
26459
+ parentSlug: "data-policies",
26460
+ title: "Get Data Policy",
26461
+ seoTitle: "Get Data Policy Endpoint \u2014 Talonic Docs",
26462
+ description: "Retrieve a data policy by ID with its fields and rules inlined. Returns the full policy configuration needed to understand transformation behavior.",
26463
+ content: [
26464
+ { type: "paragraph", text: "Retrieve the complete details of a specific data policy, including its fields and rules inlined in the response. This provides a single-call view of the entire policy configuration, which is useful for auditing transformation logic or debugging resolution results." },
26465
+ { type: "paragraph", text: "The inlined fields define the output contract: which field keys the policy declares and their expected types. The inlined rules define the transformation logic: lookup tables, direct mappings, Lua scripts, and computed fields. Rules are executed in topological order based on their declared dependencies." },
26466
+ {
26467
+ type: "endpoint",
26468
+ method: "GET",
26469
+ path: "/v1/data-policies/{id}",
26470
+ summary: "Get a data policy with fields and rules inlined.",
26471
+ description: "Requires read scope.",
26472
+ blocks: [
26473
+ {
26474
+ type: "param-table",
26475
+ title: "Path parameters",
26476
+ params: [
26477
+ { name: "id", type: "uuid", required: true, description: "Data policy UUID." }
26478
+ ]
26479
+ }
26480
+ ]
26481
+ },
26482
+ { type: "heading", level: 2, id: "get-data-policy-response", text: "Response" },
26483
+ {
26484
+ type: "param-table",
26485
+ title: "Response fields",
26486
+ params: [
26487
+ { name: "id", type: "string", description: "Data policy UUID." },
26488
+ { name: "name", type: "string", description: "Policy name." },
26489
+ { name: "description", type: "string | null", description: "Policy description." },
26490
+ { name: "version", type: "integer", description: "Current version number." },
26491
+ { name: "fields", type: "array", description: "Array of declared output field objects." },
26492
+ { name: "rules", type: "array", description: "Array of transformation rule objects." },
26493
+ { name: "created_at", type: "string", description: "ISO 8601 creation timestamp." },
26494
+ { name: "updated_at", type: "string", description: "ISO 8601 last update timestamp." }
26495
+ ]
26496
+ },
26497
+ {
26498
+ type: "code",
26499
+ title: "curl",
26500
+ language: "bash",
26501
+ code: `curl -s https://api.talonic.ai/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890 \\
26502
+ -H "Authorization: Bearer tlnc_your_api_key"`
26503
+ },
26504
+ {
26505
+ type: "code",
26506
+ title: "Response",
26507
+ code: `{
26508
+ "id": "p1a2b3c4-e5f6-7890-abcd-ef1234567890",
26509
+ "name": "Invoice Normalization",
26510
+ "description": "Standardize currency codes, country names, and date formats",
26511
+ "version": 3,
26512
+ "fields": [
26513
+ { "field_key": "country_code", "type": "string" },
26514
+ { "field_key": "currency", "type": "string" }
26515
+ ],
26516
+ "rules": [
26517
+ {
26518
+ "id": "r1a2b3c4-0001",
26519
+ "field_key": "country_code",
26520
+ "rule_type": "lookup",
26521
+ "config": { "table": "country_codes", "source_field": "country" }
26522
+ }
26523
+ ],
26524
+ "created_at": "2024-10-01T09:00:00.000Z",
26525
+ "updated_at": "2024-10-15T11:30:00.000Z"
26526
+ }`
26527
+ },
26528
+ { type: "heading", level: 2, id: "get-data-policy-errors", text: "Errors" },
26529
+ {
26530
+ type: "param-table",
26531
+ title: "Error responses",
26532
+ params: [
26533
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
26534
+ { name: "404", type: "not_found", description: "Data policy not found or does not belong to your organization." },
26535
+ { name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
26536
+ ]
26537
+ }
26538
+ ],
26539
+ related: [
26540
+ { label: "List Data Policies", slug: "list-data-policies" },
26541
+ { label: "Resolutions", slug: "list-resolutions" },
26542
+ { label: "Schemas", slug: "list-schemas" }
26543
+ ],
26544
+ faq: [
26545
+ { question: "Why are fields and rules inlined in the response?", answer: "Inlining fields and rules gives you a complete view of the policy in a single API call. This is useful for auditing the full transformation pipeline, debugging resolution results, or exporting the policy configuration for version control." },
26546
+ { question: "What are the supported rule types?", answer: "Data policies support 14 rule types including `lookup` (reference table matching), `direct` (field-to-field mapping), `lua` (custom Lua scripting), `compute` (deterministic formulas), `format` (string formatting), and more. Each rule type has its own configuration schema." },
26547
+ { question: "How does rule execution order work?", answer: "Rules are compiled into a topological order based on their declared field dependencies. A rule that reads from `country` and writes to `country_code` will always execute after the rule that produces `country`. Circular dependencies are detected at compile time." }
26548
+ ],
26549
+ mentions: ["data policy", "transformation", "normalization", "lookup", "Lua"]
26550
+ },
26551
+ {
26552
+ slug: "update-data-policy",
26553
+ parentSlug: "data-policies",
26554
+ title: "Update Data Policy",
26555
+ seoTitle: "Update Data Policy Endpoint \u2014 Talonic Docs",
26556
+ description: "Update the name or description of a data policy. Creates a new version. Does not affect in-flight resolution runs that captured a previous snapshot.",
26557
+ content: [
26558
+ { type: "paragraph", text: "Update the metadata of an existing data policy. You can change the name, description, or both. Each update increments the policy version number. Resolution runs that have already captured a policy snapshot are not affected by this change." },
26559
+ { type: "paragraph", text: "To modify the transformation logic (fields and rules), use the dedicated fields and rules endpoints. This endpoint only updates the policy-level metadata. Version increments from metadata changes are tracked separately from version increments caused by field or rule modifications." },
26560
+ {
26561
+ type: "endpoint",
26562
+ method: "PATCH",
26563
+ path: "/v1/data-policies/{id}",
26564
+ summary: "Update data policy name or description.",
26565
+ description: "Requires write scope.",
26566
+ blocks: [
26567
+ {
26568
+ type: "param-table",
26569
+ title: "Path parameters",
26570
+ params: [
26571
+ { name: "id", type: "uuid", required: true, description: "Data policy UUID." }
26572
+ ]
26573
+ },
26574
+ {
26575
+ type: "param-table",
26576
+ title: "Body parameters",
26577
+ params: [
26578
+ { name: "name", type: "string", description: "Updated policy name." },
26579
+ { name: "description", type: "string", description: "Updated policy description." }
26580
+ ]
26581
+ },
26582
+ {
26583
+ type: "code",
26584
+ title: "Request body",
26585
+ code: `{
26586
+ "name": "Invoice Normalization v2",
26587
+ "description": "Updated: added VAT normalization rules"
26588
+ }`
26589
+ }
26590
+ ]
26591
+ },
26592
+ { type: "heading", level: 2, id: "update-data-policy-response", text: "Response" },
26593
+ {
26594
+ type: "param-table",
26595
+ title: "Response fields",
26596
+ params: [
26597
+ { name: "id", type: "string", description: "Data policy UUID." },
26598
+ { name: "name", type: "string", description: "Updated policy name." },
26599
+ { name: "description", type: "string | null", description: "Updated policy description." },
26600
+ { name: "version", type: "integer", description: "Incremented version number." },
26601
+ { name: "created_at", type: "string", description: "ISO 8601 creation timestamp." },
26602
+ { name: "updated_at", type: "string", description: "ISO 8601 last update timestamp." }
26603
+ ]
26604
+ },
26605
+ {
26606
+ type: "code",
26607
+ title: "curl",
26608
+ language: "bash",
26609
+ code: `curl -s -X PATCH https://api.talonic.ai/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890 \\
26610
+ -H "Authorization: Bearer tlnc_your_api_key" \\
26611
+ -H "Content-Type: application/json" \\
26612
+ -d '{"name":"Invoice Normalization v2"}'`
26613
+ },
26614
+ {
26615
+ type: "code",
26616
+ title: "Response",
26617
+ code: `{
26618
+ "id": "p1a2b3c4-e5f6-7890-abcd-ef1234567890",
26619
+ "name": "Invoice Normalization v2",
26620
+ "description": "Updated: added VAT normalization rules",
26621
+ "version": 4,
26622
+ "created_at": "2024-10-01T09:00:00.000Z",
26623
+ "updated_at": "2024-10-20T08:15:00.000Z"
26624
+ }`
26625
+ },
26626
+ { type: "heading", level: 2, id: "update-data-policy-errors", text: "Errors" },
26627
+ {
26628
+ type: "param-table",
26629
+ title: "Error responses",
26630
+ params: [
26631
+ { name: "400", type: "bad_request", description: "Invalid request body." },
26632
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
26633
+ { name: "404", type: "not_found", description: "Data policy not found or does not belong to your organization." },
26634
+ { name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
26635
+ ]
26636
+ }
26637
+ ],
26638
+ related: [
26639
+ { label: "Get Data Policy", slug: "get-data-policy" },
26640
+ { label: "List Data Policy Versions", slug: "list-data-policy-versions" }
26641
+ ],
26642
+ faq: [
26643
+ { question: "Does updating a policy affect running resolutions?", answer: "No. Resolution runs capture a snapshot of the policy at creation time. Updates to the policy only affect future resolution runs. Completed and in-flight runs are unaffected." },
26644
+ { question: "Do I need to provide all fields in the update?", answer: "No. This is a PATCH endpoint, so you only need to include the fields you want to change. Omitted fields retain their current values." }
26645
+ ],
26646
+ mentions: ["data policy", "transformation", "normalization"]
26647
+ },
26648
+ {
26649
+ slug: "delete-data-policy",
26650
+ parentSlug: "data-policies",
26651
+ title: "Delete Data Policy",
26652
+ seoTitle: "Delete Data Policy Endpoint \u2014 Talonic Docs",
26653
+ description: "Permanently delete a data policy and all its versions, fields, and rules. Requires write scope. Does not affect resolution runs that captured a snapshot.",
26654
+ content: [
26655
+ { type: "paragraph", text: "Permanently delete a data policy and all associated versions, fields, and rules. This action is irreversible. Resolution runs that previously captured a snapshot of this policy are not affected, as they retain their own copy of the policy configuration." },
26656
+ { type: "callout", variant: "warning", text: "Deletion is permanent. All versions, fields, and rules of this policy are removed. Future resolution runs will not be able to reference this policy. Existing resolution runs with captured snapshots are unaffected." },
26657
+ {
26658
+ type: "endpoint",
26659
+ method: "DELETE",
26660
+ path: "/v1/data-policies/{id}",
26661
+ summary: "Delete a data policy and all its versions.",
26662
+ description: "Requires write scope.",
26663
+ blocks: [
26664
+ {
26665
+ type: "param-table",
26666
+ title: "Path parameters",
26667
+ params: [
26668
+ { name: "id", type: "uuid", required: true, description: "Data policy UUID." }
26669
+ ]
26670
+ }
26671
+ ]
26672
+ },
26673
+ { type: "heading", level: 2, id: "delete-data-policy-response", text: "Response" },
26674
+ {
26675
+ type: "param-table",
26676
+ title: "Response fields",
26677
+ params: [
26678
+ { name: "deleted", type: "boolean", description: "Always true on success." }
26679
+ ]
26680
+ },
26681
+ {
26682
+ type: "code",
26683
+ title: "curl",
26684
+ language: "bash",
26685
+ code: `curl -s -X DELETE https://api.talonic.ai/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890 \\
26686
+ -H "Authorization: Bearer tlnc_your_api_key"`
26687
+ },
26688
+ {
26689
+ type: "code",
26690
+ title: "Response",
26691
+ code: `{
26692
+ "deleted": true
26693
+ }`
26694
+ },
26695
+ { type: "heading", level: 2, id: "delete-data-policy-errors", text: "Errors" },
26696
+ {
26697
+ type: "param-table",
26698
+ title: "Error responses",
26699
+ params: [
26700
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
26701
+ { name: "404", type: "not_found", description: "Data policy not found or does not belong to your organization." },
26702
+ { name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
26703
+ ]
26704
+ }
26705
+ ],
26706
+ related: [
26707
+ { label: "List Data Policies", slug: "list-data-policies" },
26708
+ { label: "Resolutions", slug: "list-resolutions" }
26709
+ ],
26710
+ faq: [
26711
+ { question: "Does deleting a policy break existing resolution runs?", answer: "No. Resolution runs capture a complete policy snapshot at creation time. Deleting the policy only prevents future resolution runs from using it. All historical results are preserved." },
26712
+ { question: "Can I recover a deleted policy?", answer: "No. Deletion is permanent. If you need to preserve a policy configuration, export it via the GET endpoint before deleting. You can inspect historical snapshots in completed resolution runs." }
26713
+ ],
26714
+ mentions: ["data policy", "transformation", "normalization"]
26715
+ },
26716
+ {
26717
+ slug: "list-data-policy-versions",
26718
+ parentSlug: "data-policies",
26719
+ title: "List Data Policy Versions",
26720
+ seoTitle: "List Data Policy Versions \u2014 Talonic Docs",
26721
+ description: "List all versions of a data policy showing the change history. Each version captures the policy state at a point in time for auditability.",
26722
+ content: [
26723
+ { type: "paragraph", text: "Retrieve the version history of a data policy. Each version represents a snapshot of the policy configuration at a point in time. Versions are created automatically when the policy, its fields, or its rules are modified. This endpoint is useful for auditing changes and understanding how the policy evolved." },
26724
+ { type: "paragraph", text: "Version numbers are monotonically increasing integers starting at 1. When a resolution run captures a policy snapshot, it records the version number, allowing you to correlate resolution results with the specific policy configuration that produced them." },
26725
+ {
26726
+ type: "endpoint",
26727
+ method: "GET",
26728
+ path: "/v1/data-policies/{id}/versions",
26729
+ summary: "List all versions of a data policy.",
26730
+ description: "Requires read scope.",
26731
+ blocks: [
26732
+ {
26733
+ type: "param-table",
26734
+ title: "Path parameters",
26735
+ params: [
26736
+ { name: "id", type: "uuid", required: true, description: "Data policy UUID." }
26737
+ ]
26738
+ }
26739
+ ]
26740
+ },
26741
+ { type: "heading", level: 2, id: "list-data-policy-versions-response", text: "Response" },
26742
+ {
26743
+ type: "param-table",
26744
+ title: "Response fields",
26745
+ params: [
26746
+ { name: "data", type: "array", description: "Array of version objects." },
26747
+ { name: "data[].version", type: "integer", description: "Version number." },
26748
+ { name: "data[].created_at", type: "string", description: "ISO 8601 timestamp when this version was created." },
26749
+ { name: "data[].fields_count", type: "integer", description: "Number of declared fields in this version." },
26750
+ { name: "data[].rules_count", type: "integer", description: "Number of rules in this version." }
26751
+ ]
26752
+ },
26753
+ {
26754
+ type: "code",
26755
+ title: "curl",
26756
+ language: "bash",
26757
+ code: `curl -s https://api.talonic.ai/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890/versions \\
26758
+ -H "Authorization: Bearer tlnc_your_api_key"`
26759
+ },
26760
+ {
26761
+ type: "code",
26762
+ title: "Response",
26763
+ code: `{
26764
+ "data": [
26765
+ { "version": 3, "created_at": "2024-10-15T11:30:00.000Z", "fields_count": 5, "rules_count": 8 },
26766
+ { "version": 2, "created_at": "2024-10-10T14:00:00.000Z", "fields_count": 4, "rules_count": 6 },
26767
+ { "version": 1, "created_at": "2024-10-01T09:00:00.000Z", "fields_count": 2, "rules_count": 3 }
26768
+ ]
26769
+ }`
26770
+ },
26771
+ { type: "heading", level: 2, id: "list-data-policy-versions-errors", text: "Errors" },
26772
+ {
26773
+ type: "param-table",
26774
+ title: "Error responses",
26775
+ params: [
26776
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
26777
+ { name: "404", type: "not_found", description: "Data policy not found or does not belong to your organization." },
26778
+ { name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
26779
+ ]
26780
+ }
26781
+ ],
26782
+ related: [
26783
+ { label: "Get Data Policy", slug: "get-data-policy" },
26784
+ { label: "Update Data Policy", slug: "update-data-policy" }
26785
+ ],
26786
+ faq: [
26787
+ { question: "How do I see which version a resolution used?", answer: "The `policy_snapshot` field on a resolution run includes the version number. Compare it with the version list to understand which configuration was active when the resolution executed." },
26788
+ { question: "Can I roll back to a previous version?", answer: "The API does not support direct rollback. To revert to a previous configuration, inspect the version history and manually re-apply the desired fields and rules, which creates a new version with the old configuration." }
26789
+ ],
26790
+ mentions: ["data policy", "transformation", "normalization", "version history"]
26791
+ },
26792
+ {
26793
+ slug: "list-data-policy-fields",
26794
+ parentSlug: "data-policies",
26795
+ title: "List Data Policy Fields",
26796
+ seoTitle: "List Data Policy Fields \u2014 Talonic Docs",
26797
+ description: "List the declared output fields of a data policy. Fields define the output contract \u2014 which field keys the policy produces and their expected types.",
26798
+ content: [
26799
+ { type: "paragraph", text: "Retrieve the list of declared output fields for a data policy. Fields define the output contract: the set of field keys that the policy executor will emit in resolution results. Only fields declared here appear in the final output; any intermediate values computed by rules but not declared as fields are discarded." },
26800
+ { type: "paragraph", text: "Each field has a `field_key` (the output column name) and a `type` (the expected value type). The field list is used by the resolution pipeline to validate output schema compliance and by the results UI to determine which columns to display. Adding or removing fields creates a new policy version." },
26801
+ {
26802
+ type: "endpoint",
26803
+ method: "GET",
26804
+ path: "/v1/data-policies/{id}/fields",
26805
+ summary: "List declared output fields for a data policy.",
26806
+ description: "Requires read scope.",
26807
+ blocks: [
26808
+ {
26809
+ type: "param-table",
26810
+ title: "Path parameters",
26811
+ params: [
26812
+ { name: "id", type: "uuid", required: true, description: "Data policy UUID." }
26813
+ ]
26814
+ }
26815
+ ]
26816
+ },
26817
+ { type: "heading", level: 2, id: "list-data-policy-fields-response", text: "Response" },
26818
+ {
26819
+ type: "param-table",
26820
+ title: "Response fields",
26821
+ params: [
26822
+ { name: "data", type: "array", description: "Array of field definition objects." },
26823
+ { name: "data[].field_key", type: "string", description: "Output field key name." },
26824
+ { name: "data[].type", type: "string", description: "Expected value type (e.g. string, number, date)." },
26825
+ { name: "data[].description", type: "string | null", description: "Optional field description." }
26826
+ ]
26827
+ },
26828
+ {
26829
+ type: "code",
26830
+ title: "curl",
26831
+ language: "bash",
26832
+ code: `curl -s https://api.talonic.ai/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890/fields \\
26833
+ -H "Authorization: Bearer tlnc_your_api_key"`
26834
+ },
26835
+ {
26836
+ type: "code",
26837
+ title: "Response",
26838
+ code: `{
26839
+ "data": [
26840
+ { "field_key": "country_code", "type": "string", "description": "ISO 3166-1 alpha-2 country code" },
26841
+ { "field_key": "currency", "type": "string", "description": "ISO 4217 currency code" },
26842
+ { "field_key": "invoice_date", "type": "date", "description": "Normalized invoice date in ISO 8601 format" }
26843
+ ]
26844
+ }`
26845
+ },
26846
+ { type: "heading", level: 2, id: "list-data-policy-fields-errors", text: "Errors" },
26847
+ {
26848
+ type: "param-table",
26849
+ title: "Error responses",
26850
+ params: [
26851
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
26852
+ { name: "404", type: "not_found", description: "Data policy not found or does not belong to your organization." },
26853
+ { name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
26854
+ ]
26855
+ }
26856
+ ],
26857
+ related: [
26858
+ { label: "Get Data Policy", slug: "get-data-policy" },
26859
+ { label: "List Data Policy Rules", slug: "list-data-policy-rules" },
26860
+ { label: "Schemas", slug: "list-schemas" }
26861
+ ],
26862
+ faq: [
26863
+ { question: "What happens to values not declared as fields?", answer: "Values computed by rules but not declared as policy fields are treated as intermediate variables and discarded from the final output. Only declared fields appear in resolution results. You can enable `emit_undeclared_cells` in pipeline config for debugging." },
26864
+ { question: "Can Lua scripts write to undeclared field keys?", answer: "Yes. Lua scripts can write to any cell name as a temporary variable for intermediate computation. However, only values written to declared field keys will appear in the resolution output. Undeclared keys are silently dropped unless debugging is enabled." }
26865
+ ],
26866
+ mentions: ["data policy", "transformation", "normalization", "Lua"]
26867
+ },
26868
+ {
26869
+ slug: "list-data-policy-rules",
26870
+ parentSlug: "data-policies",
26871
+ title: "List Data Policy Rules",
26872
+ seoTitle: "List Data Policy Rules \u2014 Talonic Docs",
26873
+ description: "List the transformation rules of a data policy. Rules define lookup cascades, Lua scripts, direct mappings, and computed fields executed during resolution.",
26874
+ content: [
26875
+ { type: "paragraph", text: "Retrieve the list of transformation rules for a data policy. Rules define the actual transformation logic executed during resolution: lookup cascades against reference tables, Lua scripting for custom logic, direct field-to-field mappings, deterministic computations, and format transformations. Rules are compiled into topological execution order based on field dependencies." },
26876
+ { type: "paragraph", text: "Each rule targets a specific output field and declares its rule type and configuration. The policy compiler validates that all rule dependencies are satisfiable and detects circular references at compile time. During execution, rules are processed in dependency order so that upstream fields are resolved before downstream rules that read from them." },
26877
+ {
26878
+ type: "endpoint",
26879
+ method: "GET",
26880
+ path: "/v1/data-policies/{id}/rules",
26881
+ summary: "List transformation rules for a data policy.",
26882
+ description: "Requires read scope.",
26883
+ blocks: [
26884
+ {
26885
+ type: "param-table",
26886
+ title: "Path parameters",
26887
+ params: [
26888
+ { name: "id", type: "uuid", required: true, description: "Data policy UUID." }
26889
+ ]
26890
+ }
26891
+ ]
26892
+ },
26893
+ { type: "heading", level: 2, id: "list-data-policy-rules-response", text: "Response" },
26894
+ {
26895
+ type: "param-table",
26896
+ title: "Response fields",
26897
+ params: [
26898
+ { name: "data", type: "array", description: "Array of rule objects." },
26899
+ { name: "data[].id", type: "string", description: "Rule UUID." },
26900
+ { name: "data[].field_key", type: "string", description: "Target output field key." },
26901
+ { name: "data[].rule_type", type: "string", description: "Rule type (e.g. lookup, direct, lua, compute, format)." },
26902
+ { name: "data[].config", type: "object", description: "Rule-type-specific configuration." },
26903
+ { name: "data[].order", type: "integer", description: "Execution order within the compiled pipeline." }
26904
+ ]
26905
+ },
26906
+ {
26907
+ type: "code",
26908
+ title: "curl",
26909
+ language: "bash",
26910
+ code: `curl -s https://api.talonic.ai/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890/rules \\
26911
+ -H "Authorization: Bearer tlnc_your_api_key"`
26912
+ },
26913
+ {
26914
+ type: "code",
26915
+ title: "Response",
26916
+ code: `{
26917
+ "data": [
26918
+ {
26919
+ "id": "r1a2b3c4-0001",
26920
+ "field_key": "country_code",
26921
+ "rule_type": "lookup",
26922
+ "config": {
26923
+ "table": "country_codes",
26924
+ "source_field": "country",
26925
+ "fallback": "llm"
26926
+ },
26927
+ "order": 1
26928
+ },
26929
+ {
26930
+ "id": "r1a2b3c4-0002",
26931
+ "field_key": "currency",
26932
+ "rule_type": "lua",
26933
+ "config": {
26934
+ "script": "if cell.country_code == 'US' then return 'USD' end"
26935
+ },
26936
+ "order": 2
26937
+ }
26938
+ ]
26939
+ }`
26940
+ },
26941
+ { type: "heading", level: 2, id: "list-data-policy-rules-errors", text: "Errors" },
26942
+ {
26943
+ type: "param-table",
26944
+ title: "Error responses",
26945
+ params: [
26946
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
26947
+ { name: "404", type: "not_found", description: "Data policy not found or does not belong to your organization." },
26948
+ { name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
26949
+ ]
26950
+ }
26951
+ ],
26952
+ related: [
26953
+ { label: "Get Data Policy", slug: "get-data-policy" },
26954
+ { label: "List Data Policy Fields", slug: "list-data-policy-fields" },
26955
+ { label: "Resolutions", slug: "list-resolutions" }
26956
+ ],
26957
+ faq: [
26958
+ { question: "What rule types are available?", answer: "Data policies support 14 rule types: `lookup` (reference table matching with optional LLM fallback), `direct` (field-to-field mapping), `lua` (custom Lua scripting), `compute` (deterministic formulas), `format` (string formatting), `coalesce`, `constant`, `concat`, `split`, `regex`, `date_format`, `number_format`, `conditional`, and `aggregate`." },
26959
+ { question: "How does the Lua scripting work?", answer: "Lua rules execute a sandboxed Lua 5.4 chunk for each record. The script receives a `cell` table with the current record values and can call chain methods like `:matches()` for reference table matching and `:llm_match()` for LLM-powered fuzzy matching. Scripts return the resolved value for the target field." },
26960
+ { question: "What happens when a lookup fails to find a match?", answer: "Lookup rules support a 3-tier cascade: string normalization (exact match after lowercasing and trimming), token-based fuzzy matching (Jaccard similarity), and an optional LLM fallback (Haiku). If all tiers fail, the field retains its original value. Configure the `fallback` option in the rule config to control cascade behavior." }
26961
+ ],
26962
+ mentions: ["data policy", "transformation", "normalization", "lookup", "Lua"]
26963
+ }
26964
+ ];
26965
+
26966
+ // src/content/api/record-sets.ts
26967
+ var sections52 = [
26968
+ {
26969
+ slug: "list-record-sets",
26970
+ parentSlug: "record-sets",
26971
+ title: "List Record Sets",
26972
+ seoTitle: "List Record Sets Endpoint \u2014 Talonic Docs",
26973
+ description: "List record sets across the value plane with cursor-based pagination. Filter by layer (capture, structured, resolved, product) to find sets at specific pipeline stages.",
26974
+ content: [
26975
+ { type: "paragraph", text: "Record sets are the core storage abstraction in the Talonic value plane. Each record set is a table-like collection of records at a specific layer of the pipeline. The value plane organizes data into four layers: **capture** (raw OCR output), **structured** (extracted field values), **resolved** (normalized canonical values), and **product** (final assembled output). Record sets at each layer share the same underlying cell storage model but represent progressively refined data." },
26976
+ { type: "paragraph", text: "Use this endpoint to list all record sets in your workspace. Filter by `layer` to find sets at a specific pipeline stage, or by `source_type` to locate sets from a particular origin. Results support cursor-based pagination and can be sorted by creation date. Each record set contains typed cells with confidence scores and provenance metadata." },
26977
+ {
26978
+ type: "endpoint",
26979
+ method: "GET",
26980
+ path: "/v1/record-sets",
26981
+ summary: "List record sets with optional layer and source type filters.",
26982
+ description: "Requires read scope.",
26983
+ blocks: [
26984
+ {
26985
+ type: "param-table",
26986
+ title: "Query parameters",
26987
+ params: [
26988
+ { name: "layer", type: "string", description: "Filter by value plane layer: capture, structured, resolved, or product." },
26989
+ { name: "source_type", type: "string", description: "Filter by source type (e.g. extraction, resolution, job)." },
26990
+ { name: "limit", type: "integer", default: "20", description: "Maximum number of items to return (1-100)." },
26991
+ { name: "cursor", type: "string", description: "Opaque pagination cursor from a previous response." },
26992
+ { name: "order", type: "string", default: "desc", description: "Sort order by creation date (asc | desc)." }
26993
+ ]
26994
+ }
26995
+ ]
26996
+ },
26997
+ { type: "heading", level: 2, id: "list-record-sets-response", text: "Response" },
26998
+ {
26999
+ type: "param-table",
27000
+ title: "Response fields",
27001
+ params: [
27002
+ { name: "data", type: "array", description: "Array of record set objects." },
27003
+ { name: "data[].id", type: "string", description: "Record set UUID." },
27004
+ { name: "data[].name", type: "string", description: "Human-readable record set name." },
27005
+ { name: "data[].layer", type: "string", description: "Value plane layer: capture, structured, resolved, or product." },
27006
+ { name: "data[].source_type", type: "string", description: "Origin type that created this record set." },
27007
+ { name: "data[].source_id", type: "string", description: "UUID of the source entity (e.g. extraction run, job run)." },
27008
+ { name: "data[].record_count", type: "integer", description: "Total number of records in this set." },
27009
+ { name: "data[].field_count", type: "integer", description: "Number of fields defined on this set." },
27010
+ { name: "data[].created_at", type: "string", description: "ISO 8601 creation timestamp." },
27011
+ { name: "data[].updated_at", type: "string", description: "ISO 8601 last update timestamp." }
27012
+ ]
27013
+ },
27014
+ {
27015
+ type: "code",
27016
+ title: "curl",
27017
+ language: "bash",
27018
+ code: `curl -s "https://api.talonic.ai/v1/record-sets?layer=resolved&limit=10" \\
27019
+ -H "Authorization: Bearer tlnc_your_api_key"`
27020
+ },
27021
+ {
27022
+ type: "code",
27023
+ title: "Response",
27024
+ code: `{
27025
+ "data": [
27026
+ {
27027
+ "id": "rs-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
27028
+ "name": "Resolution Run 2024-10-15",
27029
+ "layer": "resolved",
27030
+ "source_type": "resolution",
27031
+ "source_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
27032
+ "record_count": 142,
27033
+ "field_count": 12,
27034
+ "created_at": "2024-10-15T11:30:00.000Z",
27035
+ "updated_at": "2024-10-15T11:35:42.000Z"
27036
+ }
27037
+ ],
27038
+ "cursor": "eyJpZCI6InJzLWExYjJjM2Q0In0="
27039
+ }`
27040
+ },
27041
+ { type: "heading", level: 2, id: "list-record-sets-errors", text: "Errors" },
27042
+ {
27043
+ type: "param-table",
27044
+ title: "Error responses",
27045
+ params: [
27046
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
27047
+ { name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
27048
+ ]
27049
+ }
27050
+ ],
27051
+ related: [
27052
+ { label: "Extractions", slug: "list-extractions" },
27053
+ { label: "Jobs", slug: "list-jobs" },
27054
+ { label: "Resolutions", slug: "list-resolutions" }
27055
+ ],
27056
+ faq: [
27057
+ { question: "What are the value plane layers?", answer: "The value plane has four layers: **capture** (raw OCR/parsed text), **structured** (extracted field values from Claude), **resolved** (normalized canonical values from resolution), and **product** (final assembled output ready for delivery). Each layer represents a progressive refinement of the data." },
27058
+ { question: "What is a record set?", answer: "A record set is a table-like collection of records at a specific value plane layer. It provides typed cell storage where each cell holds a value, confidence score, status, and provenance trace. Record sets are the primary read model for hot table operations in the platform." },
27059
+ { question: "How do record sets relate to jobs and resolutions?", answer: "Job runs produce record sets at the **structured** layer (extracted values). Resolution runs consume structured record sets and produce new record sets at the **resolved** layer (normalized values). The `source_type` and `source_id` fields let you trace each record set back to its origin." }
27060
+ ],
27061
+ mentions: ["record set", "value plane", "cell", "provenance", "confidence"]
27062
+ },
27063
+ {
27064
+ slug: "get-record-set",
27065
+ parentSlug: "record-sets",
27066
+ title: "Get Record Set",
27067
+ seoTitle: "Get Record Set Endpoint \u2014 Talonic Docs",
27068
+ description: "Retrieve a single record set by ID with its layer, source reference, record count, and field count. Requires read scope for the workspace.",
27069
+ content: [
27070
+ { type: "paragraph", text: "Retrieve the full metadata of a specific record set by its UUID. The response includes the value plane layer, source entity reference, record and field counts, and timestamps. Use this endpoint to inspect a record set before fetching its fields or records." },
27071
+ { type: "paragraph", text: "The `layer` field tells you where this record set sits in the pipeline progression. The `source_type` and `source_id` fields let you trace the record set back to the extraction, job, or resolution run that created it. The `record_count` and `field_count` give you a quick summary of the dataset size without fetching the actual records." },
27072
+ {
27073
+ type: "endpoint",
27074
+ method: "GET",
27075
+ path: "/v1/record-sets/{id}",
27076
+ summary: "Get a single record set by ID.",
27077
+ description: "Requires read scope.",
27078
+ blocks: [
27079
+ {
27080
+ type: "param-table",
27081
+ title: "Path parameters",
27082
+ params: [
27083
+ { name: "id", type: "uuid", required: true, description: "Record set UUID." }
27084
+ ]
27085
+ }
27086
+ ]
27087
+ },
27088
+ { type: "heading", level: 2, id: "get-record-set-response", text: "Response" },
27089
+ {
27090
+ type: "param-table",
27091
+ title: "Response fields",
27092
+ params: [
27093
+ { name: "id", type: "string", description: "Record set UUID." },
27094
+ { name: "name", type: "string", description: "Human-readable name." },
27095
+ { name: "layer", type: "string", description: "Value plane layer: capture, structured, resolved, or product." },
27096
+ { name: "source_type", type: "string", description: "Origin type that created this record set." },
27097
+ { name: "source_id", type: "string", description: "UUID of the source entity." },
27098
+ { name: "record_count", type: "integer", description: "Total number of records." },
27099
+ { name: "field_count", type: "integer", description: "Number of defined fields." },
27100
+ { name: "created_at", type: "string", description: "ISO 8601 creation timestamp." },
27101
+ { name: "updated_at", type: "string", description: "ISO 8601 last update timestamp." }
27102
+ ]
27103
+ },
27104
+ {
27105
+ type: "code",
27106
+ title: "curl",
27107
+ language: "bash",
27108
+ code: `curl -s https://api.talonic.ai/v1/record-sets/rs-a1b2c3d4-e5f6-7890-abcd-ef1234567890 \\
27109
+ -H "Authorization: Bearer tlnc_your_api_key"`
27110
+ },
27111
+ {
27112
+ type: "code",
27113
+ title: "Response",
27114
+ code: `{
27115
+ "id": "rs-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
27116
+ "name": "Resolution Run 2024-10-15",
27117
+ "layer": "resolved",
27118
+ "source_type": "resolution",
27119
+ "source_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
27120
+ "record_count": 142,
27121
+ "field_count": 12,
27122
+ "created_at": "2024-10-15T11:30:00.000Z",
27123
+ "updated_at": "2024-10-15T11:35:42.000Z"
27124
+ }`
27125
+ },
27126
+ { type: "heading", level: 2, id: "get-record-set-errors", text: "Errors" },
27127
+ {
27128
+ type: "param-table",
27129
+ title: "Error responses",
27130
+ params: [
27131
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
27132
+ { name: "404", type: "not_found", description: "Record set not found or does not belong to your organization." },
27133
+ { name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
27134
+ ]
27135
+ }
27136
+ ],
27137
+ related: [
27138
+ { label: "List Record Sets", slug: "list-record-sets" },
27139
+ { label: "List Record Set Fields", slug: "list-record-set-fields" },
27140
+ { label: "List Record Set Records", slug: "list-record-set-records" }
27141
+ ],
27142
+ faq: [
27143
+ { question: "How do I find which job or resolution produced a record set?", answer: 'The `source_type` field indicates the origin (e.g. "extraction", "job", "resolution") and the `source_id` is the UUID of that entity. Use the corresponding GET endpoint to retrieve the full source details.' },
27144
+ { question: "What does record_count represent?", answer: "The `record_count` is the total number of records (rows) in the set. For structured and resolved layers, each record typically corresponds to one document. For the product layer, records correspond to assembled output rows." }
27145
+ ],
27146
+ mentions: ["record set", "value plane", "cell", "provenance", "confidence"]
27147
+ },
27148
+ {
27149
+ slug: "list-record-set-fields",
27150
+ parentSlug: "record-sets",
27151
+ title: "List Record Set Fields",
27152
+ seoTitle: "List Record Set Fields \u2014 Talonic Docs",
27153
+ description: "List the field definitions of a record set including field keys, types, and display metadata. Fields define the columns available in the record set.",
27154
+ content: [
27155
+ { type: "paragraph", text: "Retrieve the field definitions for a record set. Fields define the columns available in the set \u2014 each field has a key (column name), a type, and optional display metadata. The field list determines which cell values can appear in each record and how they should be interpreted by downstream consumers." },
27156
+ { type: "paragraph", text: "Field definitions are derived from the schema used during extraction or the policy used during resolution. They include the field key, value type, and optional attributes like display name and description. Use this endpoint to understand the shape of the data before fetching records, or to build dynamic table UIs that adapt to the field list." },
27157
+ {
27158
+ type: "endpoint",
27159
+ method: "GET",
27160
+ path: "/v1/record-sets/{id}/fields",
27161
+ summary: "List field definitions for a record set.",
27162
+ description: "Requires read scope.",
27163
+ blocks: [
27164
+ {
27165
+ type: "param-table",
27166
+ title: "Path parameters",
27167
+ params: [
27168
+ { name: "id", type: "uuid", required: true, description: "Record set UUID." }
27169
+ ]
27170
+ }
27171
+ ]
27172
+ },
27173
+ { type: "heading", level: 2, id: "list-record-set-fields-response", text: "Response" },
27174
+ {
27175
+ type: "param-table",
27176
+ title: "Response fields",
27177
+ params: [
27178
+ { name: "data", type: "array", description: "Array of field definition objects." },
27179
+ { name: "data[].field_key", type: "string", description: "Field key (column name)." },
27180
+ { name: "data[].type", type: "string", description: "Value type (e.g. string, number, date, boolean)." },
27181
+ { name: "data[].display_name", type: "string | null", description: "Human-readable display name." },
27182
+ { name: "data[].description", type: "string | null", description: "Optional field description." },
27183
+ { name: "data[].ordinal", type: "integer", description: "Display order position." }
27184
+ ]
27185
+ },
27186
+ {
27187
+ type: "code",
27188
+ title: "curl",
27189
+ language: "bash",
27190
+ code: `curl -s https://api.talonic.ai/v1/record-sets/rs-a1b2c3d4-e5f6-7890-abcd-ef1234567890/fields \\
27191
+ -H "Authorization: Bearer tlnc_your_api_key"`
27192
+ },
27193
+ {
27194
+ type: "code",
27195
+ title: "Response",
27196
+ code: `{
27197
+ "data": [
27198
+ { "field_key": "invoice_number", "type": "string", "display_name": "Invoice Number", "description": null, "ordinal": 0 },
27199
+ { "field_key": "vendor_name", "type": "string", "display_name": "Vendor Name", "description": null, "ordinal": 1 },
27200
+ { "field_key": "total_amount", "type": "number", "display_name": "Total Amount", "description": "Invoice total in local currency", "ordinal": 2 },
27201
+ { "field_key": "invoice_date", "type": "date", "display_name": "Invoice Date", "description": null, "ordinal": 3 }
27202
+ ]
27203
+ }`
27204
+ },
27205
+ { type: "heading", level: 2, id: "list-record-set-fields-errors", text: "Errors" },
27206
+ {
27207
+ type: "param-table",
27208
+ title: "Error responses",
27209
+ params: [
27210
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
27211
+ { name: "404", type: "not_found", description: "Record set not found or does not belong to your organization." },
27212
+ { name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
27213
+ ]
27214
+ }
27215
+ ],
27216
+ related: [
27217
+ { label: "Get Record Set", slug: "get-record-set" },
27218
+ { label: "List Record Set Records", slug: "list-record-set-records" },
27219
+ { label: "Extractions", slug: "list-extractions" }
27220
+ ],
27221
+ faq: [
27222
+ { question: "Where do the field definitions come from?", answer: "Field definitions are derived from the user schema (for structured layer sets) or the data policy output contract (for resolved layer sets). They represent the declared columns that the extraction or resolution pipeline was configured to produce." },
27223
+ { question: "Can different record sets have different fields?", answer: "Yes. Each record set has its own independent field definitions. A structured record set may have different fields than a resolved record set, even if they originate from the same documents, because the resolution policy may add, rename, or transform fields." }
27224
+ ],
27225
+ mentions: ["record set", "value plane", "cell", "field definition"]
27226
+ },
27227
+ {
27228
+ slug: "list-record-set-records",
27229
+ parentSlug: "record-sets",
27230
+ title: "List Record Set Records",
27231
+ seoTitle: "List Record Set Records \u2014 Talonic Docs",
27232
+ description: "List records in a record set with offset-based pagination. Each record contains typed cells with values, confidence scores, and provenance metadata.",
27233
+ content: [
27234
+ { type: "paragraph", text: "Retrieve the records (rows) in a record set with offset-based pagination. Each record contains a set of typed cells keyed by field name. Every cell carries a value, a confidence score (0-1), a status indicator, and provenance metadata tracing the value back to its source. This endpoint is the primary way to read structured data from the value plane." },
27235
+ { type: "paragraph", text: "Unlike the cursor-based pagination used by most list endpoints, record set records use offset-based pagination with `page` and `limit` parameters. This is intentional: record sets are table-like structures where random access by page number is a common use case for building paginated table UIs. The total record count is available on the parent record set object." },
27236
+ {
27237
+ type: "endpoint",
27238
+ method: "GET",
27239
+ path: "/v1/record-sets/{id}/records",
27240
+ summary: "List records with typed cells, confidence, and provenance.",
27241
+ description: "Requires read scope. Uses offset-based pagination.",
27242
+ blocks: [
27243
+ {
27244
+ type: "param-table",
27245
+ title: "Path parameters",
27246
+ params: [
27247
+ { name: "id", type: "uuid", required: true, description: "Record set UUID." }
27248
+ ]
27249
+ },
27250
+ {
27251
+ type: "param-table",
27252
+ title: "Query parameters",
27253
+ params: [
27254
+ { name: "page", type: "integer", default: "1", description: "Page number (1-indexed)." },
27255
+ { name: "limit", type: "integer", default: "20", description: "Number of records per page (1-100)." }
27256
+ ]
27257
+ }
27258
+ ]
27259
+ },
27260
+ { type: "heading", level: 2, id: "list-record-set-records-response", text: "Response" },
27261
+ {
27262
+ type: "param-table",
27263
+ title: "Response fields",
27264
+ params: [
27265
+ { name: "data", type: "array", description: "Array of record objects." },
27266
+ { name: "data[].id", type: "string", description: "Record UUID." },
27267
+ { name: "data[].document_id", type: "string | null", description: "Associated document UUID, if applicable." },
27268
+ { name: "data[].cells", type: "object", description: "Map of field_key to cell objects." },
27269
+ { name: "data[].cells[key].value", type: "string | null", description: "The cell value." },
27270
+ { name: "data[].cells[key].confidence", type: "number", description: "Confidence score (0-1)." },
27271
+ { name: "data[].cells[key].status", type: "string", description: "Cell status (e.g. extracted, resolved, manual)." },
27272
+ { name: "data[].cells[key].source", type: "string | null", description: "Provenance trace indicating how the value was produced." },
27273
+ { name: "page", type: "integer", description: "Current page number." },
27274
+ { name: "total", type: "integer", description: "Total number of records." }
27275
+ ]
27276
+ },
27277
+ {
27278
+ type: "code",
27279
+ title: "curl",
27280
+ language: "bash",
27281
+ code: `curl -s "https://api.talonic.ai/v1/record-sets/rs-a1b2c3d4-e5f6-7890-abcd-ef1234567890/records?page=1&limit=10" \\
27282
+ -H "Authorization: Bearer tlnc_your_api_key"`
27283
+ },
27284
+ {
27285
+ type: "code",
27286
+ title: "Response",
27287
+ code: `{
27288
+ "data": [
27289
+ {
27290
+ "id": "rec-f1e2d3c4-b5a6-7890-fedc-ba0987654321",
27291
+ "document_id": "doc-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
27292
+ "cells": {
27293
+ "invoice_number": {
27294
+ "value": "INV-2024-0042",
27295
+ "confidence": 0.97,
27296
+ "status": "extracted",
27297
+ "source": "chunk:3/line:12"
27298
+ },
27299
+ "country_code": {
27300
+ "value": "DE",
27301
+ "confidence": 0.95,
27302
+ "status": "resolved",
27303
+ "source": "lookup:country_codes"
27304
+ }
27305
+ }
27306
+ }
27307
+ ],
27308
+ "page": 1,
27309
+ "total": 142
27310
+ }`
27311
+ },
27312
+ { type: "heading", level: 2, id: "list-record-set-records-errors", text: "Errors" },
27313
+ {
27314
+ type: "param-table",
27315
+ title: "Error responses",
27316
+ params: [
27317
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
27318
+ { name: "404", type: "not_found", description: "Record set not found or does not belong to your organization." },
27319
+ { name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
27320
+ ]
27321
+ }
27322
+ ],
27323
+ related: [
27324
+ { label: "Get Record Set", slug: "get-record-set" },
27325
+ { label: "List Record Set Fields", slug: "list-record-set-fields" },
27326
+ { label: "Export Record Set", slug: "export-record-set" }
27327
+ ],
27328
+ faq: [
27329
+ { question: "What does the confidence score mean?", answer: "The confidence score (0-1) reflects how certain the system is about the cell value. Values extracted directly from documents with high textual clarity score 0.9+. Values resolved via fuzzy matching or LLM fallback score lower (0.5-0.9). Manually entered values always have confidence 1.0." },
27330
+ { question: "What does the source field contain?", answer: "The `source` field is a provenance trace that indicates how the value was produced. For extracted values, it references the document chunk and line. For resolved values, it references the lookup table or resolution strategy. For computed values, it names the computation formula." },
27331
+ { question: "Why does this endpoint use page/limit instead of cursor?", answer: "Record sets are table-like structures where random access by page number is common in table UIs. Offset pagination supports jumping to arbitrary pages, which cursor pagination does not. For sequential traversal of very large sets, use the export endpoint instead." }
27332
+ ],
27333
+ mentions: ["record set", "value plane", "cell", "provenance", "confidence"]
27334
+ },
27335
+ {
27336
+ slug: "export-record-set",
27337
+ parentSlug: "record-sets",
27338
+ title: "Export Record Set",
27339
+ seoTitle: "Export Record Set Endpoint \u2014 Talonic Docs",
27340
+ description: "Export a complete record set as a downloadable file. Returns all records with their cell values in a single response for bulk consumption.",
27341
+ content: [
27342
+ { type: "paragraph", text: "Export the complete contents of a record set as a downloadable payload. Unlike the paginated records endpoint, this returns all records in a single response, making it suitable for bulk data consumption, ETL pipelines, and offline analysis. The export includes all cell values for every record in the set." },
27343
+ { type: "paragraph", text: "The export endpoint streams the full record set content without pagination. For large record sets, this may result in significant response payloads. Consider using the paginated records endpoint for interactive use cases, and reserve this endpoint for batch export workflows where you need the complete dataset in one call." },
27344
+ {
27345
+ type: "endpoint",
27346
+ method: "GET",
27347
+ path: "/v1/record-sets/{id}/export",
27348
+ summary: "Export a complete record set.",
27349
+ description: "Requires read scope. Returns all records without pagination.",
27350
+ blocks: [
27351
+ {
27352
+ type: "param-table",
27353
+ title: "Path parameters",
27354
+ params: [
27355
+ { name: "id", type: "uuid", required: true, description: "Record set UUID." }
27356
+ ]
27357
+ }
27358
+ ]
27359
+ },
27360
+ { type: "heading", level: 2, id: "export-record-set-response", text: "Response" },
27361
+ {
27362
+ type: "param-table",
27363
+ title: "Response fields",
27364
+ params: [
27365
+ { name: "data", type: "array", description: "Complete array of record objects with cells." },
27366
+ { name: "fields", type: "array", description: "Array of field definitions for column ordering." },
27367
+ { name: "record_count", type: "integer", description: "Total number of exported records." },
27368
+ { name: "exported_at", type: "string", description: "ISO 8601 timestamp of the export." }
27369
+ ]
27370
+ },
27371
+ {
27372
+ type: "code",
27373
+ title: "curl",
27374
+ language: "bash",
27375
+ code: `curl -s https://api.talonic.ai/v1/record-sets/rs-a1b2c3d4-e5f6-7890-abcd-ef1234567890/export \\
27376
+ -H "Authorization: Bearer tlnc_your_api_key"`
27377
+ },
27378
+ {
27379
+ type: "code",
27380
+ title: "Response",
27381
+ code: `{
27382
+ "data": [
27383
+ {
27384
+ "id": "rec-f1e2d3c4-b5a6-7890-fedc-ba0987654321",
27385
+ "document_id": "doc-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
27386
+ "cells": {
27387
+ "invoice_number": { "value": "INV-2024-0042", "confidence": 0.97 },
27388
+ "country_code": { "value": "DE", "confidence": 0.95 }
27389
+ }
27390
+ }
27391
+ ],
27392
+ "fields": [
27393
+ { "field_key": "invoice_number", "type": "string", "ordinal": 0 },
27394
+ { "field_key": "country_code", "type": "string", "ordinal": 1 }
27395
+ ],
27396
+ "record_count": 142,
27397
+ "exported_at": "2024-10-16T09:00:00.000Z"
27398
+ }`
27399
+ },
27400
+ { type: "heading", level: 2, id: "export-record-set-errors", text: "Errors" },
27401
+ {
27402
+ type: "param-table",
27403
+ title: "Error responses",
27404
+ params: [
27405
+ { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
27406
+ { name: "404", type: "not_found", description: "Record set not found or does not belong to your organization." },
27407
+ { name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
27408
+ ]
27409
+ }
27410
+ ],
27411
+ related: [
27412
+ { label: "List Record Set Records", slug: "list-record-set-records" },
27413
+ { label: "Extractions", slug: "list-extractions" },
27414
+ { label: "Jobs", slug: "list-jobs" },
27415
+ { label: "Resolutions", slug: "list-resolutions" }
27416
+ ],
27417
+ faq: [
27418
+ { question: "When should I use export vs the paginated records endpoint?", answer: "Use the export endpoint for batch workflows, ETL pipelines, and offline analysis where you need the complete dataset in one call. Use the paginated records endpoint for interactive UIs, incremental processing, or when working with very large record sets where memory is a concern." },
27419
+ { question: "Does the export include confidence and provenance?", answer: "The export includes cell values and confidence scores. Full provenance traces are available through the paginated records endpoint. The export is optimized for bulk data consumption rather than detailed audit trails." },
27420
+ { question: "Is there a size limit on exports?", answer: "There is no hard limit, but very large record sets (10,000+ records) may result in large response payloads and slower response times. For extremely large datasets, consider using the delivery pipeline to push data to an S3 bucket or SFTP server instead." }
27421
+ ],
27422
+ mentions: ["record set", "value plane", "cell", "export", "bulk"]
27423
+ }
27424
+ ];
27425
+
25909
27426
  // src/content/sdk/sections.json
25910
27427
  var sections_default = [
25911
27428
  {
@@ -26174,7 +27691,7 @@ talonic --help` }
26174
27691
  ];
26175
27692
 
26176
27693
  // src/content/sdk/index.ts
26177
- var sections50 = sections_default;
27694
+ var sections53 = sections_default;
26178
27695
 
26179
27696
  // src/content/mcp/sections.json
26180
27697
  var sections_default2 = [
@@ -27848,7 +29365,7 @@ var sections_default2 = [
27848
29365
  ];
27849
29366
 
27850
29367
  // src/content/mcp/index.ts
27851
- var sections51 = sections_default2;
29368
+ var sections54 = sections_default2;
27852
29369
 
27853
29370
  // src/content/index.ts
27854
29371
  var ALL_PLATFORM_RAW = [
@@ -27902,10 +29419,13 @@ var ALL_API_RAW = [
27902
29419
  ...sections47,
27903
29420
  ...sections48,
27904
29421
  ...sections49,
29422
+ ...sections50,
29423
+ ...sections51,
29424
+ ...sections52,
27905
29425
  ...sections45
27906
29426
  ];
27907
- var ALL_SDK_RAW = [...sections50];
27908
- var ALL_MCP_RAW = [...sections51];
29427
+ var ALL_SDK_RAW = [...sections53];
29428
+ var ALL_MCP_RAW = [...sections54];
27909
29429
  function enrich(raw, navSections, domain) {
27910
29430
  return raw.map((r) => {
27911
29431
  const { prev, next } = derivePrevNext(navSections, r.slug);