Skip to main content
PUT
/
reconciliation
/
matching-rules
/
{id}
Update matching rule
curl --request PUT \
  --url http://localhost:5001/reconciliation/matching-rules/{id} \
  --header 'X-blnk-key: <api-key>'
Use blnk.Reconciliation.updateMatchingRule to update a matching rule.
blnk.Reconciliation.updateMatchingRule
const response = await blnk.Reconciliation.updateMatchingRule('rule_abc123', {
  name: 'Amount match (updated)',
  description: 'Match by amount with 2% drift',
  criteria: [
    { field: 'amount', operator: 'equals', allowable_drift: 0.02 },
    { field: 'currency', operator: 'equals' },
  ],
});
FieldDescription
ruleIdID of the matching rule to update.
nameUpdated name for the rule.
descriptionUpdated description of what the rule does.
criteriaFull replacement array of match criteria.
criteria[].fieldField to match: amount, currency, reference, description, or date.
criteria[].operatorHow to compare the field: equals or contains.
criteria[].allowable_driftOptional tolerance for amount (percentage) or date (seconds).

Response shape

200 OK
{
  "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"
}
FieldDescription
rule_idUnchanged ID of the rule.
nameUpdated rule name.
criteriaThe updated match criteria stored for the rule.
updated_atWhen the rule was last updated.

How reconciliation works

Criteria, operators, and drift behavior.

Update matching rule

HTTP request and response schema.

Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool. To ask questions or discuss issues, please contact us or join our Discord community.