> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nmbr.co/llms.txt
> Use this file to discover all available pages before exploring further.

# List accounting code rules



## OpenAPI

````yaml /spec/openapi.json get /accounting_code_rules
openapi: 3.0.0
info:
  title: Nmbr API
  description: API to interact with Nmbr Payroll
  version: 1.0.0
servers:
  - url: https://sandbox.nmbr.co/services/payroll
security:
  - CompanyToken: []
tags:
  - name: Accounting Codes
  - name: Accounting Code Rules
  - name: Adjustments
  - name: Allowances
  - name: Allowance Line Items
  - name: Allowance Types
  - name: Async Tasks
  - name: Bank Accounts
  - name: Business Entities
  - name: Business Entity Verifications
  - name: Business Entity ROE Authorizations
  - name: Business Presets
  - name: Calculations
  - name: Companies
  - name: Contractors
  - name: Deductions
  - name: Deduction Line Items
  - name: Deduction Types
  - name: Earnings
  - name: Earning Line Items
  - name: Earning Types
  - name: Effective Tax Properties
  - name: Employees
  - name: Employee Benefits
  - name: Employee Benefit Line Items
  - name: Employee Benefit Types
  - name: Employer Benefits
  - name: Employer Benefit Line Items
  - name: Employer Benefit Types
  - name: Employer Statutory Withholding Line Items
  - name: Employer Statutory Withholding Types
  - name: Forms
  - name: Form Batches
  - name: Form Types
  - name: Holidays
  - name: Integrations
  - name: Journal Entries
  - name: Overtime Rates
  - name: Partners
  - name: Pay Rates
  - name: Pay Schedules
  - name: Pay Splits
  - name: Pay Stubs
  - name: Payments
  - name: Payrolls
  - name: Reimbursements
  - name: Reimbursement Line Items
  - name: Reimbursement Types
  - name: Remittance Accounts
  - name: Remittance Account Enrollments
  - name: Reports
  - name: Statutory Withholding Line Items
  - name: Statutory Withholding Types
  - name: Tags
  - name: Tag Groups
  - name: Tax Properties
  - name: Tax Property Templates
  - name: Tokens
  - name: Usage Records
  - name: Usage Summaries
  - name: Vacation Pay
  - name: Vacation Pay Settings
  - name: Webhooks
  - name: Work Assignments
