---
title: Bulk create or update user information
slug: api/bulk-create-or-update-user-info
description: API reference for POST endpoint: Bulk create or update user information.
docTags: 
createdAt: 2023-11-24T06:25:09.159Z
---

:::hint{type="success"}
<font color="#3b9f0f">**POST**</font>**&#x20;/api/bulk\_add\_edit\_staff**
:::

Creates or updates staff information using the user IDs in your system (external ID).This endpoint is used for multiple staff.



**Request**

***

<font color="#00a2e9">**Body parameters**</font>

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**customer\_id** <font color="#a7b4c3">string Required</font>
:::

:::VerticalSplitItem
The unique Marco identifier for your company.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**bulk\_staff\_data** <font color="#a7b4c3">array\[object\] Required</font>
:::

:::VerticalSplitItem
An array of objects containing each staff's information.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**customer\_system\_id** <font color="#a7b4c3">string Required</font>
:::

:::VerticalSplitItem
The staff's unique identifier in your company's system.

Example: 50
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**customer\_system\_id\_type** <font color="#a7b4c3">string Required</font>
:::

:::VerticalSplitItem
The name of your system.

Example: PS
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**name** <font color="#a7b4c3">string </font><font color="#a7b4c3">Required</font>
:::

:::VerticalSplitItem
The staff's full name.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**system\_email** <font color="#a7b4c3">string </font><font color="#a7b4c3">Required</font>
:::

:::VerticalSplitItem
The staff's email, used to log into Marco.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**country** <font color="#a7b4c3">string </font><font color="#a7b4c3">Required</font>
:::

:::VerticalSplitItem
The staff's country, formatted as an [ISO Alpha-2 code](https://www.iban.com/country-codes).

Example: JP
:::
::::

:::hint{type="info"}
**Note:**
If you are changing the staff's `country`, you must fill in`old_country` and `new_country_effective_date`.
:::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**job\_title** <font color="#a7b4c3">string Required</font>&#x20;
:::

:::VerticalSplitItem
The staff's job title.

Example: HR Manager
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**job\_start\_date** <font color="#a7b4c3">string</font><font color="#a7b4c3"> Required</font>&#x20;
:::

:::VerticalSplitItem
The staff's job start date, formatted as YYYY-MM-DD.

Example: 2020-01-31
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**staff\_type** <font color="#a7b4c3">string</font><font color="#a7b4c3"> Required</font>&#x20;
:::

:::VerticalSplitItem
The staff's service type.

Valid values: System, Payroll, HRO, EOR
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**is\_manager** <font color="#a7b4c3">boolean Optional</font>
:::

:::VerticalSplitItem
Whether the staff is a manager.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**is\_employee** <font color="#a7b4c3">boolean Optional</font>
:::

:::VerticalSplitItem
Whether the staff is an employee.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**is\_intern** <font color="#a7b4c3">boolean Optional</font>
:::

:::VerticalSplitItem
Whether the staff is an intern. Cannot be true if any of the previous boolean values are true.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**birthdate** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's date of birth, formatted as YYYY-MM-DD.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**gender** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's gender.

