Skip to main content
POST
Create a match rule

Authorizations

Authorization
string
header
required

Bearer token authentication (format: "Bearer {token}")

Headers

X-Request-Id
string

A unique identifier for tracing the request across services.

X-Idempotency
string

Optional idempotency key for safe retries. Matcher reads the key only from this header, and only when you send one. A request that carries a key only in X-Idempotency-Key or Idempotency-Key is refused with 400 (MTCH-0015), and nothing is processed. If the same key is sent again and the original request was already processed, the stored response is returned with X-Idempotency-Replayed: true. A malformed key returns 400, a key whose first request is still in progress returns 409, and an idempotency storage failure returns 500. These refusals are problem documents.

Path Parameters

contextId
string<uuid>
required

The unique identifier of the reconciliation context. Context ID

Body

application/json

Match rule creation payload

config
object
required

Rule-specific configuration object. Includes the built-in toggles (matchAmount, matchCurrency, matchDate, matchReference) and tolerance/lag parameters, plus an optional composite-key array matchFields: [{ field, mode, tolerance? }] where mode is one of required, conditional, or off, and tolerance is an optional per-field relaxation ({ absTolerance?, percentTolerance? } for numeric or { stringMode: exact|fold } for text). Optional date keys (opt-in; default behavior is raw UTC days): timezone (an IANA zone name, e.g. America/Sao_Paulo, buckets dates by local sales-day before the date window/lag is applied), calendar (a vendored business-day calendar name, US_FED or BR_ANBIMA — on TOLERANCE it makes dateWindowDays count business days; on DATE_LAG it pairs with businessDayMode), and businessDayMode (DATE_LAG only; makes minDays/maxDays count business days under calendar). Optional signMode key (one of same, opposite, ignore; default same) selects the axis used when the rule compares amounts: same matches signed amounts (legacy behavior); opposite matches a value against its negation (a -100 refund reconciles against a +100 charge); ignore compares magnitudes only. It is consulted only when the rule actually compares amounts (matchAmount on EXACT/FUZZY, the tolerance band on TOLERANCE); on a rule that does not compare amounts it is accepted but inert.

priority
integer<int64>
required

Execution priority; lower numbers run first. Must be unique within the context.

Required range: 1 <= x <= 1000
Example:

1

type
enum<string>
required

Matching strategy. EXACT requires identical field values; TOLERANCE allows configured numeric slack; DATE_LAG allows a configured date offset between sides; FUZZY matches on normalized/similarity-scored references (free-text memos, truncated refs) and always proposes for review (never auto-confirms).

Available options:
EXACT,
TOLERANCE,
DATE_LAG,
FUZZY
Example:

"EXACT"

Response

Successfully created match rule.

config
object
required

Rule-specific configuration object (matched fields and tolerance/lag parameters).

contextId
string
required

Identifier of the context this rule belongs to.

Example:

"550e8400-e29b-41d4-a716-446655440000"

createdAt
string
required

Creation timestamp in RFC 3339 format.

Example:

"2025-01-15T10:30:00Z"

id
string
required

Unique identifier of the rule.

Example:

"550e8400-e29b-41d4-a716-446655440000"

priority
integer<int64>
required

Execution priority; lower numbers run first.

Required range: 1 <= x <= 1000
Example:

1

type
enum<string>
required

Matching strategy. EXACT requires identical field values; TOLERANCE allows configured numeric slack; DATE_LAG allows a configured date offset between sides; FUZZY matches on normalized/similarity-scored references and always proposes for review.

Available options:
EXACT,
TOLERANCE,
DATE_LAG,
FUZZY
Example:

"EXACT"

updatedAt
string
required

Last update timestamp in RFC 3339 format.

Example:

"2025-01-15T10:30:00Z"