paths:
  /accounting_code_rules:
    get:
      tags:
        - Accounting Code Rules
      summary: List accounting code rules
      operationId: accounting-code-rules-index
      parameters:
        - name: business_entity_id
          in: query
          schema:
            type: string
          required: true
        - name: tag_group_id
          in: query
          schema:
            type: string
          required: false
        - name: has_tag_group
          in: query
          schema:
            type: boolean
          required: false
          description: >-
            Filter by whether the rule is scoped to a tag group. `false` returns
            only rules not scoped to any tag group; `true` returns only rules
            scoped to some tag group. Combining `false` with one or more
            `tag_group_id` values returns the union: rules with no tag group as
            well as rules in any of the listed groups.
        - name: tag_id
          in: query
          schema:
            type: string
          required: false
        - name: has_tag
          in: query
          schema:
            type: boolean
          required: false
          description: >-
            Filter by whether the rule is scoped to a tag. `false` returns only
            rules not scoped to any tag; `true` returns only rules scoped to
            some tag. Combining `false` with one or more `tag_id` values returns
            the union: rules with no tag as well as rules with any of the listed
            tags.
        - name: type
          in: query
          schema:
            anyOf:
              - type: string
                enum:
                  - allowance
                  - deduction
                  - earning
                  - employee_benefit
                  - employer_benefit
                  - employer_statutory_withholding
                  - reimbursement
                  - statutory_withholding
              - type: array
                items:
                  type: string
                  enum:
                    - allowance
                    - deduction
                    - earning
                    - employee_benefit
                    - employer_benefit
                    - employer_statutory_withholding
                    - reimbursement
                    - statutory_withholding
          required: false
        - name: subtype
          in: query
          schema:
            type: string
          required: false
        - name: business_preset_id
          in: query
          schema:
            type: string
          required: false
        - name: expense_accounting_code_id
          in: query
          schema:
            type: string
          required: false
        - name: liability_accounting_code_id
          in: query
          schema:
            type: string
          required: false
        - name: search
          in: query
          schema:
            type: string
          required: false
          description: >-
            Case-insensitive substring match across the rule's tag label,
            business preset title, line item type and subtype label, and the
            expense and liability accounting code's code and title. Translated
            fields are matched in the request's active locale (set via the
            `Accept-Language` header).
        - name: expand
          in: query
          schema:
            type: array
            items:
              type: string
              enum:
                - business_entity
                - business_preset
                - expense_accounting_code
                - liability_accounting_code
                - tag
                - tag_group
          required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    description: The type of the object in Nmbr (`"list"`).
                    readOnly: true
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: The unique identifier of the object in Nmbr.
                          readOnly: true
                        object:
                          type: string
                          description: >-
                            The type of the object in Nmbr
                            (`"accounting_code_rule"`).
                          readOnly: true
                        data:
                          type: object
                          allOf:
                            - $ref: '#/components/schemas/AccountingCodeRule'
                          anyOf:
                            - type: object
                              title: Default
                            - type: object
                              title: With business_entity expanded
                              properties:
                                business_entity:
                                  type: object
                                  properties:
                                    data:
                                      $ref: '#/components/schemas/BusinessEntity'
                            - type: object
                              title: With tag_group expanded
                              properties:
                                tag_group:
                                  type: object
                                  properties:
                                    data:
                                      $ref: '#/components/schemas/TagGroup'
                            - type: object
                              title: With tag expanded
                              properties:
                                tag:
                                  type: object
                                  properties:
                                    data:
                                      $ref: '#/components/schemas/Tag'
                            - type: object
                              title: With business_preset expanded
                              properties:
                                business_preset:
                                  type: object
                                  properties:
                                    data:
                                      $ref: '#/components/schemas/BusinessPreset'
                            - type: object
                              title: With expense_accounting_code expanded
                              properties:
                                expense_accounting_code:
                                  type: object
                                  properties:
                                    data:
                                      $ref: '#/components/schemas/AccountingCode'
                            - type: object
                              title: With liability_accounting_code expanded
                              properties:
                                liability_accounting_code:
                                  type: object
                                  properties:
                                    data:
                                      $ref: >-
                                        #/components/schemas/LiabilityAccountingCode
              example:
                object: list
                data:
                  - id: <id>
                    object: accounting_code_rule
                    data:
                      business_entity:
                        id: <id>
                        object: business_entity
                        links:
                          self: /business_entities/<id>
                      tag_group:
                        id: <id>
                        object: tag_group
                        links:
                          self: /tag_groups/<id>
                      tag:
                        id: <id>
                        object: tag
                        links:
                          self: /tags/<id>
                      type: null
                      subtype: null
                      business_preset: null
                      expense_accounting_code:
                        id: <id>
                        object: accounting_code
                        links:
                          self: /accounting_codes/<id>
                      liability_accounting_code: null
                      expense_accounting_code_template: null
                      liability_accounting_code_template: null
                      created_at: '2026-01-01T00:00:00.000000Z'
                      updated_at: '2026-01-01T00:00:00.000000Z'
                    links:
                      self: /accounting_code_rules/<id>
                links:
                  first: /accounting_code_rules?business_entity_id=<id>&page=1
                  last: /accounting_code_rules?business_entity_id=<id>&page=1
                  prev: null
                  next: null
                meta:
                  current_page: 1
                  last_page: 1
                  per_page: 15
                  total: 1
                  has_more: false
