v1

latestOpenAPI 3.0.02026-07-2422987517.5 KB
Transaction rule

List transaction rules

Returns a paginated list of the company's transaction rules (automations that match transactions and apply custom-column change effects). Each rule includes its custom_column_change_effects and related_merchants. Optionally filter by merchant_id. Requires the transactions_rules_view or transactions_rules_manage permission; hidden rules are excluded for non-admins.

get/v1/transaction/rules

Query parameters

_startinteger

If all the transactions where in an array, this would represent the index of the first item returned in the response

_endinteger

If all the transactions where in an array, this would represent the index of the last item returned in the response

_order'asc' | 'desc'

The order method, which can be ascending or descending

_fieldstring
Example:created_at

The field used to sort, the example illustrates a response that would be sorted by the creation date

merchant_idstring uuid

Filter rules that reference the given merchant in their constraints.

namestring

Filter by name.

enabledboolean

Filter by enabled state.

Headers

company-idstring uuid required

UUID of the company on whose behalf the request is made. Required for every Accounting endpoint. See The company-id header for details on how to obtain a value for this header and the error responses to expect when it is missing or invalid.

Response

Paginated list of transaction rules

idstring uuid required
company_idstring uuid required
user_idstring

The user who created the rule.

namestring required
constraintsobject

Match expression evaluated against transactions (MongoDB-style operators, e.g. $or with per-merchant clauses).

enabledboolean
hiddenboolean
created_atstring date-time
updated_atstring date-time

Example response

[
  {
    "id": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
    "company_id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Categorizar AWS como Infraestructura",
    "constraints": {
      "$or": [
        {
          "merchant_id": "8e668a4e-8485-4248-86cc-a7a2201cf8c3"
        }
      ]
    },
    "enabled": true,
    "custom_column_change_effects": [
      {
        "type": "Transaction::CustomColumnChangeEffect"
      }
    ]
  }
]