Page 1 of 1
Get Employee Detail from api
Posted: Thu Oct 04, 2018 9:00 am
by harpreet
Hello,
I am able to get a employee id from schedule->staff->ID.
But when I hit a employee detail using API endpoint . For some users, it is giving me 404 error. I am confused to have this behaviour.
Please let me know what is wrong with my request or employee id.
For example I have get employee id 2033 and company Id = 3 from schedule->staff->ID.
But when i hit using this API '
https://durkin.simprosuite.com/api/v1.0 ... oyees/2033'.
I got 404 error.
Thanks
Re: Get Employee Detail from api
Posted: Thu Oct 04, 2018 11:36 pm
by rick.lan
Hi harpreet,
Thank you for your message, according the system staff id 2033 is a "plant" not an "employee", so the correct flow to retrieve the staff information (programmatically) is:
1. get a staff id from schedule > staff > ID (e.g. ID 2033)
2. retrieve staff information:
Code: Select all
https://durkin.simprosuite.com/api/v1.0/companies/3/staff/2033
// return result
{
"ID": 2033,
"Name": "<masked>",
"Type": "plant",
"TypeId": 1793,
"_href": "/api/v1.0/companies/3/plantTypes/3/plants/1793"
}
3. use "_href" link to access the staff information:
Code: Select all
https://durkin.simprosuite.com/api/v1.0/companies/3/plantTypes/3/plants/1793
cheers,
Rick
Re: Get Employee Detail from api
Posted: Fri Oct 05, 2018 4:25 am
by harpreet
Thanks a lot rick,
Your helps works again.
Re: Get Employee Detail from api
Posted: Wed Oct 10, 2018 12:55 pm
by harpreet
Hello,
I have a question?
If changing in schedule, the modified date of the job also change or not?
and
Is there a way to get only modified schedule of the job?
Re: Get Employee Detail from api
Posted: Thu Oct 11, 2018 12:32 am
by rick.lan
Hi harpeet,
Yes, the jobs/quotes modified date will be changed if you change their schedule.
There is no way to track only the modified schedules of a job at the moment, but once we got our webhook feature released, you should be able to subscribe to receive any schedule change events (create / delete / update etc.).
cheers,
Rick
Re: Get Employee Detail from api
Posted: Thu Oct 11, 2018 10:25 am
by harpreet
Thanks Rick