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

# Adding Employees

> Manually capturing employee onboarding requirements

## Capture employee information

Creating an employee in Nmbr requires providing the required information to the employee API endpoint.

**Request**

```bash theme={null}
curl --request POST \
     --url https://sandbox.nmbr.co/services/payroll/employees \
     --header 'Authorization: Bearer <access_token>' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
        "employee_number": "69878",
        "first_name": "Kendall",
        "last_name": "Hintz",
        "middle_initial": null,
        "address_line_1": "Spencer Meadows",
        "address_line_2": null,
        "city": "Toronto",
        "province_code": "ON",
        "country_code": "CA",
        "postal_code": "M1M1M1",
        "sin": "<sin>"
    }'
```

**Response**

```json theme={null}
{
  "id": "01hhcy3hg60x3dq8hfj31hgyea",
  "object": "employee",
  "data": {
    "employee_number": "69878",
    "first_name": "Kendall",
    "last_name": "Hintz",
    "middle_initial": null,
    "address_line_1": "Spencer Meadows",
    "address_line_2": null,
    "city": "Toronto",
    "province_code": "ON",
    "country_code": "CA",
    "postal_code": "M1M1M1",
    "sin": "<sin>",
    "is_archived": false,
    "created_at": "2023-12-11T17:16:57.000000Z",
    "updated_at": "2023-12-11T17:16:57.000000Z"
  },
  "links": {
    "self": "https://sandbox.nmbr.co/services/payroll/employees/01hhcy3hg60x3dq8hfj31hgyea"
  }
}
```

## Work Assignments

A core concept in the Nmbr API is Work Assignments. Work Assignments allow you to attach an Employee and Pay-Rates to a Pay Schedule.

Work Assignments offer a flexible data architecture to allow you to represent both simple and complex employment scenarios depending on your requirements.

An Employee may have multiple Work Assignments, which can represent different jobs or work held by the employee within a single Business Entity. This may depend on your product needs and data architecture.

When creating a Benefit, Deduction, Reimbursement, or Allowance, these entities are attached to a Work Assignment. This allows Nmbr to know which Pay-Schedule to apply these on.

### How Business Entity influences Work Assignments

* An Employee may have multiple Work Assignments within a single Company.
* An Employee may only have one Work Assignment per Pay-Schedule.
* A single Work Assignment may have multiple Pay-Rates.
* CPP and EI Statutory Withholding limits are calculated across all Work Assignments for an Employee within a single Business Entity - meaning Employee and Employer contributions should not exceed their maximum contribution limits.
* A Work Assignment inherits the Business Entity's Province of Employment by default. If the Work Assignment should use a different province, create a `ca::province_of_employment` Tax Property for the Work Assignment. You can include this in `tax_properties` when creating the Work Assignment or create it later using the [Province of Employment guide](/guides/payroll-fundamentals/province-of-employment).

### Creating a Work Assignment

```bash theme={null}
curl --request POST \
     --url 'https://sandbox.nmbr.co/services/payroll/work_assignments' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer <access_token>' \
     --data '{
         "employee_id": "<employee_id>",
         "pay_schedule_id": "<pay_schedule_id>",
         "tax_properties": [
           {
             "type": "ca::province_of_employment",
             "value": "ca_on",
             "effective_from": "2026-01-01"
           }
         ]
}'
```

<details>
  <summary>View sample JSON Response</summary>

  ```json theme={null}
  {
    "id": "01j29zj9tng0db7qhs9et8f8z7",
    "object": "work_assignment",
    "data": {
      "title": null,
      "employee": {
        "id": "01j18hrp4cvvbzr1y9x8m05tdf",
        "object": "employee",
        "links": {
          "self": "https://sandbox.nmbr.co/services/payroll/employees/01j18hrp4cvvbzr1y9x8m05tdf"
        }
      },
      "pay_schedule": {
        "id": "01j18hrnkac0btavbxhk8g56kx",
        "object": "pay_schedule",
        "links": {
          "self": "https://sandbox.nmbr.co/services/payroll/pay_schedules/01j18hrnkac0btavbxhk8g56kx"
        }
      },
      "business_entity": {
        "id": "01j18hrng6h90bxgfz92re28ab",
        "object": "business_entity",
        "links": {
          "self": "https://sandbox.nmbr.co/services/payroll/business_entities/01j18hrng6h90bxgfz92re28ab"
        }
      },
      "current_tax_jurisdiction": "ca_on",
      "accrued_vacation_pay": 0,
      "paid_vacation_pay": 0,
      "archived_at": null,
      "created_at": "2024-07-08T20:11:37.000000Z",
      "updated_at": "2024-07-08T20:11:37.000000Z"
    },
    "links": {
      "self": "https://sandbox.nmbr.co/services/payroll/work_assignments/01j29zj9tng0db7qhs9et8f8z7"
    }
  }
  ```
</details>

### Removing a Work Assignment

* Work Assignments may only be deleted when there are no Pay Stubs with a status of `processing`, `failed`, or `paid`.
* A Work Assignment may be archived to remove it from future Payrolls. Archived Work Assignments are also removed by default from lists of Work Assignments.
