PUT
Edit an allocation rule (client account)
Client space Accounting module For: Accountant · Permission: analytic_rules.update Conditions
  • The accounting module must be included in the plan of the organization.
  • The axis of a rule cannot be changed.
  • A new analytic_section_id must be an active section of the rule’s axis that is postable and has no child sections. When the rule is active and its section or status changes, the axis must also be active.
  • After the change the rule must still have at least one matcher; a matcher sent as null clears it, and a matcher left out keeps its value.
  • match_journal_id, when changed, must be a journal of the same book.
Part of Set up analytic axes, sections and rules.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

analyticRule
string
required

Identifier of the allocation rule (27-character KSUID).

Query Parameters

response
enum<string>
default:none

Response mode. Default none; none answers 204 No Content.

Available options:
none,
resource
fields
string

Comma-separated JSON keys of the root resource (id is always rendered). Available: id, analytic_axis_id, analytic_section_id, priority, match_account_prefix, match_source_type, match_journal_id, status, created_by, created_by_type, created_at, updated_at.

include
string

Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: axis, section, section.axis, section.parent, journal.

Body

application/json
analytic_section_id
string | null

New target section: active, postable, without children, on the rule's axis. Left unchanged when omitted.

priority
integer | null

New priority, integer of 0 or more. Left unchanged when omitted.

Required range: x >= 0
match_account_prefix
string | null

New prefix, at most 16 characters; null clears it, omitting keeps it. The rule must keep at least one matcher.

Maximum string length: 16
match_source_type
string | null

New source type, at most 64 characters; null clears it, omitting keeps it. The rule must keep at least one matcher.

Maximum string length: 64
match_journal_id
string | null

New journal of the same book; null clears it, omitting keeps it. The rule must keep at least one matcher.

status
enum<string> | null

active or archived. Left unchanged when omitted. Reactivating requires a target section that can still receive allocations.

Available options:
active,
archived

Response

Resource (only with response=resource).

id

Identifier of the rule (27-character KSUID).

analytic_axis_id

Identifier of the axis the rule allocates on.

axis
object | null

The axis, included only when the caller may retrieve analytic axes.

analytic_section_id

Identifier of the section that matching lines are allocated to.

section
object | null

The target section, included only when the caller may retrieve analytic sections.

priority
integer

Order of evaluation among the rules of the axis; an integer of 0 or more.

match_account_prefix

Matches journal lines whose account code starts with this prefix; null when this matcher is not used.

match_source_type

Matches entries created by this source type; null when this matcher is not used.

match_journal_id

Matches entries of this journal; null when this matcher is not used.

journal
object | null

The matched journal, included only when the caller may retrieve journals.

status

active or archived. Only active rules allocate.

created_by

Identifier of the actor that created the rule.

created_by_type

Kind of actor that created the rule (the actor's morph alias); null when it could not be resolved.

created_at

Date and time the record was created (ISO 8601, UTC).

updated_at

Date and time the record was last changed (ISO 8601, UTC).