---
title: "List accounting code rules"
method: GET
path: "/accounting_code_rules"
tags: ["Accounting Code Rules"]
---

# List accounting code rules

`GET /accounting_code_rules`

## Query parameters

- `business_entity_id` string, required
- `tag_group_id` string
- `has_tag_group` boolean
- `tag_id` string
- `has_tag` boolean
- `type` union
  - 'allowance' | 'deduction' | 'earning' | 'employee_benefit' | 'employer_benefit' | 'employer_statutory_withholding' | 'reimbursement' | 'statutory_withholding'
  - string[]
- `subtype` string
- `business_preset_id` string
- `expense_accounting_code_id` string
- `liability_accounting_code_id` string
- `search` string
- `expand` string[]

## Response `200`

OK

- object
  - `object` string — The type of the object in Nmbr (`"list"`).
  - `data` object[]
    - `id` string — The unique identifier of the object in Nmbr.
    - `object` string — The type of the object in Nmbr (`"accounting_code_rule"`).
    - `data` AccountingCodeRule
      - `business_entity` object
        - `id` string — The unique identifier of the object in Nmbr.
        - `object` string — The type of the object in Nmbr (`"business_entity"`).
      - `tag_group` object
        - `id` string — The unique identifier of the object in Nmbr.
        - `object` string — The type of the object in Nmbr (`"tag_group"`).
      - `tag` object
        - `id` string — The unique identifier of the object in Nmbr.
        - `object` string — The type of the object in Nmbr (`"tag"`).
      - `type` string, nullable — The line item type this rule applies to (e.g. `earning`, `deduction`). When combined with `subtype`, narrows the rule to a specific line item category. Mutually exclusive with `business_preset`.
      - `subtype` string, nullable — The line item subtype this rule applies to (e.g. `wage`, `salary`). Must be accompanied by a `type`.
      - `business_preset` unknown
      - `expense_accounting_code` object — The expense accounting code assigned when this rule matches.
        - `id` string — The unique identifier of the object in Nmbr.
        - `object` string — The type of the object in Nmbr (`"accounting_code"`).
      - `liability_accounting_code` unknown
      - `expense_segment_template` SegmentTemplate, nullable — Assembles a formatted accounting code for the journal entry report: each segment resolves to a value, is wrapped and transformed, and the results are concatenated in order. Only valid on rules with no tag and no tag group; `null` when unset.
        - `segments` union[], required — Ordered segments concatenated into the generated code.
          - union
            - object — Emits the referenced accounting code's `code`.
              - …
            - object — Emits the row's tag in this group — its expense template code in an expense template, its liability template code in a liability template.
              - …
            - object — Emits a fixed piece of text. A text segment takes no formatting.
              - …
      - `liability_segment_template` SegmentTemplate, nullable — Assembles a formatted accounting code for the journal entry report: each segment resolves to a value, is wrapped and transformed, and the results are concatenated in order. Only valid on rules with no tag and no tag group; `null` when unset.
        - `segments` union[], required — Ordered segments concatenated into the generated code.
          - union
            - object — Emits the referenced accounting code's `code`.
              - …
            - object — Emits the row's tag in this group — its expense template code in an expense template, its liability template code in a liability template.
              - …
            - object — Emits a fixed piece of text. A text segment takes no formatting.
              - …
      - `created_at` string, dateTime — The date and time the object was created in Nmbr.
      - `updated_at` string, dateTime — The date and time the object was last updated in Nmbr.

---

[API](https://skmtc.net/nmbr/apis/nmbr-api.md) · [All operations](https://skmtc.net/nmbr/apis/nmbr-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nmbr/nmbr-api/revisions/01cd9c45a923/schema)
