Page 1 of 1
How Can I relate Sites to Contacts
Posted: Mon Mar 29, 2021 1:53 am
by Tiago Valente
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
Re: How Can I relate Sites to Contacts
Posted: Tue Mar 30, 2021 12:33 am
by Muqeet
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.
Re: How Can I relate Sites to Contacts
Posted: Tue Mar 30, 2021 1:25 am
by Tiago Valente
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/'?
Re: How Can I relate Sites to Contacts
Posted: Tue Mar 30, 2021 1:30 am
by Muqeet
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
Re: How Can I relate Sites to Contacts
Posted: Tue Mar 30, 2021 1:46 am
by Tiago Valente
Love your work Muqeet
Thanks again