Create a reconciliation rule

Changed on
post/reconciliation_rules

Request

  • Base URL
    https://api.endclose.com/v1
  • Auth
    API key in header X-API-KEY

Headers

Idempotency-Keystring

Optional. Send the same key when retrying a write you are not sure landed: the first response is returned again (with Idempotent-Replayed: true) instead of writing twice. A key used for a different request is refused with 422; one whose first request is still running gets 409. A refused or failed request does not use up its key. Keys are per environment and kept for 7 days.

Request body

reconciliation_idstring required
filtersFilters required(unresolved $ref)
priorityinteger
group_byGroupBy (unresolved $ref)
cardinalityCardinality (unresolved $ref)
rollupRollup (unresolved $ref)
descriptionstring

Optional human-readable description of what this rule matches

Response

Rule created

idstring uuid
priorityinteger

Lower values run first

group_bystring[]

Side A field keys to group records by before matching. The first key is the primary axis: in rollup.group_by_kind 'date' mode it must be a date field; in 'identifier' mode it can be any field (e.g. a batch id in metadata). Additional keys further segment Side A — in date mode each segment matches only Side B records with the same value for those fields; in identifier mode they form a composite cohort key and do not constrain the Side B record. To require the Side B record to share a value in either mode, add an eq condition to filters.

cardinality'one_to_one' | 'many_to_one'

Match cardinality. 'one_to_one' matches single records on each side. 'many_to_one' rolls up multiple records on one side to match a single record on the other side — requires the rollup field to be set.

descriptionstring

Optional human-readable description of what this rule matches

source'user' | 'ai' | 'default'

Origin of the rule. 'user' = created manually via the API or UI. 'ai' = created by the AI rules engine. 'default' = built-in rule seeded on older reconciliations (no longer created).

status'active' | 'proposed'

Active rules are used by the reconciliation engine. Proposed rules are awaiting review from a cold start.

confidence'high' | 'medium' | 'low'

AI confidence rating. Only present on AI-generated rules from cold start.

sample_match_ratestring

How many sample records this rule matched during dry-run evaluation (e.g. '42/50'). Only present on AI-generated rules from cold start.

reconciliation_idstring uuid required
created_atstring date-time

Changes

    • breaking

      the response's property type changed from integer to string, and format from no format to uuid for status

    • breaking

      the response's property type changed from integer to string, and format from no format to uuid for status

    • info

      added the new optional header request parameter Idempotency-Key

    • info

      added the new optional request property /

    • info

      added the optional property / to the response with the status