Linked sites API

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
Ian
Posts: 2
Joined: Fri Mar 22, 2024 2:37 pm

Linked sites API

Post by Ian » Fri Mar 22, 2024 2:39 pm

Hi,

We can link sites to customers so that specific customers can see more than one site when they login to their customer portal. For example, 1 customer account can be treated as a master with access to information for 4 customer accounts that we have linked to it. Therefore, giving that master account a "regional overview" of asset info for all the sites that have been linked to it.

Please can you advise how to find individual sites linked to users via the simPRO API or a way to query other users (logins) at all?

Many thanks
Sindre
Posts: 493
Joined: Wed Apr 20, 2022 4:51 am
Location: Brisbane

Re: Linked sites API

Post by Sindre » Mon Mar 25, 2024 3:43 am

Hi Ian,
You can see all the sites that are linked to a specific customer in the customers endpoint here:

Code: Select all

/api/v1.0/companies/{companyID}/customers/companies/{customerID}
https://developer.simprogroup.com/apido ... 8ba56cae54

If you are looking for all customers that are linked to a specific site you can query using parameters like this:

Code: Select all

/api/v1.0/companies/{companyID}/customers/?Sites.ID={SiteID}
I hope this helps.

Regards
Sindre
API Developer | Simpro Software Group
Ian
Posts: 2
Joined: Fri Mar 22, 2024 2:37 pm

Re: Linked sites API

Post by Ian » Tue Mar 26, 2024 1:03 pm

Hi Sindre,

Thanks for this.

When we log in to simPRO as a customer, the account appears to be Company ID 9.

But when we query /customers/companies/9

We get a list of 141 Sites linked to this company.

But in the simPRO admin area under 'Sites' we only get a single site for this user which we assume is Site ID 113.

We assume the simPRO admin area has its own custom way of linking individual User accounts (not Companies) to sites, that we do not have access to.

The only User related query I can see via their documentation is a request to:
/currentUser

Is there are any other User account related queries we can make via their API, perhaps some that are undocumented? Or if this is not possible to do via their API at all?

I assume these are User accounts, when simPRO only allows us to query the main company.

We can either query companies:
/customers/companies/9

Or individuals:
/customers/individuals/12345

But cannot query User accounts.

https://developer.simprogroup.com/apido ... f87e04cd88

Thanks
Sindre
Posts: 493
Joined: Wed Apr 20, 2022 4:51 am
Location: Brisbane

Re: Linked sites API

Post by Sindre » Wed Mar 27, 2024 3:22 am

Hi,
The endpoint /customers/companies/9 gives you the customer with customer ID 9. The /companies/ is because this is a company customer.

This ID doesn't have any relation to company ID which is the ID of a particular company on your multi company build.

The list of 141 sites you see is all the sites that this customer is linked to.

I am unsure what Admin area you refer to. If you wish to connect customers to sites you can do this under Customers and the sites tab in Simpro. To update sites for a customer in the API use this endpoint:
https://developer.simprogroup.com/apido ... 3425eaf5f1

You can not assign specific sites to an employee but you can assign specific companies if you have a multi company build in Simpro. This is not available in the API.

We don't have other user related endpoints that is not in the documentation. This setup should be done in Simpro.

Regards
Sindre
API Developer | Simpro Software Group
Post Reply