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

# Create an accounting code



## OpenAPI

````yaml /spec/openapi.json post /accounting_codes
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:
    post:
      tags:
        - Accounting Codes
      summary: Create an accounting code
      operationId: accounting-codes-store
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    business_entity_id:
                      type: string
                    title:
                      type: string
                      maxLength: 255
                    title_translations:
                      type: object
                      description: Optional translations for the `title` property.
                      allOf:
                        - $ref: '#/components/schemas/Translations'
                      nullable: 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.
                      maxLength: 255
                    description:
                      type: string
                      nullable: true
                    description_translations:
                      type: object
                      description: Optional translations for the `description` property.
                      allOf:
                        - $ref: '#/components/schemas/Translations'
                      nullable: true
                    fallback_mappings:
                      type: array
                      description: >-
                        Line Item type/subtype pairs that default to this
                        accounting code when no specific mapping is configured.
                        Each entry contains `type` and `subtype`.


                        Must be an array of valid `type` and `subtype` pairs


                        The combination of `type` and `subtype` must be unique
                        within the business entities accounting codes, for the
                        same accounting code type.
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            description: The type of accounting code.
                            enum:
                              - allowance
                              - deduction
                              - earning
                              - employee_benefit
                              - employer_benefit
                              - employer_statutory_withholding
                              - reimbursement
                              - statutory_withholding
                          subtype:
                            type: string
                            enum:
                              - accident_insurance_plan
                              - automobile_and_motor_vehicle
                              - bonus_discretionary
                              - bonus_non_discretionary
                              - bonus_non_taxable
                              - cell_phone_allowance
                              - charitable_donation
                              - child_care_expenses
                              - child_eduction_non_taxable
                              - child_eduction_taxable
                              - clothing_non_taxable
                              - clothing_taxable
                              - commission
                              - commission_periodic
                              - commission_self_employed
                              - cpp
                              - cpp_2
                              - critical_illness
                              - death_benefit
                              - debt_relief
                              - dental
                              - education_and_professional_development
                              - eht
                              - ei
                              - employee_assistance_program
                              - federal_income_tax
                              - fondaction
                              - fondaction_rrsp
                              - fonds_solidarite_ftq
                              - fonds_solidarite_ftq_rrsp
                              - garnishment_order
                              - gift_cash
                              - gift_near_cash
                              - gift_non_cash_non_taxable
                              - gift_non_cash_taxable
                              - gratuity
                              - group_dependent_life_insurance
                              - group_term_life_insurance
                              - health
                              - health_spending_account
                              - housing_allowance_cash
                              - in_lieu_wages
                              - income_replacement_indemnity_non_taxable
                              - income_replacement_indemnity_taxable
                              - income_tax
                              - internet_allowance
                              - invoice_payment
                              - invoice_sales_tax
                              - leave_bereavement
                              - leave_citizenship
                              - leave_domestic_and_sexual_violence
                              - leave_general
                              - leave_jury_duty
                              - leave_maternity
                              - leave_organ_donor
                              - leave_parental
                              - leave_paternity
                              - leave_personal
                              - leave_sick
                              - leave_voting
                              - leave_wedding
                              - long_term_disability
                              - meals_subsidized_non_cash
                              - meals_taxable
                              - moving_allowance_non_taxable
                              - moving_allowance_taxable
                              - municipal_officers_expense
                              - non_group_long_term_disability
                              - non_group_short_term_disability
                              - non_taxable_allowance
                              - non_taxable_reimbursement
                              - other_deduction
                              - overtime
                              - overtime_meals_non_taxable
                              - parental_top_up_insurable
                              - parental_top_up_non_insurable
                              - parking
                              - parking_allowance
                              - pension
                              - pension_dbpp
                              - pension_dcpp
                              - pension_mfpp
                              - pension_prpp
                              - pension_restricted_rrsp
                              - pension_rrsp
                              - pension_rrsp_non_periodic
                              - pension_unregistered_prpp
                              - pension_vrsp
                              - professional_membership
                              - professional_membership_dues_taxable
                              - profit_sharing_dpsp
                              - provincial_income_tax
                              - qpip
                              - qpp
                              - qpp_2
                              - retiring_allowance
                              - retiring_allowance_eligible
                              - retroactive_pay
                              - retroactive_pay_increase
                              - salary
                              - salary_continuance
                              - savings_tfsa
                              - second_opinion_medical_consultation
                              - severance_pay
                              - short_term_disability
                              - social_event_allowance
                              - statutory_holiday_pay
                              - supplemental_unemployment
                              - taxable_cash_allowance
                              - taxable_reimbursement
                              - territorial_income_tax
                              - time_off_in_lieu
                              - time_off_in_lieu_overtime
                              - tools_allowance
                              - transit_pass
                              - transportation_to_from_work
                              - travelling_allowance_non_taxable
                              - travelling_allowance_taxable
                              - uk_paye_income_tax
                              - union_dues
                              - union_dues_post_tax
                              - utilities_allowance
                              - vacation_accrual_adjustment
                              - vacation_pay
                              - vacation_pay_employee_terminated
                              - vacation_pay_no_time_taken
                              - vacation_pay_time_taken
                              - vehicle_allowance_non_taxable
                              - vehicle_employer_provided
                              - virtual_health_service
                              - wage
                              - wcb
                              - wellness_spending_account
                - type: object
                  required:
                    - business_entity_id
                    - title
                    - type
            example:
              business_entity_id: <id>
              title: Expense Code
              type: expense
              code: '5100'
      responses:
        '201':
          description: Created
          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: '5100'
                  title: Expense Code
                  title_translations: null
                  title_translated: Expense Code
                  description: null
                  description_translations: null
                  description_translated: null
                  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:
    Translations:
      type: object
      nullable: true
      properties:
        en:
          type: string
          maxLength: 255
        fr:
          type: string
          maxLength: 255
    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
  securitySchemes:
    CompanyToken:
      type: http
      scheme: bearer

````