Bulk Import Employees
Import up to 500 employee records in a single request.
POST
/api/v1/employees/bulk-importDescription
Creates employee records from an array. Validates all rows before inserting; if any row fails validation, no records are processed. Skips emails that already exist for the company.
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer <access_token> | Yes |
| Content-Type | application/json | Yes |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| employees | array | Yes | Array of employee objects (max 500). Supports camelCase or PascalCase field aliases. |
Each object in employees[]
Same fields as Add Employee. Aliases accepted: FirstName, LastName, LocationName, Email, etc.
Fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| firstname | string | Yes | Employee's first name. Letters and spaces only. |
| lastname | string | Yes | Employee's last name. Letters and spaces only. |
| work_email | string | Yes | Employee's work email address. |
| work_phone | string | Yes | Work phone number, digits only. Spaces and dashes are stripped automatically. |
| work_phone_country | string | Yes | Work phone country as an ISO 3166-1 alpha-2 code (e.g. US, GB). |
| personal_email | string | No | Employee's personal email address. |
| personal_phone | string | No | Employee's personal phone number, digits only. |
| personal_contact_country | string | No | Personal phone country as an ISO 3166-1 alpha-2 code. Also accepted as personal_phone_country. |
| address_1 | string | Yes | Street address line 1. |
| address_2 | string | No | Street address line 2. |
| city | string | Yes | City. |
| state | string | No | State or province. Required for all countries except GB. |
| zip | string | Yes | Postal or zip code. |
| country | string | Yes | Country as an ISO 3166-1 alpha-2 code (e.g. US, DE). |
| location_type | string | Yes | How the employee is based. Must be one of: Warehouse, Corporate Office, Retail Store, Remote Employee. |
| location_name | string | No | Display name for the employee's location. Defaults to "{firstname} {lastname}" when not provided. |
| employee_id | string | No | Employee ID on the location record. |
| employee_number_id | string | No | HRIS employee number. Returned in employment_information. |
| department | string | No | Department name. Must match an existing department for your company; returns 422 if not found. |
| employment_status | string | No | Employment status (e.g. Active, Terminated). |
| employment_type | string | No | Employment type (e.g. Full Time, Contractor). |
| manager | string | No | Manager name or identifier. |
| employment_start_date | string | No | Start date (ISO 8601, e.g. 2024-01-15). |
| termination_date | string | No | Termination date (ISO 8601). |
| work_phone | string | No | HRIS work phone (digits only). Also returned in employment_information; may differ from top-level work_phone. |
Example Request Body
{
"employees": [
{
"firstname": "Jane",
"lastname": "Doe",
"work_email": "jane.doe@company.com",
"work_phone": "4155551234",
"work_phone_country": "US",
"personal_email": "jane.doe@gmail.com",
"personal_phone": "4155559999",
"personal_contact_country": "US",
"address_1": "123 Market Street",
"address_2": "Suite 400",
"city": "San Francisco",
"state": "CA",
"zip": "94103",
"country": "US",
"location_type": "Remote Employee",
"location_name": "Remote - San Francisco",
"department": "IT",
"employee_id": "EMP-501",
"employment_status": "Active",
"employment_type": "Full Time",
"manager": "John Shah",
"employment_start_date": "2024-01-15"
},
{
"firstname": "Jane",
"lastname": "Smith",
"work_email": "jane.smith@example.com",
"work_phone": "4155551234",
"work_phone_country": "US",
"personal_email": "jane.doe@gmail.com",
"personal_phone": "4155559999",
"personal_contact_country": "US",
"address_1": "123 Market Street",
"address_2": "Suite 400",
"city": "San Francisco",
"state": "CA",
"zip": "94103",
"country": "US",
"location_type": "Remote Employee",
"location_name": "Remote - San Francisco",
"department": "IT",
"employee_id": "EMP-501",
"employment_status": "Active",
"employment_type": "Full Time",
"manager": "John Shah",
"employment_start_date": "2024-01-15"
}
]
}Response
| Field | Type | Description |
|---|---|---|
| success | boolean | Request success flag. |
| message | string | Summary of import result. |
| created | number | Number of employees created. |
| skipped | number | Number skipped (duplicate email or error). |
| employees | array | Created employee records with employment_information. |
| employees[].id | string | Use the full value in detail and update routes. |
| employees[].firstname | string | Employee's first name. |
| employees[].lastname | string | Employee's last name. |
| employees[].location_name | string | Display name for the employee's location. |
| employees[].work_email | string | Employee's work email address. |
| employees[].work_phone | string | Work phone number, digits only. |
| employees[].work_phone_country | string | Work phone country as an ISO 3166-1 alpha-2 code. |
| employees[].address_1 | string | Address line 1. |
| employees[].address_2 | string | Address line 2. Null if not provided. |
| employees[].city | string | City. |
| employees[].state | string | State or province. |
| employees[].zip | string | Postal or zip code. |
| employees[].country | string | Country as an ISO 3166-1 alpha-2 code. |
| employees[].location_type | string | How the employee is based (e.g. Remote Employee, Corporate Office). |
| employees[].department | string | Department name. Null if not provided. |
| employees[].configure_cost_center_id | number | ID of the assigned cost center. Null if not configured. |
| employees[].employee_id | string | Employee ID on the location record. Null if not provided. |
| employees[].employment_information | object | Employment and personal contact fields submitted with the request. Null if no employment fields were provided. Only fields with values are included. See fields below. |
| employees[].email | string | Legacy alias for work_email. |
| employees[].contact_info | string | Legacy alias for work_phone. |
| employees[].contact_country | string | Legacy alias for work_phone_country. |
| employees[].employment_information.employment_status | string | Employment status (e.g. Active, Terminated). |
| employees[].employment_information.employment_type | string | Employment type (e.g. Full Time, Part Time, Contractor). |
| employees[].employment_information.employment_start_date | string | Start date in YYYY-MM-DD format. |
| employees[].employment_information.termination_date | string | Termination date in YYYY-MM-DD format. Only present when employment_status is Terminated. |
| employees[].employment_information.manager | string | Direct manager's name or identifier. |
| employees[].employment_information.personal_email | string | Employee's personal email address. |
| employees[].employment_information.personal_phone | string | Employee's personal phone number, digits only. |
| employees[].employment_information.personal_contact_country | string | Personal phone country as an ISO 3166-1 alpha-2 code. |
Related Endpoints
Did this page help you?
Request
curl -X POST https://uat.unduit.com/api-exposed/api/v1/employees/bulk-import \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"employees": [
{
"firstname": "Jane",
"lastname": "Doe",
"work_email": "jane.doe@company.com",
"work_phone": "4155551234",
"work_phone_country": "US",
"personal_email": "jane.doe@gmail.com",
"personal_phone": "4155559999",
"personal_contact_country": "US",
"address_1": "123 Market Street",
"address_2": "Suite 400",
"city": "San Francisco",
"state": "CA",
"zip": "94103",
"country": "US",
"location_type": "Remote Employee",
"location_name": "Remote - San Francisco",
"department": "IT",
"employee_id": "EMP-501",
"employment_status": "Active",
"employment_type": "Full Time",
"manager": "John Shah",
"employment_start_date": "2024-01-15"
},
{
"firstname": "Jane",
"lastname": "Smith",
"work_email": "jane.smith@example.com",
"work_phone": "4155551234",
"work_phone_country": "US",
"personal_email": "jane.doe@gmail.com",
"personal_phone": "4155559999",
"personal_contact_country": "US",
"address_1": "123 Market Street",
"address_2": "Suite 400",
"city": "San Francisco",
"state": "CA",
"zip": "94103",
"country": "US",
"location_type": "Remote Employee",
"location_name": "Remote - San Francisco",
"department": "IT",
"employee_id": "EMP-501",
"employment_status": "Active",
"employment_type": "Full Time",
"manager": "John Shah",
"employment_start_date": "2024-01-15"
}
]
}'Success Response
{
"success": true,
"message": "2 employee(s) imported successfully",
"created": 2,
"skipped": 0,
"employees": [
{
"id": "1421797-501",
"first_name": "Jane",
"last_name": "Doe",
"location_name": "Remote - San Francisco",
"work_email": "jane.doe@company.com",
"email": "jane.doe@company.com",
"work_phone": "4155551234",
"work_phone_country": "US",
"contact_info": "4155551234",
"phone_country_code": "US",
"address_1": "123 Market Street",
"address_2": "Suite 400",
"city": "San Francisco",
"state": "CA",
"zip": "94103",
"country": "US",
"location_type": "Remote Employee",
"department": "IT",
"configure_cost_center_id": null,
"employee_id": null,
"employment_information": {
"employment_status": "Active",
"employment_type": "Full Time",
"employment_start_date": "2024-01-15",
"manager": "John Shah",
"personal_email": "jane.doe@gmail.com",
"personal_phone": "4155559999",
"personal_contact_country": "US"
}
},
{
"id": "7890262-502",
"first_name": "Jane",
"last_name": "Smith",
"location_name": "Jane Smith",
"work_email": "jane.smith@example.com",
"email": "jane.smith@example.com",
"work_phone": "4155551234",
"work_phone_country": "US",
"contact_info": "4155551234",
"phone_country_code": "US",
"address_1": "123 Market Street",
"address_2": "Suite 400",
"city": "San Francisco",
"state": "CA",
"zip": "94103",
"country": "US",
"location_type": "Remote Employee",
"department": "IT",
"configure_cost_center_id": null,
"employee_id": null,
"employment_information": {
"employment_status": "Active",
"employment_type": "Full Time",
"employment_start_date": "2024-01-15",
"manager": "John Shah",
"personal_email": "jane.doe@gmail.com",
"personal_phone": "4155559999",
"personal_contact_country": "US"
}
}
]
}Error Responses
422 Validation Error
{
"success": false,
"message": "One or more records contain invalid data. No records were processed.",
"errors": {
"row_errors": [
{ "index": 0, "errors": ["Row 1: department 'Finance' not found"] }
]
}
}401 Unauthorized
{
"message": "Access denied: No token provided."
}