Employee by profile type

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
Dazwah
Posts: 9
Joined: Wed Mar 29, 2023 10:18 pm

Employee by profile type

Post by Dazwah » Sun Apr 02, 2023 9:30 pm

Hello, I have looked over the api and all I can find is how to retrieve employees, /api/v1.0/companies/{companyID}/employees/?IsSalesperson=True

Any ideas?
nige
Posts: 23
Joined: Wed Jun 24, 2020 11:05 pm

Re: Employee by profile type

Post by nige » Sun Apr 02, 2023 10:28 pm

Hi Dazwah
thanks for your question, however, would you clarify what you are specifically looking for please. General documentation (including swagger link) is here https://developer.simprogroup.com/apidoc/ and specific employee information is here https://developer.simprogroup.com/apido ... 78a77c8b1b
Regards
Nige
Dazwah
Posts: 9
Joined: Wed Mar 29, 2023 10:18 pm

Re: Employee by profile type

Post by Dazwah » Sun Apr 02, 2023 11:44 pm

Im trying to get employees by profile type, whether its IsSalesperson=true or is IsProjectManager=true, I dont want to have to retrieve each employee then create my lists if there is a way to do it already with API
Sindre
Posts: 493
Joined: Wed Apr 20, 2022 4:51 am
Location: Brisbane

Re: Employee by profile type

Post by Sindre » Sun Apr 02, 2023 11:58 pm

Hi Daswah,
You propose the right way to filter the employees in your first post.

IsSalesPerson and IsProjectManager is a part of the user profile so set it up like this:

Code: Select all

/api/v1.0/companies/0/employees/?UserProfile.IsSalesperson=true
Regards
Sindre
API Developer | Simpro Software Group
Dazwah
Posts: 9
Joined: Wed Mar 29, 2023 10:18 pm

Re: Employee by profile type

Post by Dazwah » Mon Apr 03, 2023 12:21 am

Great thank you, was almost there. Another one Im trying to do is get all sites related to a customer. Is this possible?
Sindre
Posts: 493
Joined: Wed Apr 20, 2022 4:51 am
Location: Brisbane

Re: Employee by profile type

Post by Sindre » Mon Apr 03, 2023 1:08 am

You can use the same nested structure to get the sites related to a specific customer:

Code: Select all

api/v1.0/companies/0/sites/?Customers.ID={customerID}
Sindre
API Developer | Simpro Software Group
Post Reply