> ## 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 a work assignment



## OpenAPI

````yaml /spec/openapi.json post /work_assignments
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:
  /work_assignments:
    post:
      tags:
        - Work Assignments
      summary: Create a work assignment
      operationId: work-assignments-store
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    employee_id:
                      type: string
                      description: >-
                        Must be present when `contractor_id` is either empty or
                        not set.
                    contractor_id:
                      type: string
                      description: >-
                        Must be present when `employee_id` is either empty or
                        not set.
                    pay_schedule_id:
                      type: string
                    pay_split_id:
                      type: string
                    is_primary:
                      type: boolean
                      description: >-
                        When `true`, the standard tax reductions are applied to
                        this work assignment's Pay Stubs. Only one work
                        assignment per Employee per Business Entity may be
                        primary. If none is explicitly set to primary, the
                        earliest work assignment is treated as primary.
                    title:
                      type: string
                      description: >-
                        An optional label for this work assignment, used to
                        distinguish between multiple work assignments for the
                        same Employee or Contractor.
                      nullable: true
                      maxLength: 255
                    title_translations:
                      type: object
                      description: Optional translations for the `title` property.
                      allOf:
                        - $ref: '#/components/schemas/Translations'
                      nullable: true
                    archived_at:
                      type: string
                      description: >-
                        The date the work assignment was archived. Archiving
                        ends the work assignment's participation in future
                        Payrolls. The archive date must not fall before any
                        active Pay Rate's effective period.
                      format: date
                    external_ref:
                      type: string
                      maxLength: 255
                    tag_assignment:
                      type: object
                      properties:
                        unit:
                          type: string
                          enum:
                            - percentage
                        is_component_locked:
                          type: boolean
                        tag_allocations:
                          type: array
                          items:
                            type: object
                            properties:
                              tags:
                                type: array
                                items:
                                  type: string
                              value:
                                type: number
                                format: decimal
                                minimum: 0
                    tax_properties:
                      type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - ca::ab::claim_amount
                              - >-
                                ca::ab::total_income_less_than_total_claim_amount
                              - ca::ab::workers_compensation_class
                              - ca::bc::claim_amount
                              - ca::bc::eht
                              - >-
                                ca::bc::total_income_less_than_total_claim_amount
                              - ca::bc::workers_compensation_class
                              - ca::cpp_exempt
                              - ca::ei_exempt
                              - ca::ei_premium_reduction
                              - ca::federal::additional_tax
                              - ca::federal::annual_deduction_at_source
                              - ca::federal::claim_amount
                              - ca::federal::commission_expenses
                              - ca::federal::commission_total_income
                              - ca::federal::income_tax_rate
                              - >-
                                ca::federal::total_income_less_than_total_claim_amount
                              - ca::federal_oc_surtax_exempt
                              - ca::first_nation_exemptions
                              - ca::mb::claim_amount
                              - ca::mb::eht
                              - >-
                                ca::mb::total_income_less_than_total_claim_amount
                              - ca::mb::workers_compensation_class
                              - ca::nb::claim_amount
                              - >-
                                ca::nb::total_income_less_than_total_claim_amount
                              - ca::nb::workers_compensation_class
                              - ca::nl::claim_amount
                              - ca::nl::eht
                              - >-
                                ca::nl::total_income_less_than_total_claim_amount
                              - ca::nl::workers_compensation_class
                              - ca::ns::claim_amount
                              - >-
                                ca::ns::total_income_less_than_total_claim_amount
                              - ca::ns::workers_compensation_class
                              - ca::nt::claim_amount
                              - ca::nt::territorial_payroll_tax
                              - >-
                                ca::nt::total_income_less_than_total_claim_amount
                              - ca::nt::workers_compensation_class
                              - ca::nu::claim_amount
                              - ca::nu::territorial_payroll_tax
                              - >-
                                ca::nu::total_income_less_than_total_claim_amount
                              - ca::nu::workers_compensation_class
                              - ca::on::claim_amount
                              - ca::on::dependent_children_credit
                              - ca::on::eht
                              - ca::on::impaired_dependants_credit
                              - >-
                                ca::on::total_income_less_than_total_claim_amount
                              - ca::on::workers_compensation_class
                              - ca::pe::claim_amount
                              - >-
                                ca::pe::total_income_less_than_total_claim_amount
                              - ca::pe::workers_compensation_class
                              - ca::province_of_employment
                              - ca::province_of_work
                              - ca::provincial::income_tax_rate
                              - ca::qc::additional_tax
                              - ca::qc::claim_amount
                              - ca::qc::commission_percentage_taxed
                              - ca::qc::eht
                              - ca::qc::income_tax_rate
                              - ca::qc::qpip_exempt
                              - ca::qc::qpp_exempt
                              - ca::qc::tax_id
                              - >-
                                ca::qc::total_income_less_than_total_claim_amount
                              - ca::qc::workers_compensation_class
                              - ca::sk::claim_amount
                              - >-
                                ca::sk::total_income_less_than_total_claim_amount
                              - ca::sk::workers_compensation_class
                              - ca::statutory_holiday_pay
                              - ca::tax_id
                              - ca::yt::claim_amount
                              - >-
                                ca::yt::total_income_less_than_total_claim_amount
                              - ca::yt::workers_compensation_class
                          value:
                            type: string
                          effective_from:
                            type: string
                            format: date
                          effective_to:
                            type: string
                            format: date
                          note:
                            type: string
                            nullable: true
                          owner_id:
                            type: string
                - type: object
                  required:
                    - pay_schedule_id
      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 (`"work_assignment"`).
                    readOnly: true
                  data:
                    $ref: '#/components/schemas/WorkAssignment'
              example:
                id: <id>
                object: work_assignment
                data:
                  title: null
                  title_translations: null
                  title_translated: null
                  employee:
                    id: <id>
                    object: employee
                    links:
                      self: /employees/<id>
                  pay_schedule:
                    id: <id>
                    object: pay_schedule
                    links:
                      self: /pay_schedules/<id>
                  business_entity:
                    id: <id>
                    object: business_entity
                    links:
                      self: /business_entities/<id>
                  current_tax_jurisdiction: ca_on
                  is_primary: true
                  accrued_vacation_pay: 0
                  paid_vacation_pay: 0
                  first_non_draft_period_start: null
                  last_non_draft_period_end: null
                  available_tax_properties:
                    - ca::province_of_employment
                    - ca::province_of_work
                    - ca::federal_oc_surtax_exempt
                    - ca::cpp_exempt
                    - ca::ei_exempt
                    - ca::qc::qpp_exempt
                    - ca::qc::qpip_exempt
                    - ca::nt::territorial_payroll_tax
                    - ca::nu::territorial_payroll_tax
                    - ca::federal::additional_tax
                    - ca::federal::claim_amount
                    - ca::federal::total_income_less_than_total_claim_amount
                    - ca::federal::annual_deduction_at_source
                    - ca::statutory_holiday_pay
                    - ca::first_nation_exemptions
                    - ca::ab::workers_compensation_class
                    - ca::bc::workers_compensation_class
                    - ca::mb::workers_compensation_class
                    - ca::nb::workers_compensation_class
                    - ca::nl::workers_compensation_class
                    - ca::ns::workers_compensation_class
                    - ca::nt::workers_compensation_class
                    - ca::nu::workers_compensation_class
                    - ca::on::workers_compensation_class
                    - ca::pe::workers_compensation_class
                    - ca::qc::workers_compensation_class
                    - ca::sk::workers_compensation_class
                    - ca::yt::workers_compensation_class
                    - ca::on::claim_amount
                    - ca::on::dependent_children_credit
                    - ca::on::impaired_dependants_credit
                  external_ref: null
                  archived_at: null
                  created_at: '2026-01-01T00:00:00.000000Z'
                  updated_at: '2026-01-01T00:00:00.000000Z'
                links:
                  self: /work_assignments/<id>
