Bulk create or update user information
POST /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
Body parameters
customer_id string Required
The unique Marco identifier for your company.
bulk_staff_data array[object] Required
An array of objects containing each staff's information.
bulk_staff_data.customer_system_id string Required
The staff's unique identifier in your company's system.
Example: 50
bulk_staff_data.customer_system_id_type string Required
The name of your system.
Example: PS
bulk_staff_data.name string Required
The staff's full name.
bulk_staff_data.system_email string Required
The staff's email, used to log into Marco.
bulk_staff_data.country string Required
The staff's country, formatted as an ISO Alpha-2 code.
Example: JP
Note: If you are changing the staff's country, you must fill inold_country and new_country_effective_date.
bulk_staff_data.job_title string Required
The staff's job title.
Example: HR Manager
bulk_staff_data.job_start_date string Required
The staff's job start date, formatted as YYYY-MM-DD.
Example: 2020-01-31
bulk_staff_data.staff_type string Required
The staff's service type.
Valid values: System, Payroll, HRO, EOR
bulk_staff_data.is_manager boolean Optional
Whether the staff is a manager.
bulk_staff_data.is_employee boolean Optional
Whether the staff is an employee.
bulk_staff_data.is_intern boolean Optional
Whether the staff is an intern. Cannot be true if any of the previous boolean values are true.
bulk_staff_data.birthdate string Optional
The staff's date of birth, formatted as YYYY-MM-DD.
bulk_staff_data.gender string Optional
The staff's gender.
Valid values: Female, Male
bulk_staff_data.highest_education string Optional
The staff's highest education.
bulk_staff_data.nationality string Optional
The staff's nationality, formatted as the country's ISO Alpha-2 code.
bulk_staff_data.personal_email string Optional
The staff's personal email.
bulk_staff_data.phone string Optional
The staff's phone number.
bulk_staff_data.phone_country string Optional
The country code for the staff's phone number, formatted as the country's ISO Alpha-2 code.
bulk_staff_data.emergency_name string Optional
The name of the staff's emergency contact.
bulk_staff_data.emergency_email string Optional
The email belonging to the staff's emergency contact.
bulk_staff_data.emergency_phone string Optional
The phone number belonging to the staff's emergency contact.
bulk_staff_data.emergency_phone_country string Optional
The country code for the staff's emergency contact's phone number, formatted as the country's ISO Alpha-2 code.
bulk_staff_data.emergency_relationship string Optional
The staff's relationship to the emergency contact.
Example: Husband
bulk_staff_data.passport_number string Optional
The staff's passport number.
bulk_staff_data.passport_issue_date string Optional
The staff's passport issue date, formatted as YYYY-MM-DD.
bulk_staff_data.passport_issuing_country string Optional
The staff's passport issuing country, stored as an ISO Alpha-2 code.
bulk_staff_data.passport_expiry_date string Optional
The staff's passport expiry date, formatted as YYYY-MM-DD.
bulk_staff_data.reporting_officer string Optional
The staff's reporting manager.
bulk_staff_data.ec_type string Optional
The staff's employment contract type.
Valid values: Fixed-term, Indefinite
bulk_staff_data.ec_entity_id string Optional
The unique identifier for the business entity that holds the employment relationship with the staff.
bulk_staff_data.ec_entity_system_id_type string Optional
The system that stores the ec_entity_id.
Valid values: Marco, Customer Use "Marco" if the ID is stored in Marco; otherwise use "Customer".
bulk_staff_data.ec_start_date string Optional
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.
bulk_staff_data.ec_end_date string Optional
The end date for the staff's employment contract, formatted as YYYY-MM-DD.
bulk_staff_data.probation_end_date string Optional
The staff's probation end date, formatted as YYYY-MM-DD.
bulk_staff_data.last_working_day string Optional
The staff's last working day, formatted as YYYY-MM-DD.
bulk_staff_data.offboarding_reason string Optional
The staff's offboarding reason.
Valid values: Involuntary, Voluntary
bulk_staff_data.location string Optional
The staff's work location.
bulk_staff_data.work_email string Optional
The staff's work email.
bulk_staff_data.customer_data_type array[object] Optional
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"}]
customer_data_type.name string Optional
Custom data field name.
customer_data_type.value string Optional
The staff's value for the custom field.
bulk_staff_data.old_country string Optional
The staff's previous country of residence, formatted as an ISO Alpha-2 code.
Required only if you are updating the staff's country.
bulk_staff_data.new_country_effective_date string Optional
Effective date of the staff's relocation, formatted as YYYY-MM-DD.
Required only if you are updating the staff's country.
Example Requests
Response
result array[object]
An array of objects containing the staff's information and the result's metadata.
result.{user} object
The staff's information.
result.message string
The endpoint response status.
Valid values: Add Successfully, Update Successfully, Permission Denied
result.id integer
The caller's unique Marco identifier.