User account creation in Expensify

Hi,
I have been trying to create user account in expensify using postman but i am not sure how to provide the employee details for user account creation. I am getting the error - "message": "Employee data not found",
Best Answer
-
Ah! Thank you for clarifying this. There are three ways to pass the employee data via JSON:
- Directly as a parameter of the request (using the parameter
data
) - In a JSON file hosted on a URL that Expensify will load the data from (using Basic Authentication)
- In a JSON file hosted on a SFTP server, that Expensify will load the data from
It's up to you! The only requirement is that the Employee information must be formatted the following way:
{ "Employees": [ { "employeeEmail": "[email protected]", "managerEmail": "[email protected]", "policyID": "0123456789ABCDEF" }, { "employeeEmail": "[email protected]", "managerEmail": "[email protected]", "policyID": "0123456789ABCDEF" } ] }
Let me know how you get on with this!
- Directly as a parameter of the request (using the parameter
Answers
-
Hi @Priya2021! Thanks for reaching out! Would you mind please sharing the API call that was made here, so I can take a look? Feel free to redact any employee information first.
Thanks,
Kadie
-
Hi @Kadie Alexander I tried the below 2 ways with no luck.
-
Hi again,
Thanks for sending that across! In the first screenshot I can see that the
onFinish
information isn't present.Here is the full example:
{ "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]"} ] }
Would you mind letting me know if this final part was included in the API call?
-
It is an optional field but yes, it was included when i made the request. What is missing there is employee information (the user that i want to create in expensify but i am not sure where to provide it).
-
Thank you. I was stuck as i did not know what the parameter was.
It would be great if you can update it in the document - https://integrations.expensify.com/Integration-Server/doc/employeeUpdater.html?json#api-principles
-
Ah! I can see we have it as a small note in the right-hand side example, but it's not clear. I'll pass this feedback along to my team. Thanks for raising this, and please let me know if you run into any other issues!
-
Hi @Kadie Alexander ,
I hope you would be kindly able to help please.
I'm having trouble with the API, would you be able to see something that I don't?
Is the body of the http request where the employee data should be provided? It is not clear in the documentation.
It would be very useful if the support team create and attach a simple Postman collection that works. It will save tons of time..
Kind Regards, Slavi
-
Hi @Slavi! Thanks for writing in! I'm less familiar with Postman than I am running these requests directly from a terminal, but I suspect the Postman is likely just providing an interface and the request itself is identical.
Given your request contains real data for your employees, I'd like to move this conversation to Concierge. When you reach out, can you please paste your request to the body of the chat so I can take a look?
Please send a message to [email protected], making sure to remove the partnerUserID and partnerUserSecret, but otherwise leaving your API request intact. I'll take a look and see if I can spot anything out of place!
-
Thanx for looking @John Schuster !
Managed to get it working on a fresh head this morning.
Basically the employee data json, must be passed on the http request as parameter called "data". I was passing it in the body.
For everyone else who is using postman for testing and may come across this, hope the following screenshot helps.
Kind regards, Slavi
-
Thanks for sharing that, @Slavi! That'll definitely be helpful to the greater community.