Reconciliation
Update matching rule
Update a reconciliation matching rule with the Python SDK.
PUT
/reconciliation/matching-rules/{rule_id}Use blnk.reconciliation.update_matching_rule to update a matching rule.
Call the method
response = blnk.reconciliation.update_matching_rule(
"rule_890bdbc4-467f-4670-8424-5667e41daf29",
{
"name": "Amount match (updated)",
"description": "Match by amount with 2% drift",
"criteria": [
{
"field": "amount",
"operator": "equals",
"allowable_drift": 0.02
},
{
"field": "currency",
"operator": "equals"
},
],
},
)
| Field | Type | Description |
|---|---|---|
ruleId | str | ID of the matching rule to update. |
name | str | Updated name for the rule. |
description | str | Updated description of what the rule does. |
criteria | list[dict] | Full replacement array of match criteria. |
criteria.[].field | str | Field to match: amount, currency, reference, description, or date. |
criteria.[].operator | str | 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_890bdbc4-467f-4670-8424-5667e41daf29",
"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 | str | Unchanged ID of the rule. |
name | str | Updated rule name. |
criteria | list[dict] | The updated match criteria stored for the rule. |
updated_at | str | When the rule was last updated. |