How Can I relate Sites to Contacts

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
Tiago Valente
Posts: 89
Joined: Wed Sep 25, 2019 4:30 am

How Can I relate Sites to Contacts

Post by Tiago Valente » Mon Mar 29, 2021 1:53 am

Hi SIMPRO,

From the back-end, the Contacts table does not have the SITE ID within the API Call, and doesn't seem to be an available field to get the SITE ID .

Through the front-end you can see Contacts under the Sites through navigation.

So how can I get the SITE ID within the Contacts table?

Thanks

Tiago
Muqeet
Posts: 772
Joined: Mon Dec 03, 2018 3:24 am

Re: How Can I relate Sites to Contacts

Post by Muqeet » Tue Mar 30, 2021 12:33 am

Through rest api, list of contacts can be retrieved for a customer and site etc, however from contacts, sites and customer are not available. This feature can be added in the future but there are no plans for it at the moment.
Muqeet
API Developer | simPRO Software Group
Tiago Valente
Posts: 89
Joined: Wed Sep 25, 2019 4:30 am

Re: How Can I relate Sites to Contacts

Post by Tiago Valente » Tue Mar 30, 2021 1:25 am

I had asked this question before for Customers and found the call we use to get lists of contacts from customers.

api/v1.0/companies/2/customers/' + str(CustomerID) + '/contacts/'

I'm assuming (I couldn't find on the API documentation - I might be looking the wrong place).

api/v1.0/companies/2/sites/' + str(siteID) + '/contacts/'?
Muqeet
Posts: 772
Joined: Mon Dec 03, 2018 3:24 am

Re: How Can I relate Sites to Contacts

Post by Muqeet » Tue Mar 30, 2021 1:30 am

This one is available and I referred to it in my response.
api/v1.0/companies/2/customers/' + str(CustomerID) + '/contacts/'
Also available.
api/v1.0/companies/2/sites/' + str(siteID) + '/contacts/'?
https://developer.simprogroup.com/apido ... 235283c29d
Muqeet
API Developer | simPRO Software Group
Tiago Valente
Posts: 89
Joined: Wed Sep 25, 2019 4:30 am

Re: How Can I relate Sites to Contacts

Post by Tiago Valente » Tue Mar 30, 2021 1:46 am

Love your work Muqeet

Thanks again
Post Reply