Get Data Policy
Retrieve a data policy by ID with its current version's fields and rules inlined: the full output contract, transform logic, and execution order in one call.
Retrieve one data policy with its fields and rules inlined, giving you the entire transformation configuration in a single call. The inlined fields and rules are read from the policy's current version, so what you see is exactly what a resolution run would execute. This is the endpoint for auditing transformation logic or debugging resolution results.
The fields array is the output contract: which field keys the policy emits and their data types. The rules array is the logic: each rule declares its rule_type, the input field keys it reads, the output field key it writes, its configuration, and its position in the compiled execution order. Rules execute in dependency order, so upstream values exist before downstream rules read them.
Use this read to debug a resolution: when a resolved value looks wrong, find the rule whose output_field_key matches the field, check its execution_order to see what ran before it, and inspect config for the lookup table or script it applied. error_behavior tells you what the executor did on failure — a rule set to flag keeps the value but marks it for review, which is why a failed lookup can still show a value in the output.
The response also carries the policy header — status, timestamps, and the links object with the subresource URLs — so one call gives you everything needed to render, audit, or export the policy. Exporting this JSON into version control before editing gives you a recoverable record of the configuration: the API has no rollback, so re-applying an exported contract is the way back to a known-good state.
/v1/data-policies/{id}Path parameters
Response
Response fields
curl
curl -s https://api.talonic.com/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer tlnc_your_api_key"Response
{
"id": "p1a2b3c4-e5f6-7890-abcd-ef1234567890",
"name": "Invoice Normalization",
"description": "Standardize currency codes, country names, and date formats",
"status": "published",
"fields": [
{
"id": "f1a2b3c4-0001",
"field_key": "country_code",
"data_type": "string",
"source_schema_field_id": null,
"position": 1
}
],
"rules": [
{
"id": "r1a2b3c4-0001",
"rule_type": "lookup_exact",
"input_field_keys": ["country"],
"output_field_key": "country_code",
"config": { "reference_table_id": "country_codes", "search_column": "name", "output_column": "iso2" },
"execution_order": 1,
"error_behavior": "flag"
}
],
"created_at": "2024-10-01T09:00:00.000Z",
"updated_at": "2024-10-15T11:30:00.000Z"
}Errors
Error responses
fields and rules arrays — version 1 exists from creation, but nothing is authored on it yet. The inlined configuration always reflects the current version, not historical ones.