components:
  schemas:
    AccountingCodeRule:
      type: object
      title: Accounting Code Rule
      properties:
        business_entity:
          type: object
          properties:
            id:
              type: string
              description: The unique identifier of the object in Nmbr.
              readOnly: true
            object:
              type: string
              description: The type of the object in Nmbr (`"business_entity"`).
              readOnly: true
        tag_group:
          type: object
          properties:
            id:
              type: string
              description: The unique identifier of the object in Nmbr.
              readOnly: true
            object:
              type: string
              description: The type of the object in Nmbr (`"tag_group"`).
              readOnly: true
        tag:
          type: object
          properties:
            id:
              type: string
              description: The unique identifier of the object in Nmbr.
              readOnly: true
            object:
              type: string
              description: The type of the object in Nmbr (`"tag"`).
              readOnly: true
        type:
          type: string
          description: >-
            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`.
          nullable: true
          maxLength: 255
        subtype:
          type: string
          description: >-
            The line item subtype this rule applies to (e.g. `wage`, `salary`).
            Must be accompanied by a `type`.
          nullable: true
          maxLength: 255
        business_preset:
          description: >-
            A business preset this rule applies to. Provides the highest
            specificity match. Mutually exclusive with `type` and `subtype`.
        expense_accounting_code:
          type: object
          description: The expense accounting code assigned when this rule matches.
          properties:
            id:
              type: string
              description: The unique identifier of the object in Nmbr.
              readOnly: true
            object:
              type: string
              description: The type of the object in Nmbr (`"accounting_code"`).
              readOnly: true
        liability_accounting_code:
          description: The liability accounting code assigned when this rule matches.
        expense_accounting_code_template:
          $ref: '#/components/schemas/AccountingCodeTemplate'
        liability_accounting_code_template:
          $ref: '#/components/schemas/AccountingCodeTemplate'
        created_at:
          type: string
          description: The date and time the object was created in Nmbr.
          readOnly: true
          format: dateTime
        updated_at:
          type: string
          description: The date and time the object was last updated in Nmbr.
          readOnly: true
          format: dateTime
    BusinessEntity:
      type: object
      title: Business Entity
      properties:
        business_number:
          type: string
          description: >-
            The Canada Revenue Agency (CRA) Business Number (BN) for this
            business entity, used to identify the business for payroll tax
            remittances.
          nullable: true
          maxLength: 255
        name:
          type: string
          description: The business entity's operating or trade name.
          maxLength: 255
        legal_name:
          type: string
          description: The business entity's registered legal name.
          nullable: true
          maxLength: 255
        legal_registration_number:
          type: string
          description: The provincial business registration number.
          nullable: true
          maxLength: 255
        address_line_1:
          type: string
          description: >-
            The first line of the business entity's mailing address. Canada
            Revenue Agency forms (T4, RL-1) truncate this to the length those
            forms allow.
          nullable: true
          maxLength: 255
        address_line_2:
          type: string
          description: >-
            The second line of the business entity's mailing address. Canada
            Revenue Agency forms (T4, RL-1) truncate this to the length those
            forms allow.
          nullable: true
          maxLength: 255
        city:
          type: string
          description: The city of the business entity's mailing address.
          nullable: true
          maxLength: 255
        in_preview:
          type: boolean
          description: >-
            When `true`, the business entity is in preview mode. In preview
            mode, Payrolls can be run and approved but no real money movement
            occurs.
        administrative_area:
          type: string
          description: >-
            The region of the business entity's mailing address — the province,
            state, or county, depending on the country. For Canadian business
            entities this is the province.
          nullable: true
          maxLength: 255
        province_code:
          type: string
          description: >-
            This attribute is deprecated and will be removed.


            A deprecated alias of `administrative_area` that mirrors its value.
            Use `administrative_area` instead.
          nullable: true
          deprecated: true
        country_code:
          type: string
          description: The country code for the business entity's mailing address.
          nullable: true
          maxLength: 2
        postal_code:
          type: string
          description: The postal code for the business entity's mailing address.
          nullable: true
          maxLength: 255
        contact_name:
          type: string
          description: The name of the primary contact at the business entity.
          nullable: true
          maxLength: 255
        contact_email:
          type: string
          description: The email address of the primary contact at the business entity.
          nullable: true
          maxLength: 255
        contact_area_code:
          type: string
          description: The area code for the primary contact's phone number.
          nullable: true
          maxLength: 255
        contact_phone_number:
          type: string
          description: The primary contact's phone number, excluding area code.
          nullable: true
          maxLength: 255
        contact_extension:
          type: string
          description: The extension for the primary contact's phone number.
          nullable: true
          maxLength: 255
        pay_day_movement_setting:
          type: string
          description: >-
            The business entity-level setting for how pay dates are adjusted
            when they fall on a weekend or bank holiday. If set to `inherit`,
            the Company's setting is used.
          enum:
            - inherit
            - next_business_day
            - previous_business_day
        vacation_pay_formula_setting:
          type: string
          description: >-
            The formula used to calculate vacation pay for Employees in this
            business entity.
          enum:
            - pay_date
            - period_end
            - period_start
        remitter_type:
          type: string
          description: >-
            The Canada Revenue Agency (CRA) remitter type, which determines the
            frequency of payroll tax remittances to the CRA.
          nullable: true
          enum:
            - accelerated_threshold_1
            - accelerated_threshold_2
            - quarterly
            - regular
        status:
          type: string
          description: >-
            The business entity's current status. A business entity must reach
            `approved` status before live Payrolls can be processed.
          enum:
            - approved
            - onboarding
            - suspended
        company:
          type: object
          properties:
            id:
              type: string
              description: The unique identifier of the object in Nmbr.
              readOnly: true
            object:
              type: string
              description: The type of the object in Nmbr (`"company"`).
              readOnly: true
        warnings:
          type: object
          description: >-
            A collection of data validation warnings for this business entity.
            Warnings indicate incomplete or potentially incorrect data and could
            prevent payroll processing.
          nullable: true
          properties:
            object:
              type: string
              nullable: true
            data:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  object:
                    type: string
                    nullable: true
                  data:
                    type: object
                    nullable: true
                    properties:
                      namespace:
                        type: string
                        nullable: true
                      type:
                        type: string
                        nullable: true
        external_ref:
          type: string
          description: >-
            A reference to the object in an external system, e.g. the primary
            key of the object in your application's database. Nmbr doesn't use,
            validate, parse, or require this value to be unique - it simply
            stores it for your reference.
          nullable: true
          maxLength: 255
        available_tax_properties:
          type: array
          description: >-
            A list of Tax Property template identifiers supported for this
            business entity, based on its jurisdiction.
          nullable: true
          items:
            type: string
        effective_processing_speed:
          type: string
          description: >-
            The resolved processing speed after applying inheritance from the
            Partner if `processing_speed` is `inherit`.
          nullable: true
        processing_speed:
          type: string
          description: >-
            The business entity-level processing speed setting. If set to
            `inherit`, the Partner's processing speed is used.
          enum:
            - five_day
            - four_day
            - inherit
            - one_day
            - three_day
            - two_day
        has_bank_accounts:
          type: boolean
          description: Whether this business entity has any Bank Accounts configured.
        has_pay_schedules:
          type: boolean
          description: Whether this business entity has any Pay Schedules configured.
        has_payrolls:
          type: boolean
          description: Whether this business entity has any Payrolls.
        current_tax_jurisdiction:
          type: string
          description: >-
            The current tax jurisdiction for the business entity, derived from
            its `ca::province_of_employment` Tax Property.
          nullable: true
        ca_settings:
          type: object
          description: >-
            Canada-specific settings for this business entity. Only present for
            business entities with a Canadian address.
          nullable: true
          properties:
            roe_submission_setting:
              type: string
              description: >-
                Indicates whether Record of Employment (ROE) submissions are
                managed by Nmbr (`managed`) or by the employer directly
                (`manual`).
              nullable: true
        accounting_settings:
          type: object
          description: >-
            Accounting-related settings for this business entity. New clients
            should read and write these through this object; the top-level
            `default_bank_accounting_code`,
            `default_payroll_payable_accounting_code`,
            `resolve_journal_entry_stat_withholdings`, and `primary_tag_group`
            fields are retained as aliases for backwards compatibility.
          nullable: true
          properties:
            default_bank_accounting_code:
              description: >-
                The Accounting Code used as the default bank account row when
                generating journal entries.
            default_payroll_payable_accounting_code:
              description: >-
                The Accounting Code used as the default payroll payable row when
                generating journal entries.
            resolve_journal_entry_stat_withholdings:
              type: boolean
              description: >-
                When `true`, statutory withholding line items (employee and
                employer) are split across tracking dimensions derived from
                their applicable source earnings. When `false`, each statutory
                withholding appears as a single unsplit row in journal entries.
            primary_tag_group:
              description: >-
                The Tag Group that drives default accounting-code resolution for
                line items. Setting this also flags the group as a journal entry
                dimension.
            block_approval_on_incomplete_journal_entries:
              type: boolean
              description: >-
                When `true`, payroll approval is blocked if any exportable
                journal entry row has no Accounting Code.
            block_approval_on_missing_export_identifiers:
              type: boolean
              description: >-
                When `true`, payroll approval is blocked if any exportable
                journal entry row has no Accounting Code OR has one that lacks
                the enabled integration's external identifier.
        default_bank_accounting_code:
          description: |-
            This attribute is deprecated and will be removed.

            Use `accounting_settings.default_bank_accounting_code`.
          deprecated: true
        default_payroll_payable_accounting_code:
          description: |-
            This attribute is deprecated and will be removed.

            Use `accounting_settings.default_payroll_payable_accounting_code`.
          deprecated: true
        preferred_locale:
          type: string
          description: >-
            The locale used for payroll communications sent to Employees and
            Contractors within this business entity. If not set, the Company's
            locale is used.
          nullable: true
          enum:
            - en
            - fr
        hold_funding_for_verification:
          type: boolean
          description: >-
            When `true`, funding payments will be automatically held after
            settlement for verification. Downstream payments (employee, CRA, RQ)
            will not be processed until the funding payment hold is released.
        resolve_journal_entry_stat_withholdings:
          type: boolean
          description: |-
            This attribute is deprecated and will be removed.

            Use `accounting_settings.resolve_journal_entry_stat_withholdings`.
          deprecated: true
        primary_tag_group:
          description: |-
            This attribute is deprecated and will be removed.

            Use `accounting_settings.primary_tag_group`.
          deprecated: true
        created_at:
          type: string
          description: The date and time the object was created in Nmbr.
          readOnly: true
          format: dateTime
        updated_at:
          type: string
          description: The date and time the object was last updated in Nmbr.
          readOnly: true
          format: dateTime
    TagGroup:
      type: object
      title: Tag Group
      properties:
        label:
          type: string
          maxLength: 255
        label_translations:
          type: object
          description: Optional translations for the `label` property.
          allOf:
            - $ref: '#/components/schemas/Translations'
          nullable: true
        label_translated:
          type: string
          description: >-
            The translation of the `label` property for the request locale.
            Computed using the values in `label` and `label_translations` and
            the value of the request's `Accept-Language` header.
          readOnly: true
        description:
          type: string
          nullable: true
        description_translations:
          type: object
          description: Optional translations for the `description` property.
          allOf:
            - $ref: '#/components/schemas/Translations'
          nullable: true
        description_translated:
          type: string
          description: >-
            The translation of the `description` property for the request
            locale. Computed using the values in `description` and
            `description_translations` and the value of the request's
            `Accept-Language` header.
          readOnly: true
        color:
          type: string
          description: >-
            A hex colour code for the tag group (e.g. `#AABBCC` or `#ABC`). Used
            for display.
          nullable: true
          maxLength: 7
        archived_at:
          type: string
          description: >-
            When set, the tag group is archived and excluded from index listings
            by default.
          readOnly: true
          nullable: true
          format: dateTime
        is_deletable:
          type: boolean
          description: >-
            A tag group may not be deleted while it is the primary tag group or
            any of its tags are assigned to active allocations.
        is_component_locked:
          type: boolean
          description: >-
            When `true`, the tags within this group cannot be modified through
            the embedded portal. Tags can still be managed through the API.
        is_journal_entry_dimension:
          type: boolean
          description: >-
            When `true`, this tag group is used as a dimension in journal entry
            reports. A business entity can have up to three journal entry
            dimensions.
        integrations:
          type: object
          description: >-
            Identifiers and object types for this tag group in external
            accounting integrations, used to sync tag groups imported from those
            systems. QuickBooks does not expose a group-level identifier, so
            only the type is stored for QuickBooks.
          nullable: true
          properties:
            xero:
              type: object
              nullable: true
              properties:
                id:
                  type: string
                  description: The unique identifier of the object in Nmbr.
                  readOnly: true
                  maxLength: 32
                type: {}
            quickbooks:
              type: object
              nullable: true
              properties:
                type: {}
        business_entity:
          type: object
          properties:
            id:
              type: string
              description: The unique identifier of the object in Nmbr.
              readOnly: true
            object:
              type: string
              description: The type of the object in Nmbr (`"business_entity"`).
              readOnly: true
        created_at:
          type: string
          description: The date and time the object was created in Nmbr.
          readOnly: true
          format: dateTime
        updated_at:
          type: string
          description: The date and time the object was last updated in Nmbr.
          readOnly: true
          format: dateTime
    Tag:
      type: object
      title: Tag
      properties:
        label:
          type: string
          maxLength: 255
        label_translations:
          type: object
          description: Optional translations for the `label` property.
          allOf:
            - $ref: '#/components/schemas/Translations'
          nullable: true
        label_translated:
          type: string
          description: >-
            The translation of the `label` property for the request locale.
            Computed using the values in `label` and `label_translations` and
            the value of the request's `Accept-Language` header.
          readOnly: true
        description:
          type: string
          nullable: true
        description_translations:
          type: object
          description: Optional translations for the `description` property.
          allOf:
            - $ref: '#/components/schemas/Translations'
          nullable: true
        description_translated:
          type: string
          description: >-
            The translation of the `description` property for the request
            locale. Computed using the values in `description` and
            `description_translations` and the value of the request's
            `Accept-Language` header.
          readOnly: true
        archived_at:
          type: string
          description: >-
            When set, the tag is archived and excluded from index listings by
            default.
          readOnly: true
          nullable: true
          format: dateTime
        is_deletable:
          type: boolean
          description: >-
            A tag may not be deleted while it is assigned to any active
            allocation.
        expense_template_code:
          type: string
          description: >-
            The expense code piece this tag contributes to a generated expense
            code, pulled in by a `tag_group` segment of an accounting code
            rule's expense template.
          nullable: true
          maxLength: 255
        liability_template_code:
          type: string
          description: >-
            The liability code piece this tag contributes to a generated
            liability code, pulled in by a `tag_group` segment of an accounting
            code rule's liability template.
          nullable: true
          maxLength: 255
        integrations:
          type: object
          description: >-
            Identifiers for this tag in external accounting integrations, used
            to sync tags imported from those systems.
          nullable: true
          properties:
            xero:
              type: object
              nullable: true
              properties:
                id:
                  type: string
                  description: The unique identifier of the object in Nmbr.
                  readOnly: true
                  maxLength: 32
            quickbooks:
              type: object
              nullable: true
              properties:
                id:
                  type: string
                  description: The unique identifier of the object in Nmbr.
                  readOnly: true
                  maxLength: 32
        tag_group:
          type: object
          properties:
            id:
              type: string
              description: The unique identifier of the object in Nmbr.
              readOnly: true
            object:
              type: string
              description: The type of the object in Nmbr (`"tag_group"`).
              readOnly: true
        business_entity:
          type: object
          properties:
            id:
              type: string
              description: The unique identifier of the object in Nmbr.
              readOnly: true
            object:
              type: string
              description: The type of the object in Nmbr (`"business_entity"`).
              readOnly: true
        created_at:
          type: string
          description: The date and time the object was created in Nmbr.
          readOnly: true
          format: dateTime
        updated_at:
          type: string
          description: The date and time the object was last updated in Nmbr.
          readOnly: true
          format: dateTime
    BusinessPreset:
      type: object
      title: Business Preset
      properties:
        business_entity:
          type: object
          properties:
            id:
              type: string
              description: The unique identifier of the object in Nmbr.
              readOnly: true
            object:
              type: string
              description: The type of the object in Nmbr (`"business_entity"`).
              readOnly: true
        name:
          type: string
          maxLength: 255
        name_translations:
          type: object
          description: Optional translations for the `name` property.
          allOf:
            - $ref: '#/components/schemas/Translations'
          nullable: true
        name_translated:
          type: string
          description: >-
            The translation of the `name` property for the request locale.
            Computed using the values in `name` and `name_translations` and the
            value of the request's `Accept-Language` header.
          readOnly: true
        title:
          type: string
          nullable: true
        title_translations:
          type: object
          description: Optional translations for the `title` property.
          allOf:
            - $ref: '#/components/schemas/Translations'
          nullable: true
        title_translated:
          type: string
          description: >-
            The translation of the `title` property for the request locale.
            Computed using the values in `title` and `title_translations` and
            the value of the request's `Accept-Language` header.
          readOnly: true
        type:
          type: string
          maxLength: 255
        subtype:
          type: string
          nullable: true
          maxLength: 255
        remittance_account: {}
        is_managed:
          type: boolean
          description: >-
            If true, this is a default Business Preset and can not be deleted,
            `title` and `remittance_account` may be set.
        expense_accounting_code: {}
        liability_accounting_code: {}
        income_basis:
          type: string
          nullable: true
          enum:
            - all_earnings
            - none
            - regular_earnings
            - total_income
        income_includes:
          type: object
          nullable: true
        external_ref:
          type: string
          description: >-
            A reference to the object in an external system, e.g. the primary
            key of the object in your application's database. Nmbr doesn't use,
            validate, parse, or require this value to be unique - it simply
            stores it for your reference.
          nullable: true
          maxLength: 255
        created_at:
          type: string
          description: The date and time the object was created in Nmbr.
          readOnly: true
          format: dateTime
        updated_at:
          type: string
          description: The date and time the object was last updated in Nmbr.
          readOnly: true
          format: dateTime
    AccountingCode:
      type: object
      title: Accounting Code
      properties:
        business_entity:
          type: object
          description: The Business Entity this accounting code belongs to.
          properties:
            id:
              type: string
              description: The unique identifier of the object in Nmbr.
              readOnly: true
            object:
              type: string
              description: The type of the object in Nmbr (`"business_entity"`).
              readOnly: true
        type:
          type: string
          description: The type of accounting code.
          enum:
            - bank
            - expense
            - liability
        code:
          type: string
          description: >-
            The accounting code identifier as it appears in the chart of
            accounts.
          nullable: true
          maxLength: 255
        title:
          type: string
          maxLength: 255
        title_translations:
          type: object
          description: Optional translations for the `title` property.
          allOf:
            - $ref: '#/components/schemas/Translations'
          nullable: true
        title_translated:
          type: string
          description: >-
            The translation of the `title` property for the request locale.
            Computed using the values in `title` and `title_translations` and
            the value of the request's `Accept-Language` header.
          readOnly: true
        description:
          type: string
          nullable: true
        description_translations:
          type: object
          description: Optional translations for the `description` property.
          allOf:
            - $ref: '#/components/schemas/Translations'
          nullable: true
        description_translated:
          type: string
          description: >-
            The translation of the `description` property for the request
            locale. Computed using the values in `description` and
            `description_translations` and the value of the request's
            `Accept-Language` header.
          readOnly: true
        mapping:
          type: object
          nullable: true
          properties:
            xero:
              type: boolean
            quickbooks:
              type: boolean
        fallback_mappings:
          type: object
          description: >-
            Line Item type/subtype pairs that default to this accounting code
            when no specific mapping is configured. Each entry contains `type`
            and `subtype`.
          nullable: true
        created_at:
          type: string
          description: The date and time the object was created in Nmbr.
          readOnly: true
          format: dateTime
        updated_at:
          type: string
          description: The date and time the object was last updated in Nmbr.
          readOnly: true
          format: dateTime
    LiabilityAccountingCode:
      $ref: '#/components/schemas/AccountingCode'
    AccountingCodeTemplate:
      type: object
      description: >-
        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.
      nullable: true
      properties:
        segments:
          type: array
          description: Ordered segments concatenated into the generated code.
          items:
            type: object
            anyOf:
              - type: object
                description: Emits the referenced accounting code's `code`.
                title: Fixed accounting code
                properties:
                  type:
                    type: string
                    enum:
                      - accounting_code
                  id:
                    type: string
                    description: Id of an accounting code in this business entity.
                  prefix:
                    type: string
                    description: Literal text prepended to the resolved value.
                    nullable: true
                    maxLength: 255
                  suffix:
                    type: string
                    description: Literal text appended to the resolved value.
                    nullable: true
                    maxLength: 255
                  transform:
                    type: array
                    description: >-
                      Transforms applied to the resolved value in the order
                      listed.
                    nullable: true
                    items:
                      type: string
                      enum:
                        - alphanumeric
                        - lowercase
                        - uppercase
                  max_length:
                    type: integer
                    description: Truncates the resolved value to this many characters.
                    nullable: true
                    minimum: 1
                  fallback:
                    type: string
                    description: >-
                      Substituted when the resolved value is empty. When absent
                      or empty, an empty segment is dropped instead — prefix and
                      suffix included.
                    nullable: true
                    maxLength: 255
                required:
                  - type
                  - id
              - type: object
                description: >-
                  Emits the row's tag in this group — its expense template code
                  in an expense template, its liability template code in a
                  liability template.
                title: Tag group code
                properties:
                  type:
                    type: string
                    enum:
                      - tag_group
                  tag_group_id:
                    type: string
                    description: Id of a tag group in this business entity.
                  prefix:
                    type: string
                    description: Literal text prepended to the resolved value.
                    nullable: true
                    maxLength: 255
                  suffix:
                    type: string
                    description: Literal text appended to the resolved value.
                    nullable: true
                    maxLength: 255
                  transform:
                    type: array
                    description: >-
                      Transforms applied to the resolved value in the order
                      listed.
                    nullable: true
                    items:
                      type: string
                      enum:
                        - alphanumeric
                        - lowercase
                        - uppercase
                  max_length:
                    type: integer
                    description: Truncates the resolved value to this many characters.
                    nullable: true
                    minimum: 1
                  fallback:
                    type: string
                    description: >-
                      Substituted when the resolved value is empty. When absent
                      or empty, an empty segment is dropped instead — prefix and
                      suffix included.
                    nullable: true
                    maxLength: 255
                required:
                  - type
                  - tag_group_id
          minItems: 1
          maxItems: 20
      required:
        - segments
    Translations:
      type: object
      nullable: true
      properties:
        en:
          type: string
          maxLength: 255
        fr:
          type: string
          maxLength: 255
  securitySchemes:
    CompanyToken:
      type: http
      scheme: bearer

````