Page 1 of 1
Employee by profile type
Posted: Sun Apr 02, 2023 9:30 pm
by Dazwah
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?
Re: Employee by profile type
Posted: Sun Apr 02, 2023 10:28 pm
by nige
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
Re: Employee by profile type
Posted: Sun Apr 02, 2023 11:44 pm
by Dazwah
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
Re: Employee by profile type
Posted: Sun Apr 02, 2023 11:58 pm
by Sindre
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
Re: Employee by profile type
Posted: Mon Apr 03, 2023 12:21 am
by Dazwah
Great thank you, was almost there. Another one Im trying to do is get all sites related to a customer. Is this possible?
Re: Employee by profile type
Posted: Mon Apr 03, 2023 1:08 am
by Sindre
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}