> ## 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 employer statutory withholding line item

> Only available on correction and historical payrolls.



## OpenAPI

````yaml /spec/openapi.json post /employer_statutory_withholding_line_items
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:
  /employer_statutory_withholding_line_items:
    post:
      tags:
        - Employer Statutory Withholding Line Items
      summary: Create an employer statutory withholding line item
      description: Only available on correction and historical payrolls.
      operationId: employer-statutory-withholding-line-items-store
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    pay_stub_id:
                      type: string
                    business_preset_id:
                      type: string
                    employer_statutory_withholding_type:
                      type: string
                      description: >-
                        The type of employer statutory withholding for this line
                        item.


                        Must be present when `business_preset_id` is either
                        empty or not set.
                      enum:
                        - cpp
                        - cpp_2
                        - eht
                        - ei
                        - qpip
                        - qpp
                        - qpp_2
                        - wcb
                    custom_amount:
                      type: number
                      description: >-
                        An override for `managed_amount`. When set, `amount`
                        reflects this value instead of `managed_amount`.
                      format: decimal
                      maximum: 999999
                    title:
                      type: string
                      nullable: true
                      maxLength: 255
                    title_translations:
                      type: object
                      description: Optional translations for the `title` property.
                      allOf:
                        - $ref: '#/components/schemas/Translations'
                      nullable: true
                    remittance_account_id:
                      type: string
                    expense_accounting_code_id:
                      type: string
                    custom_expense_accounting_code_id:
                      type: string
                    liability_accounting_code_id:
                      type: string
                    custom_liability_accounting_code_id:
                      type: string
                    external_ref:
                      type: string
                      maxLength: 255
                - type: object
                  required:
                    - pay_stub_id
            example:
              pay_stub_id: <id>
              employer_statutory_withholding_type: ei
      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
                      (`"employer_statutory_withholding_line_item"`).
                    readOnly: true
                  data:
                    $ref: '#/components/schemas/EmployerStatutoryWithholdingLineItem'
              example:
                id: <id>
                object: employer_statutory_withholding_line_item
                data:
                  pay_stub:
                    id: <id>
                    object: pay_stub
                    links:
                      self: /pay_stubs/<id>
                  line_item_type: employer_statutory_withholding
                  is_system: true
                  is_managed: true
                  amount: 0
                  custom_amount: null
                  managed_amount: 0
                  employer_statutory_withholding_type:
                    id: <id>
                    object: employer_statutory_withholding_type
                    data:
                      type: ei
                      label: EI
                    links:
                      self: /employer_statutory_withholding_types/ei
                  title: EI
                  title_translations:
                    en: EI
                    fr: AE
                  title_translated: EI
                  remittance_account:
                    id: <id>
                    object: remittance_account
                    links:
                      self: /remittance_accounts/<id>
                  source_adjustment: null
                  business_preset:
                    id: <id>
                    object: business_preset
                    links:
                      self: /business_presets/<id>
                  expense_accounting_code: null
                  managed_expense_accounting_code: null
                  custom_expense_accounting_code: null
                  liability_accounting_code: null
                  managed_liability_accounting_code: null
                  custom_liability_accounting_code: null
                  component_settings:
                    attributes_locked: false
                  created_at: '2026-01-01T00:00:00.000000Z'
                  updated_at: '2026-01-01T00:00:00.000000Z'
                links:
                  self: /employer_statutory_withholding_line_items/<id>
components:
  schemas:
    Translations:
      type: object
      nullable: true
      properties:
        en:
          type: string
          maxLength: 255
        fr:
          type: string
          maxLength: 255
    EmployerStatutoryWithholdingLineItem:
      type: object
      title: Employer Statutory Withholding Line Item
      properties:
        pay_stub:
          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 (`"pay_stub"`).
              readOnly: true
        line_item_type:
          type: string
          nullable: true
        is_system:
          type: boolean
          description: >-
            Whether this line item was generated automatically by the payroll
            engine.
        is_managed:
          type: boolean
          description: >-
            Always `true`. Employer statutory withholding line items are fully
            managed by the payroll engine and cannot be created, updated, or
            deleted.
        amount:
          type: number
          description: >-
            The effective amount for this line item. Returns `custom_amount` if
            set, otherwise `managed_amount`. Read-only.
          nullable: true
          format: decimal
        custom_amount:
          type: number
          description: >-
            An override for `managed_amount`. When set, `amount` reflects this
            value instead of `managed_amount`.
          nullable: true
          format: decimal
        managed_amount:
          type: number
          description: >-
            The withholding amount calculated by the payroll engine. Read-only;
            set `custom_amount` to override.
          format: decimal
        employer_statutory_withholding_type:
          type: object
          description: The type of employer statutory withholding for this line item.
          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
                (`"employer_statutory_withholding_type"`).
              readOnly: true
            data:
              $ref: '#/components/schemas/EmployerStatutoryWithholdingType'
        title:
          type: string
          nullable: true
          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
        remittance_account:
          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 (`"remittance_account"`).
              readOnly: true
        source_adjustment: {}
        business_preset:
          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_preset"`).
              readOnly: true
        expense_accounting_code:
          description: >-
            The effective expense accounting code. Returns the user-set value if
            present, otherwise the system-derived value. Writes to this field
            set the user override.
        managed_expense_accounting_code:
          description: >-
            The expense accounting code derived by the system from accounting
            code rules and presets. Read-only.
        custom_expense_accounting_code:
          description: >-
            User-set expense accounting code that overrides the system-derived
            value.
        liability_accounting_code:
          description: >-
            The effective liability accounting code. Returns the user-set value
            if present, otherwise the system-derived value. Writes to this field
            set the user override.
        managed_liability_accounting_code:
          description: >-
            The liability accounting code derived by the system from accounting
            code rules and presets. Read-only.
        custom_liability_accounting_code:
          description: >-
            User-set liability accounting code that overrides the system-derived
            value.
        component_settings:
          type: object
          description: Settings specific to the Nmbr component.
          nullable: true
          properties:
            attributes_locked:
              type: boolean
              description: >-
                Whether the line item is locked and cannot be edited in the
                component.
        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
    EmployerStatutoryWithholdingType:
      type: object
      title: Employer Statutory Withholding Type
      properties:
        type:
          type: string
          description: The string identifier for this employer statutory withholding type.
          nullable: true
        label:
          type: string
          description: >-
            The human-readable display name for this employer statutory
            withholding type.
          nullable: true
  securitySchemes:
    CompanyToken:
      type: http
      scheme: bearer

````