HTTP Operation Type Object
Query bankingRules filtered by id Why?
Query bankingRules

Description

Banking rules drive how bank movements are matched, suggested, or posted to the chart of accounts and related documents.
A rule can target a bank account, an accounting account, third parties, and other criteria; it carries scoring, status, and optional extended metadata.

bankingRuleId is referenced from bank movements proposal items and reconciled items to identify which rule produced or affected a match.

img

List rules with the bankingRules connection query (pagination via first / last, optional where and order).
Note: creationDate and modificationDate are listed in the field table below for consistency with other resources, but they are not exposed on the public GraphQL BankingRule type; the selection set includes every other field from this page.

GraphQL Query
query {
  bankingRules(first: 1) {
    edges {
      node {
        id
        accountingAccountId
        bankAccountId
        thirdPartyId
        categoryId
        action
        kind
        name
        status
        defaultProposalRule
        ponderationScore
        ruleApplied
        sourceType
        suggestionsProvided
        createdByDefault
        disabled
        disabledDate
        description
        rationale
        createdBy
        updatedBy
      }
    }
  }
}

Example Response

{
    "data": {
        "bankingRules": {
            "edges": [
            {
                "node": {
                    "id": "533a9e42-247a-48c2-a244-b8483ca1f58f",
                    "accountingAccountId": null,
                    "bankAccountId": null,
                    "thirdPartyId": null,
                    "categoryId": null,
                    "action": "ONLY_MATCH",
                    "kind": "ALL_BANK_ACCOUNTS",
                    "name": "Rapprochement par numéro de facture",
                    "status": "Active",
                    "defaultProposalRule": false,
                    "ponderationScore": 96,
                    "ruleApplied": 0,
                    "sourceType": null,
                    "suggestionsProvided": 0,
                    "createdByDefault": true,
                    "disabled": false,
                    "disabledDate": null,
                    "description": null,
                    "rationale": null,
                    "createdBy": "Sage Copilot",
                    "updatedBy": null
                }
            }
            ]
        }
    }
}
Key Value
Authorization Bearer Current access Token How to find?
X-TenantId Current tenant id Why deprecated ?
X-OrganizationId Current organization Id How to find?
x-api-key Primary or secondary subscription key of your app How to find?

bankingRules

Fields Type Description Length
id UUID Unique identifier of the banking rule  
creationDate DateTime Creation time  
modificationDate DateTime Last modification time  
       
accountingAccountId UUID Default or target accounting account, when the rule uses one  
bankAccountId UUID Bank account the rule applies to, when set  
thirdPartyId UUID Linked third party, when the rule is scoped to one  
categoryId UUID Transaction category for classification, when set  
       
Configuration      
action
  • NOT_SPECIFIED
  • CREATE_NON_INVOICE
  • CREATE_PURCHASE_INVOICE
  • CREATE_SALES_INVOICE
  • ONLY_MATCH
What the rule does when it matches (create document, only match, etc.)  
kind
  • NOT_SPECIFIED
  • ALL_BANK_ACCOUNTS
  • ONE_BANK_ACCOUNT
Whether the rule applies to one bank account, all, or is unspecified  
name String Name of the rule  
status String Status of the rule in the product  
defaultProposalRule Boolean When true, the rule is used for default proposal behaviour  
ponderationScore Int Base score used for proposal ranking (see proposal items on bank movements)  
ruleApplied Int How the rule is applied (internal code)  
sourceType
  • ACCOUNTING
  • AP_AUTOMATION
  • BANK_SMART_AGENT
  • BANKING
  • E_INVOICING_AP_AUTOMATION
  • EMAIL_AP_AUTOMATION
  • FIXED_ASSETS
  • GLOBAL
  • IMPORT_FILES
  • INTEGRATION_API
  • ONLINE_PAYMENTS
  • PAYMENT_RECEIPTS
  • PUBLIC_API
  • PUBLIC_API_AP_AUTOMATION
  • SAGE_DE_PAYROLL_CLOUD
  • SAGE_FR_PAYROLL_CLOUD
  • SAGE_MOBILE_APP_AP_AUTOMATION
  • SALES
  • SCHEDULER_SERVICE
  • YEAR_END_PROCESS
  • YEAR_END_PROCESS_PREVIEW
Where the rule originates from (e.g. banking, public API, import)  
suggestionsProvided Int Number of suggestions associated with the rule (default 0)  
createdByDefault Boolean Whether the record was created by the system as a default  
disabled Boolean When true, the rule is disabled  
disabledDate DateTime Date the rule was disabled, when set  
description String User-visible description  
rationale String Rationale or comment for the rule  
createdBy String User or system that created the record  
updatedBy String User that last updated the record