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,
			},
		},
	},
)
FieldTypeDescription
ruleIDstringID of the matching rule to update.
NamestringUpdated name for the rule.
DescriptionstringUpdated description of what the rule does.
Criteria[]blnkgo.
Criteria
Full replacement array of match criteria.
Criteria.
[].Field
blnkgo.
CriteriaField
Field to match: CriteriaField
Amount, CriteriaField
Currency, CriteriaField
Reference, CriteriaField
Description, or CriteriaField
Date.
Criteria.
[].Operator
blnkgo.
ReconciliationOperator
How to compare the field: ReconciliationOperator
Equals or ReconciliationOperator
Contains.
Criteria.
[].AllowableDrift
float64Optional 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)

FieldTypeDescription
RuleIDstringUnchanged ID of the rule.
NamestringUpdated rule name.
DescriptionstringUpdated description of what the rule does.
Criteria[]blnkgo.
Criteria
The updated match criteria stored for the rule.
CreatedAtstringWhen the rule was created.
UpdatedAtstringWhen the rule was last updated.