Skip to main content

Get Data Policy

Retrieve a data policy by ID with its current version's fields and rules inlined: the full output contract and transformation logic in one API 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.

GET/v1/data-policies/{id}

Path parameters

id*uuidData policy UUID.

Response

Response fields

idstringData policy UUID.
namestringPolicy name.
descriptionstring | nullPolicy description.
statusstringPolicy status (e.g. draft, published).
fieldsarrayDeclared output fields from the policy's current version.
fields[].idstringField row UUID.
fields[].field_keystringOutput field key name.
fields[].data_typestringDeclared value type (e.g. string, number, date).
fields[].source_schema_field_idstring | nullSchema field this output is bound to, if any.
fields[].positionintegerDisplay/output order of the field.
rulesarrayTransformation rules from the policy's current version, in execution order.
rules[].idstringRule UUID.
rules[].rule_typestringRule type (e.g. select_field, transform, lookup_exact, script).
rules[].input_field_keysarrayField keys the rule reads.
rules[].output_field_keystring | nullField key the rule writes.
rules[].configobjectRule-type-specific configuration.
rules[].execution_orderintegerPosition in the compiled execution order.
rules[].error_behaviorstring | nullWhat happens when the rule fails (e.g. flag, set_empty, skip, fail, default_value, ignore).
created_atstringISO 8601 creation timestamp.
updated_atstringISO 8601 last update timestamp.

curl

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

401unauthorizedMissing or invalid API key.
404not_foundData policy not found or does not belong to your organization.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.
A policy with no version yet (freshly created, nothing authored) returns empty fields and rules arrays. The inlined configuration always reflects the current version, not historical ones.