How Do I add new users through the API?

ikaplan
Expensify Customer Posts: 2 Expensify Newcomer
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": "[email protected]", "managerEmail": "[email protected]", "policyID": "0123456789ABCDEF", "employeeID": "12345", "firstName": "John", "lastName": "Doe", "customField2": "ABC123", "approvalLimit": 12300, "overLimitApprover": "[email protected]", "isTerminated": false }, { "employeeEmail": "[email protected]", "managerEmail": "[email protected]", "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":"[email protected],[email protected]"} ] }
Answers
-
Hi Ikaplan
Did you figure this out? I am still having issues trying to do a simple call on postman.