> ## 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.

# Merge accounting codes

> Merge manual generated accounting codes into other codes. A manual code is any code that has no `xero_id` or `quickbooks_id`, which indicates it was imported from an external accounting platform. The manual codes will be deleted after reassignment, with all references to them updated to the target accounting code.



## OpenAPI

````yaml /spec/openapi.json post /accounting_codes/{accounting_code}/merge
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_codes/{accounting_code}/merge:
    post:
      tags:
        - Accounting Codes
      summary: Merge accounting codes
      description: >-
        Merge manual generated accounting codes into other codes. A manual code
        is any code that has no `xero_id` or `quickbooks_id`, which indicates it
        was imported from an external accounting platform. The manual codes will
        be deleted after reassignment, with all references to them updated to
        the target accounting code.
      operationId: accounting-codes-merge
      parameters:
        - name: accounting_code
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                accounting_code_ids:
                  type: array
                  description: >-
                    An array of one or more accounting code IDs to be removed
                    from the system, with all references to them updated to the
                    accounting code in the resource path. All accounting codes
                    in this array must be of the same `type` as the accounting
                    code in the resource path, and must belong to the same
                    business entity.
                  items:
                    type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                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"`).
                    readOnly: true
                  data:
                    $ref: '#/components/schemas/AccountingCode'
              example:
                id: <id>
                object: accounting_code
                data:
                  business_entity:
                    id: <id>
                    object: business_entity
                    links:
                      self: /business_entities/<id>
                  type: expense
                  code: '9916'
                  title: Vitae error architecto sint.
                  title_translations: null
                  title_translated: Vitae error architecto sint.
                  description: >-
                    Vitae error architecto sint velit tempora illo itaque
                    consequuntur omnis ratione esse sint.
                  description_translations: null
                  description_translated: >-
                    Vitae error architecto sint velit tempora illo itaque
                    consequuntur omnis ratione esse sint.
                  mapping:
                    xero: false
                    quickbooks: false
                  fallback_mappings: []
                  created_at: '2026-01-01T00:00:00.000000Z'
                  updated_at: '2026-01-01T00:00:00.000000Z'
                links:
                  self: /accounting_codes/<id>
components:
  schemas:
    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
    Translations:
      type: object
      nullable: true
      properties:
        en:
          type: string
          maxLength: 255
        fr:
          type: string
          maxLength: 255
  securitySchemes:
    CompanyToken:
      type: http
      scheme: bearer

````