Skip to main content

Master Records Configuration

Read, check and save the Master Records configuration: per-domain read-only SQL sources, change logs, open items and thresholds. Saving needs an owner key.

GET /v1/master-records/config returns the saved configuration, or an object with empty domains when none is saved. PUT /v1/master-records/config replaces the stored configuration with the one in the body. The whole configuration replaces the stored one, so send every domain you want to keep. The PUT needs the write scope and an owner (Admin) key person; it is the only route of this surface with that tier.

Each configured domain needs at least one source with a unique label, an existing SQL connection of the workspace, and a single read-only SELECT, checked for the connection's engine. The optional changes and open_items queries must name one of the domain's sources by label. Thresholds are between 0 and 1, exclusive, and review_threshold does not exceed auto_threshold. A configuration that fails these checks is refused with 400 and nothing is stored. With dry_run: true the configuration is only checked and the response has saved: false.

GET/v1/master-records/config
PUT/v1/master-records/config

Body fields

config*objectThe configuration: { domains: { vendors, customers, materials } }.
dry_runbooleanCheck the configuration without saving it.

config.domains.<domain> fields

sources[]*arraySystems of record, in survivorship priority order (the first wins a tie). At least one.
sources[].label*stringDisplay label of the system, for example ERP-IFF. Up to 60 characters, unique within the domain, and part of every member key.
sources[].connection_id*uuidA SQL connection of the workspace.
sources[].sql*stringOne read-only SELECT, up to 20000 characters. Sources alias their columns to the domain's canonical fields.
changes[]arrayChange logs. Each label names one of the domain's sources; the query returns changed_at, id, field, old_value, new_value and optionally changed_by.
open_items[]arrayOpen payables per record. Each label names one of the domain's sources; the query returns id and amount.
evidenceobjectDocuments that must back a bank-detail change: schema_id (the Spec's schema id) and fields { party, iban, references?, date?, kind? }, read from the latest completed run of that Spec.
auto_thresholdnumberPair probability, above 0 and below 1, at or above which a match merges without review. The default comes from the platform configuration.
review_thresholdnumberPair probability at or above which a match is proposed for review. Does not exceed auto_threshold.

cURL: Save a configuration with a change log

curl -X PUT "https://api.talonic.com/v1/master-records/config" \
  -H "Authorization: Bearer $TALONIC_OWNER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "config": {
      "domains": {
        "vendors": {
          "sources": [
            { "label": "ERP-A", "connection_id": "c2f4a6e8-1b3d-4f5a-8c7e-9d0b1a2c3e4f", "sql": "SELECT lifnr AS id, name1 AS name, stcd1 AS tax_id, land1 AS country, iban FROM vendors" },
            { "label": "ERP-B", "connection_id": "7e5d3b1a-9c8f-4a6e-b2d0-1f3a5c7e9b2d", "sql": "SELECT vendor_no AS id, vendor_name AS name, vat_no AS tax_id, country, iban FROM ap_vendor" }
          ],
          "changes": [
            { "label": "ERP-A", "connection_id": "c2f4a6e8-1b3d-4f5a-8c7e-9d0b1a2c3e4f", "sql": "SELECT changed_at, id, field, old_value, new_value, changed_by FROM vendor_changes" }
          ],
          "review_threshold": 0.6,
          "auto_threshold": 0.9
        }
      }
    }
  }'

Response: 200 Saved

{ "config": { "domains": { "vendors": { "sources": [ { "label": "ERP-A" }, { "label": "ERP-B" } ] } } }, "saved": true }
Every query passes a read-only check for its connection's engine when the configuration is saved and again at run time, and the connection's host is checked before the platform connects. A source that does not alias id and name fails the run with 400, not the save.

Frequently asked questions

What happens to domains I omit from a PUT?+
The whole configuration replaces the stored one, so a domain left out of the body is no longer configured. Read the configuration with GET, change it, and send the whole object back.
Why does my SELECT get rejected?+
Each query must be one read-only SELECT, checked for the connection's engine, and the label of a change-log or open-items query must name one of the domain's sources. Anything that writes, or a second statement, is refused. Use dry_run to test a query before saving.
What do the thresholds do?+
A pair of rows whose probability reaches review_threshold is linked into a record. A record whose weakest link is below auto_threshold, or that has a bad field conflict, is marked review. Both are between 0 and 1, and review_threshold does not exceed auto_threshold. A domain overrides the platform defaults only when it sets them.