Bulk create or update user information
\<font color="#3b9f0f">post\</font> /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> customer id \<font color="#a7b4c3">string required\</font> the unique marco identifier for your company bulk staff data \<font color="#a7b4c3">array\[object] required\</font> an array of objects containing each staff's information bulk staff data customer system id \<font color="#a7b4c3">string required\</font> the staff's unique identifier in your company's system example 50 bulk staff data customer system id type \<font color="#a7b4c3">string required\</font> the name of your system example ps bulk staff data name \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">required\</font> the staff's full name bulk staff data system email \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">required\</font> the staff's email, used to log into marco bulk staff data country \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">required\</font> the staff's country, formatted as an iso alpha 2 code https //www iban com/country codes example jp note if you are changing the staff's country , you must fill in old country and new country effective date bulk staff data job title \<font color="#a7b4c3">string required\</font> the staff's job title example hr manager bulk staff data job start date \<font color="#a7b4c3">string\</font> \<font color="#a7b4c3"> required\</font> the staff's job start date, formatted as yyyy mm dd example 2020 01 31 bulk staff data staff type \<font color="#a7b4c3">string\</font> \<font color="#a7b4c3"> required\</font> the staff's service type valid values system, payroll, hro, eor bulk staff data is manager \<font color="#a7b4c3">boolean optional\</font> whether the staff is a manager bulk staff data is employee \<font color="#a7b4c3">boolean optional\</font> whether the staff is an employee bulk staff data is intern \<font color="#a7b4c3">boolean optional\</font> whether the staff is an intern cannot be true if any of the previous boolean values are true bulk staff data birthdate \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's date of birth, formatted as yyyy mm dd bulk staff data gender \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's gender valid values female, male bulk staff data highest education \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's highest education bulk staff data nationality \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's nationality, formatted as the country's iso alpha 2 code https //www iban com/country codes bulk staff data personal email \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's personal email bulk staff data phone \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's phone number bulk staff data phone country \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the country code for the staff's phone number, formatted as the country's iso alpha 2 code https //www iban com/country codes bulk staff data emergency name \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the name of the staff's emergency contact bulk staff data emergency email \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the email belonging to the staff's emergency contact bulk staff data emergency phone \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the phone number belonging to the staff's emergency contact bulk staff data emergency phone country \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> 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 bulk staff data emergency relationship \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's relationship to the emergency contact example husband bulk staff data passport number \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's passport number bulk staff data passport issue date \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's passport issue date , formatted as yyyy mm dd bulk staff data passport issuing country \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's passport issuing country, stored as an iso alpha 2 code https //www iban com/country codes bulk staff data passport expiry date \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's passport expiry date , formatted as yyyy mm dd bulk staff data reporting officer \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's reporting manager bulk staff data ec type \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's employment contract type valid values fixed term, indefinite bulk staff data ec entity id \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the unique identifier for the business entity that holds the employment relationship with the staff bulk staff data ec entity system id type \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> 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 \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> 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 \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the end date for the staff's employment contract, formatted as yyyy mm dd bulk staff data probation end date \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's probation end date, formatted as yyyy mm dd bulk staff data last working day \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's last working day , formatted as yyyy mm dd bulk staff data offboarding reason \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's offboarding reason valid values involuntary, voluntary bulk staff data location \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's work location bulk staff data work email \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's work email bulk staff data customer data type \<font color="#a7b4c3">array\[object] \</font> \<font color="#a7b4c3">optional\</font> 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 \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> custom data field name customer data type value \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> the staff's value for the custom field bulk staff data old country \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> 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 bulk staff data new country effective date \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> effective date of the staff's relocation , formatted as yyyy mm dd required only if you are updating the staff's country example requests 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" } ] } ] }' 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){ "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 result \<font color="#a7b4c3">array\[object]\</font> an array of objects containing the staff's information and the result's metadata result {user} docid 3yuppflogbxfcc92beayp \<font color="#a7b4c3">object\</font> the staff's information result message \<font color="#a7b4c3">string\</font> the endpoint response status valid values add successfully, update successfully, permission denied result id \<font color="#a7b4c3">integer\</font> the caller's unique marco identifier