components:
  schemas:
    Translations:
      type: object
      nullable: true
      properties:
        en:
          type: string
          maxLength: 255
        fr:
          type: string
          maxLength: 255
    WorkAssignment:
      type: object
      title: Work Assignment
      properties:
        title:
          type: string
          description: >-
            An optional label for this work assignment, used to distinguish
            between multiple work assignments for the same Employee or
            Contractor.
          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
        employee:
          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 (`"employee"`).
              readOnly: true
        pay_schedule:
          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_schedule"`).
              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
        current_tax_jurisdiction:
          type: string
          description: >-
            The current Province of Employment (POE) for the work assignment,
            derived from the `ca::province_of_employment` Tax Property on the
            work assignment or, if none is set, from the Business Entity.
          nullable: true
        is_primary:
          type: boolean
          description: >-
            When `true`, the standard tax reductions are applied to this work
            assignment's Pay Stubs. Only one work assignment per Employee per
            Business Entity may be primary. If none is explicitly set to
            primary, the earliest work assignment is treated as primary.
        accrued_vacation_pay:
          type: number
          description: This attribute is deprecated and will be removed.
          deprecated: true
          format: decimal
        paid_vacation_pay:
          type: number
          description: This attribute is deprecated and will be removed.
          deprecated: true
          format: decimal
        first_non_draft_period_start:
          type: string
          description: >-
            The start of the first pay period for which this work assignment has
            a non-draft Payroll. `null` if the work assignment has never
            appeared on an approved or paid Payroll.
          nullable: true
          format: date
        last_non_draft_period_end:
          type: string
          description: >-
            The end of the most recent pay period for which this work assignment
            has a non-draft Payroll. `null` if the work assignment has never
            appeared on an approved or paid Payroll.
          nullable: true
          format: date
        available_tax_properties:
          type: array
          description: >-
            A list of Tax Property template identifiers supported for this work
            assignment, based on its jurisdiction.
          nullable: true
          items:
            type: string
        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
        archived_at:
          type: string
          description: >-
            The date the work assignment was archived. Archiving ends the work
            assignment's participation in future Payrolls. The archive date must
            not fall before any active Pay Rate's effective period.
          readOnly: true
          nullable: true
          format: dateTime
        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

````