Create or update user information
POST /api/add-edit-staff
Creates or updates staff information using the user ID in your system (external ID). This endpoint is used for a single staff only.
Request
Body parameters
customer_id integer Required
The unique Marco identifier for your company.
customer_system_id string Required
The staff's unique identifier in your company's system.
Example: 50
customer_system_id_type string Required
The name of your system.
Example: PS
name string Required
The staff's full name.
system_email string Required
The staff's email, used to log into Marco.
country string Required
The staff's country of residence, 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.
job_title string Required
The staff's job title.
Example: HR Manager
job_start_date string Required
The staff's job start date, formatted as YYYY-MM-DD.
Example: 2020/01/31
staff_type string Required
The staff's service type.
Valid values: System, Payroll, HRO, EOR
is_manager boolean Optional
Whether the staff is a manager.
Default: False
is_employee boolean Optional
Whether the staff is an employee.
Default: True
is_intern boolean Optional
Whether the staff is an intern. Cannot be true if any of the previous boolean values are true.
birthdate string Optional
The staff's date of birth, formatted as YYYY-MM-DD.
gender string Optional
The staff's gender.
Valid values: Female, Male
highest_education string Optional
The staff's highest education.
nationality string Optional
The staff's nationality, formatted as the country's ISO Alpha-2 code.
personal_email string Optional
The staff's personal email.
phone string Optional
The staff's phone number.
phone_country string Optional
The country code for the staff's phone number, formatted as the country's ISO Alpha-2 code.
emergency_name string Optional
The name of the staff's emergency contact.
emergency_email string Optional
The email belonging to the staff's emergency contact.
emergency_phone string Optional
The phone number belonging to the staff's emergency contact.
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.
emergency_relationship string Optional
The staff's relationship to the emergency contact.
passport_number string Optional
The staff's passport number.
passport_issue_date string Optional
The staff's passport issue date, formatted as YYYY-MM-DD.
passport_issuing_country string Optional
The staff's passport issuing country, formatted as an ISO Alpha-2 code.
passport_expiry_date string Optional
The staff's passport expiry date, formatted as YYYY-MM-DD.
reporting_officer string Optional
The staff's reporting manager.
ec_type string Optional
The staff's employment contract type.
Valid values: Fixed-term, Indefinite
ec_entity_id string Optional
The unique identifier for the business entity that holds the employment relationship with the staff.
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".
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.
ec_end_date string Optional
The end date for the staff's employment contract, formatted as YYYY-MM-DD.
probation_end_date string Optional
The staff's probation end date, formatted as YYYY-MM-DD.
last_working_day string Optional
The staff's last working day, formatted as YYYY-MM-DD.
offboarding_reason string Optional
The staff's offboarding reason.
Valid values: Involuntary, Voluntary
location string Optional
The staff's work location.
work_email string Optional
The staff's work email.
customer_data_type array[object] Optional
Additional data specified by your company. These data fields need to be configured 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.
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.
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
{user} object
The staff's information.
message string
The endpoint response status.
Valid values: Add Successfully, Update Successfully, Permission Denied
id integer
The caller's unique Marco identifier.