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)));
| Field | Type | Description |
|---|---|---|
ruleId | String | ID of the matching rule to update. |
name | String | Updated name for the rule. |
description | String | Updated description of what the rule does. |
criteria | List<Criteria> | Full replacement list of match criteria built with Criteria.create(). |
criteria.[].field | String | Field to match: amount, currency, reference, description, or date. |
criteria.[].operator | String | How to compare the field: equals or contains. |
criteria.[].allowable_drift | Number | Optional 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"
}
| Field | Type | Description |
|---|---|---|
rule_id | String | Unchanged ID of the rule. |
name | String | Updated rule name. |
criteria | JsonNode | JSON array of match criteria stored for the rule. |
updated_at | String | When the rule was last updated. |