How Do I add new users through the API?
I am looking at https://integrations.expensify.com/Integration-Server/doc/employeeUpdater/#request-format
But I'm not understanding how the employee payload works with the requestJobDescription parameter. Is the type always going to be 'update' for both new and existing users?
Where does the following example fit in within the requestJobDescription?
{ "Employees": [ { "employeeEmail": "employee@domain.com", "managerEmail": "manager@domain.com", "policyID": "0123456789ABCDEF", "employeeID": "12345", "firstName": "John", "lastName": "Doe", "customField2": "ABC123", "approvalLimit": 12300, "overLimitApprover": "audit@domain.com", "isTerminated": false }, { "employeeEmail": "manager@domain.com", "managerEmail": "ceo@domain.com", "policyID": "0123456789ABCDEF", "employeeID": "34567", "firstName": "Michael", "lastName": "Scott", "customField2": "BCD345", "isTerminated": false } ] }
- Directly in the request (parameter
data
)
{ "type": "update", "dry-run" : false, "credentials": { "partnerUserID": "aa_api_domain_com", "partnerUserSecret": "xxx" }, "dataSource" : "request", "inputSettings": { "type": "employees", "entity": "generic" }, "onFinish":[ {"actionName": "email", "recipients":"admin1@domain.com,admin2@domain.com"} ] }
Answers
-
Hi Ikaplan
Did you figure this out? I am still having issues trying to do a simple call on postman.