GUIDE how to use "Advanced employee updater" API with postman

Yes, if you are here is because documentation for this API request is just wrong. After a few days of trying and searching for the right answer, I finally figure it out based on a few posts and information on the web.
What you are going to need:
1-.Account with policy admin rights. (see image below to determine if you account has the correct rights)
2-.Get your UserID and UserSecret by going here
https://www.expensify.com/tools/integrations/?action=create
3-.Postman access so you can test your request.
Instructions
- Create a new request
- Select POST as the method
- Copy-paste this to the URL section
https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations
- Do not add anything to "Params", "Authorization" or "Header". Go straight to "Body"
- Select "x-www-form-urlencoded" and add 2 keys "requestJobDescription" and "data"
- For "requestJobDescription" copy-paste the following text and replace the values for "partnerUserID", "partner_UserSecret" and "recipients". Remember that "dry-run"=true means that its just for testing. Set it to false whenever you are ready to modify that in production.
{
"type": "update",
"dry-run" : true,
"credentials": {
"partnerUserID": "aa_api_domain_com",
"partnerUserSecret": "xxx"
},
"dataSource" : "request",
"inputSettings": {
"type": "employees",
"entity": "generic"
},
"onFinish":[
{"actionName": "email", "recipients":"[email protected]"}
]
}'
- For "data" copy-paste the following text and replace values as needed
{
"Employees":[
{
"employeeEmail": "[email protected]",
"managerEmail": "[email protected]",
"policyID": "1D1BC525C4892584",
"isTerminated": "false",
}
]}
- Finally, hit the SEND button and voila!
This is how it should look on postman.
This is how the value looks inside those keys (yeah, the format is kinda weird in postman)
Remember that there are 4 required fields needed in order to make this API call to work.
Make sure to check out the link for more fields and examples on the official guide
Let me know if you have any questions.
Comments
-
Looks like this also works if you use the PARAMS sections. In my case it didn't work as my "data" payload is way to big to be contained on an URL. (around 3000 users)