v1

latestOpenAPI 3.0.02026-07-2422987517.5 KB
Rule

List rules

Returns a paginated list of the company's automation rules, each embedding its attribute_change_effects, custom_column_change_effects, and reviewer_assigner_effects. Override rules are excluded.

Rules are partitioned by applicable_model (defaults to tradables). Filter by kind (approval rules have reviewer effects; categorization rules do not), business_partner_id, inheritable, and applicable_model.

get/v1/erp/payouts/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

kind'approval' | 'categorization'

Filter to approval rules (with reviewer effects) or categorization rules.

business_partner_idstring uuid

Filter to rules that target the given business partner.

inheritableboolean

Filter by whether the rule is inheritable by child companies.

applicable_modelstring

Target model bucket. Defaults to tradables.

Headers

company-idstring uuid required

UUID of the company on whose behalf the request is made. Required for every Pay 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.

If the deprecated company_id query parameter is also sent, both values must match; the API returns 422 Unprocessable Entity when they disagree.

Response

Paginated list of rules (default 25 per page).

idstring uuid required
namestring
user_idstring

The user that created the rule.

company_idstring uuid required
constraintsobject nullable

The JSON constraint tree that determines which records the rule matches.

enabledboolean
inheritableboolean

Whether child companies in the corporate group inherit this rule.

applicable_modelstring

Target model bucket the rule applies to. Defaults to tradables (payables). Set once at creation and immutable thereafter.

hiddenboolean
overrides_rule_idstring uuid nullable
inherit_overrideboolean
created_atstring date-time
updated_atstring date-time
related_partnersobject[]

Business partners referenced by the rule's constraints. Included only in the show response (via the related_partners method).

Example response

[
  {
    "applicable_model": "tradables"
  }
]