Valid values: Female, Male
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**highest\_education** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's highest education.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**nationality** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's nationality, formatted as the country's [ISO Alpha-2 code](https://www.iban.com/country-codes).
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**personal\_email** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's personal email.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**phone** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's phone number.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**phone\_country** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The country code for the staff's phone number, formatted as the country's [ISO Alpha-2 code](https://www.iban.com/country-codes).
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**emergency\_name** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The name of the staff's emergency contact.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**emergency\_email** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The email belonging to the staff's emergency contact.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**emergency\_phone** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The phone number belonging to the staff's emergency contact.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**emergency\_phone\_country** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The country code for the staff's emergency contact's phone number, formatted as the country's [ISO Alpha-2 code](https://www.iban.com/country-codes).
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**emergency\_relationship** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's relationship to the emergency contact.

Example: Husband
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**passport\_number** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's passport number.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**passport\_issue\_date** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's passport issue date, formatted as YYYY-MM-DD.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**passport\_issuing\_country** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's passport issuing country, stored as an [ISO Alpha-2 code](https://www.iban.com/country-codes).
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**passport\_expiry\_date** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's passport expiry date, formatted as YYYY-MM-DD.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**reporting\_officer** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's reporting manager.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**ec\_type** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's employment contract type.

Valid values: Fixed-term, Indefinite
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**ec\_entity\_id** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The unique identifier for the business entity that holds the employment relationship with the staff.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**ec\_entity\_system\_id\_type** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The system that stores the ec\_entity\_id.

Valid values: Marco, Customer
Use "Marco" if the ID is stored in Marco; otherwise use "Customer".
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**ec\_start\_date** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The start date for the staff's employment contract, formatted as YYYY-MM-DD. This may differ from the job start date if multiple contracts have been signed in succession.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**ec\_end\_date** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The end date for the staff's employment contract, formatted as YYYY-MM-DD.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**probation\_end\_date** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's probation end date, formatted as YYYY-MM-DD.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**last\_working\_day** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's last working day, formatted as YYYY-MM-DD.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**offboarding\_reason** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's offboarding reason.

Valid values: Involuntary, Voluntary
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**location** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's work location.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**work\_email** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's work email.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**customer\_data\_type** <font color="#a7b4c3">array\[object\] </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
Additional data specified by your company. These data fields need to be specified in Marco as a Company Data Type before it can be sent via the endpoint.

Example: \[\{"name":"Department","value":"Technology"},\{"name":"Rank","value":"P2"}]
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
customer\_data\_type.**name** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
Custom data field name.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
customer\_data\_type.**value** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's value for the custom field.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**old\_country** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The staff's previous country of residence, formatted as an [ISO Alpha-2 code](https://www.iban.com/country-codes).

Required only if you are updating the staff's `country`.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
bulk\_staff\_data.**new\_country\_effective\_date** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
Effective date of the staff's relocation, formatted as YYYY-MM-DD.

Required only if you are updating the staff's `country`.
:::
::::

***



**Example Requests**

***

::::CodeDrawer{title="Example" isResponseExpanded="true"}
:::CodeblockTabsExamples
```curl
curl -X POST 'https://api.marcopayroll.com/api:benKoCK8/api/bulk_add_edit_staff' \
-H 'Content-Type: application/json' \
-H 'Authorization: $AUTH_TOKEN' \
-d '{
  "customer_id": "2",
  "bulk_staff_data": [
    {
      "customer_system_id": "55",
      "name": "Tuantuan",
      "system_email": "tuantuan@mail.com",
      "country": "SG",
      "job_title": "Technical Writer",
      "job_start_date": "2022-09-08",
      "staff_type": "System",
      "is_employee": "false",
      "is_manager": "false",
      "is_intern": "false",
      "birthdate": "",
      "gender": "",
      "highest_education": "",
      "nationality": "",
      "personal_email": "",
      "phone": "",
      "phone_country": "",
      "emergency_name": "",
      "emergency_email": "",
      "emergency_phone": "",
      "emergency_phone_country": "",
      "emergency_relationship": "",
      "passport_issue_date": "",
      "passport_expiry_date": "",
      "passport_issuing_country": "",
      "passport_number": "",
      "reporting_officer": "",
      "ec_type": "",
      "ec_end_date": "",
      "probation_end_date": "",
      "last_working_day": "",
      "offboarding_reason": "",
      "location": "",
      "work_email": "",
      "customer_data_type": [
        {
          "name": "Department",
          "value": "Finance"
        },
        {
          "name": "Rank",
          "value": "P1"
        }
      ]
    },
    {
      "customer_system_id": "56",
      "name": "Yuanyuan",
      "system_email": "yuanyuan@mail.com",
      "country": "SG",
      "job_title": "Finance Manager",
      "job_start_date": "2020-07-23",
      "staff_type": "System",
      "is_employee": "false",
      "is_manager": "false",
      "is_intern": "false",
      "birthdate": null,
      "gender": "",
      "highest_education": "",
      "nationality": "",
      "personal_email": "",
      "phone": "",
      "phone_country": "",
      "emergency_email": "",
      "emergency_name": "",
      "emergency_phone": "",
      "emergency_phone_country": "",
      "emergency_relationship": "",
      "passport_issue_date": "",
      "passport_expiry_date": "",
      "passport_issuing_country": "",
      "passport_number": "",
      "reporting_officer": "",
      "ec_type": "",
      "ec_end_date": "",
      "probation_end_date": "",
      "last_working_day": "",
      "offboarding_reason": "",
      "location": "",
      "work_email": "",
      "customer_data_type": [
        {
          "name": "Department",
          "value": "Customer Manager"
        },
        {
          "name": "Rank",
          "value": "P2"
        }
      ]
    }
  ]
}' 
```

```python
import requests

url = "https://api.marcopayroll.com/api/benKoCK8/api/bulk_add_edit_staff"

payload={
  "customer_id": "2",
  "bulk_staff_data": [
    {
      "customer_system_id": "55",
      "name": "Tuantuan",
      "system_email": "tuantuan@mail.com",
      "country": "SG",
      "job_title": "Technical Writer",
      "job_start_date": "2022-09-08",
      "staff_type": "System",
      "is_employee": "false",
      "is_manager": "false",
      "is_intern": "false",
      "birthdate": "",
      "gender": "",
      "highest_education": "",
      "nationality": "",
      "personal_email": "",
      "phone": "",
      "phone_country": "",
      "emergency_name": "",
      "emergency_email": "",
      "emergency_phone": "",
      "emergency_phone_country": "",
      "emergency_relationship": "",
      "passport_issue_date": "",
      "passport_expiry_date": "",
      "passport_issuing_country": "",
      "passport_number": "",
      "reporting_officer": "",
      "ec_type": "",
      "ec_end_date": "",
      "probation_end_date": "",
      "last_working_day": "",
      "offboarding_reason": "",
      "location": "",
      "work_email": "",
      "customer_data_type": [
        {
          "name": "Department",
          "value": "Finance"
        },
        {
          "name": "Rank",
          "value": "P1"
        }
      ]
    },
    {
      "customer_system_id": "56",
      "name": "Yuanyuan",
      "system_email": "yuanyuan@mail.com",
      "country": "SG",
      "job_title": "Finance Manager",
      "job_start_date": "2020-07-23",
      "staff_type": "System",
      "is_employee": "false",
      "is_manager": "false",
      "is_intern": "false",
      "birthdate": null,
      "gender": "",
      "highest_education": "",
      "nationality": "",
      "personal_email": "",
      "phone": "",
      "phone_country": "",
      "emergency_email": "",
      "emergency_name": "",
      "emergency_phone": "",
      "emergency_phone_country": "",
      "emergency_relationship": "",
      "passport_issue_date": "",
      "passport_expiry_date": "",
      "passport_issuing_country": "",
      "passport_number": "",
      "reporting_officer": "",
      "ec_type": "",
      "ec_end_date": "",
      "probation_end_date": "",
      "last_working_day": "",
      "offboarding_reason": "",
      "location": "",
      "work_email": "",
      "customer_data_type": [
        {
          "name": "Department",
          "value": "Customer Manager"
        },
        {
          "name": "Rank",
          "value": "P2"
        }
      ]
    }
  ]
}

response = requests.post(url, headers=headers, data=payload)

print(response.text)
```
:::

:::CodeblockTabsResponses
```javascript
{
  "result": [
    {
      "user": {
        "name": "Tuantuan",
        "role": "Staff",
        "system_email": "tuantuan@mail.com",
        "id": 1500,
        "country": "SG",
        "status": "Regular",
        "offboarding_reason": "",
        "address": null,
        "birthdate": "",
        "gender": "",
        "highest_education": "",
        "nationality": "",
        "personal_email": "",
        "phone": "",
        "emergency_name": "",
        "emergency_email": "",
        "emergency_phone": "",
        "emergency_relationship": "",
        "passport_number": "",
        "passpost_issue_date": "",
        "passport_issuing_country": "",
        "passport_expiry_date": "",
        "reporting_officer": null,
        "job_title": "Technical Writer",
        "location": "",
        "staff_type": "System",
        "work_email": "",
        "ec_entity": "",
        "ec_type": "",
        "ec_vendor": "",
        "job_start_date": "2022-09-08",
        "probation_end_date": null,
        "ec_start_date": null,
        "ec_end_date": null,
        "last_working_day": null,
        "host_country": "",
        "host_staff_type": "",
        "host_ec_entity": "",
        "host_ec_vendor": "",
        "host_ec_type": "",
        "host_ec_start_date": "",
        "host_ec_end_date": "",
        "host_job_start_date": "",
        "host_last_working_day": "",
        "job_scope": "",
        "customer_system_id": "55",
        "passport_issue_date": null,
        "passport_expirt_date": null
      },
      "message": "Update Successfully",
      "id": 1307
    },
    {
      "user": {
        "name": "Yuanyuan",
        "role": "Staff",
        "system_email": "yuanyuan@mail.com",
        "id": 1501,
        "country": "SG",
        "status": "Regular",
        "offboarding_reason": "",
        "address": null,
        "birthdate": "",
        "gender": "",
        "highest_education": "",
        "nationality": "",
        "personal_email": "",
        "phone": "",
        "emergency_name": "",
        "emergency_email": "",
        "emergency_phone": "",
        "emergency_relationship": "",
        "passport_number": "",
        "passpost_issue_date": "",
        "passport_issuing_country": "",
        "passport_expiry_date": "",
        "reporting_officer": null,
        "job_title": "Finance Manager",
        "location": "",
        "staff_type": "System",
        "work_email": "",
        "ec_entity": "",
        "ec_type": "",
        "ec_vendor": "",
        "job_start_date": "2020-07-23",
        "probation_end_date": null,
        "ec_start_date": null,
        "ec_end_date": null,
        "last_working_day": null,
        "host_country": "",
        "host_staff_type": "",
        "host_ec_entity": "",
        "host_ec_vendor": "",
        "host_ec_type": "",
        "host_ec_start_date": "",
        "host_ec_end_date": "",
        "host_job_start_date": "",
        "host_last_working_day": "",
        "job_scope": "",
        "customer_system_id": "56",
        "passport_issue_date": null,
        "passport_expirt_date": null
      },
      "message": "Update Successfully",
      "id": 1307
    }
  ]
}
```
:::
::::



**Response**

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**result** <font color="#a7b4c3">array\[object\]</font>
:::

:::VerticalSplitItem
An array of objects containing the staff's information and the result's metadata.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
result.[&#x7B;user}](docId:3YuppFLoGbxfCC92BEaYP)**** <font color="#a7b4c3">object</font>
:::

:::VerticalSplitItem
The staff's information.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
result.**message** <font color="#a7b4c3">string</font>
:::

:::VerticalSplitItem
The endpoint response status.

Valid values: Add Successfully, Update Successfully, Permission Denied
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
result.**id** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The caller's unique Marco identifier.
:::
::::

***

