Reconciliation
Create matching rule
Create a reconciliation matching rule with the Java SDK.
POST
/reconciliation/matching-rulesUse blnk.reconciliation().createMatchingRule for this operation.
Call the method
Criteria amountMatch = Criteria.create()
.field("amount")
.operator("equals")
.allowableDrift(0.01);
ApiResponse<JsonNode> response = blnk.reconciliation().createMatchingRule(
Matcher.create()
.name("Amount match")
.description("Match on amount")
.criteria(List.of(amountMatch)));
| Field | Type | Description |
|---|---|---|
name | String | Name of the matching rule. |
description | String | Short description of what the rule does. |
criteria | List<Criteria> | 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). |
Save the rule ID
Use response.data().get("rule_id").asText() in matching_rule_ids when you start reconciliation.
Response
{
"rule_id": "rule_890bdbc4-467f-4670-8424-5667e41daf29",
"name": "Amount match",
"description": "Match by amount with 1% drift",
"criteria": [
{
"field": "amount",
"operator": "equals",
"allowable_drift": 0.01
}
],
"created_at": "2024-11-26T08:36:36.238244338Z",
"updated_at": "2024-11-26T08:36:36.238244338Z"
}
| Field | Type | Description |
|---|---|---|
rule_id | String | Unique ID for the rule. Store it to apply during reconciliation runs. |
name | String | Rule name you passed. |
criteria | JsonNode | JSON array of match criteria stored for the rule. |
created_at | String | When the rule was created. |
updated_at | String | When the rule was last updated. |