Reconciliation

Update matching rule

Update a reconciliation matching rule with the Java SDK.

PUT/reconciliation/matching-rules/{rule_id}

Use blnk.reconciliation().updateMatchingRule for this operation.

Call the method

String ruleId = "rule_073f7ffe-9dfd-42ce-aa50-d1dca1788adc";

Criteria referenceMatch = Criteria.create()
    .field("reference")
    .operator("equals")
    .allowableDrift(0);

ApiResponse<JsonNode> response = blnk.reconciliation().updateMatchingRule(
    ruleId,
    Matcher.create()
        .name("Updated rule")
        .description("Updated criteria")
        .criteria(List.of(referenceMatch)));
FieldTypeDescription
ruleIdStringID of the matching rule to update.
nameStringUpdated name for the rule.
descriptionStringUpdated description of what the rule does.
criteriaList<Criteria>Full replacement list of match criteria built with Criteria.create().
criteria.
[].field
StringField to match: amount, currency, reference, description, or date.
criteria.
[].operator
StringHow to compare the field: equals or contains.
criteria.
[].allowable_drift
NumberOptional tolerance for amount (percentage) or date (seconds).

Verify the changes

Read response.data() to confirm the updated criteria and description. The rule ID stays the same.

Response

{
  "rule_id": "rule_abc123",
  "name": "Amount match (updated)",
  "description": "Match by amount with 2% drift",
  "criteria": [
    {
      "field": "amount",
      "operator": "equals",
      "allowable_drift": 0.02
    }
  ],
  "created_at": "2024-11-26T08:36:36.238244338Z",
  "updated_at": "2024-12-01T10:15:00.000000000Z"
}
FieldTypeDescription
rule_idStringUnchanged ID of the rule.
nameStringUpdated rule name.
criteriaJsonNodeJSON array of match criteria stored for the rule.
updated_atStringWhen the rule was last updated.