Get Employee Detail from api

Posts about the simPRO API. Help/support/how-to etc.
Forum rules
  • Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
  • No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
  • Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
  • Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
  • Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
  • Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
  • Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
  • Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
Post Reply
harpreet
Posts: 7
Joined: Wed Jul 04, 2018 9:44 am

Get Employee Detail from api

Post by harpreet » Thu Oct 04, 2018 9:00 am

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
rick.lan
Posts: 274
Joined: Wed May 30, 2018 6:14 am

Re: Get Employee Detail from api

Post by rick.lan » Thu Oct 04, 2018 11:36 pm

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
Rick Lan
API Developer | simPRO Software Group
harpreet
Posts: 7
Joined: Wed Jul 04, 2018 9:44 am

Re: Get Employee Detail from api

Post by harpreet » Fri Oct 05, 2018 4:25 am

Thanks a lot rick,
Your helps works again.
harpreet
Posts: 7
Joined: Wed Jul 04, 2018 9:44 am

Re: Get Employee Detail from api

Post by harpreet » Wed Oct 10, 2018 12:55 pm

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?
rick.lan
Posts: 274
Joined: Wed May 30, 2018 6:14 am

Re: Get Employee Detail from api

Post by rick.lan » Thu Oct 11, 2018 12:32 am

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
Rick Lan
API Developer | simPRO Software Group
harpreet
Posts: 7
Joined: Wed Jul 04, 2018 9:44 am

Re: Get Employee Detail from api

Post by harpreet » Thu Oct 11, 2018 10:25 am

Thanks Rick
Post Reply