Reconciliation
Update matching rule
Update a reconciliation matching rule with the Go SDK.
PUT
/reconciliation/matching-rules/{rule_id}Use client.Reconciliation.UpdateMatchingRule to update a matching rule.
Call the method
updatedRule, _, _ := client.Reconciliation.UpdateMatchingRule(
"rule_890bdbc4-467f-4670-8424-5667e41daf29",
blnkgo.Matcher{
Name: "Amount match (updated)",
Description: "Match by amount with 2% drift",
Criteria: []blnkgo.Criteria{
{
Field: blnkgo.CriteriaFieldAmount,
Operator: blnkgo.ReconciliationOperatorEquals,
AllowableDrift: 0.02,
},
{
Field: blnkgo.CriteriaFieldCurrency,
Operator: blnkgo.ReconciliationOperatorEquals,
},
},
},
)
| 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 | []blnkgo.Criteria | Full replacement array of match criteria. |
Criteria.[].Field | blnkgo.CriteriaField | Field to match: CriteriaFieldAmount, CriteriaFieldCurrency, CriteriaFieldReference, CriteriaFieldDescription, or CriteriaFieldDate. |
Criteria.[].Operator | blnkgo.ReconciliationOperator | How to compare the field: ReconciliationOperatorEquals or ReconciliationOperatorContains. |
Criteria.[].AllowableDrift | float64 | Optional tolerance for amount (percentage) or date (seconds). |
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"
}Go response (*blnkgo.RunReconResp)
| Field | Type | Description |
|---|---|---|
RuleID | string | Unchanged ID of the rule. |
Name | string | Updated rule name. |
Description | string | Updated description of what the rule does. |
Criteria | []blnkgo.Criteria | The updated match criteria stored for the rule. |
CreatedAt | string | When the rule was created. |
UpdatedAt | string | When the rule was last updated. |