Page 1 of 1

Finding site id

Posted: Tue Nov 28, 2023 10:12 am
by owen
Hi,

Is anyone aware of a method/GET url that can return the site id of a site just from the site name?

Currently this works to display sites from a customer ....

'https://consiliumcs.simprosuite.com/api ... umns=Sites'

however it would really help if i could search for a specific site within this called "2 test lane",

Thanks

Re: Finding site id

Posted: Tue Nov 28, 2023 11:48 pm
by Sindre
Hi owen,
To get a site ID based on the site name you can add it as a search parameter in the url.

Here is an example for the sites endpoint:

Code: Select all

/api/v1.0/companies/{companyID}/sites/?Name=abc
Alternatively in the customers endpoint:

Code: Select all

/api/v1.0/companies/{companyID}/customers/companies/?Sites.Name=abc
Regards