Jump to content

Businesses API


 Share

Recommended Posts

Hi Sage,

I am trying to access businesses endpoint using this document but it seems to be outdated. The main issue for which i am trying to seek your support is, if there is any API/endpoint through which i can directly get all the business by applying filters of user_roles.

e.g i have a account that has "user_roles": ["business_owner","system_manager"] and i have clients link to this account they have "user_roles": ["system_manager"

i am trying to access all business which have only business_owner role. e.g https://api.accounting.sage.com/v3.1/businesses?user_roles=business_owner
 

Cheers

Reg Mubasher

 

Link to comment
Share on other sites

Hi Reg, thanks for your question.

It's not possible at present to filter the businesses returned by the businesses endpoint. This is defaulted to return all of the businesses the authenticated user has access to. This may be as a business owner, system administrator or a full/partial user_role. 

An authorised user can only ever be the business owner of a single business. This can be returned from businesses/lead. The only caveat to this is if your application is integrating with Partner Edition. Partner edition is a version of Sage Business Cloud Accounting that allows partners/accountants to access their clients data(if given access) from a single UI. When Partner Edition users authorise via the API, they masquerade as the business owner and most if not all of the businesses returned via the businesses endpoint would have the business owner attribute.

Thanks for pointing out the API reference, we'll update this going forward. We're currently adding information to our multi_business guide around partner edition but there may still be some useful information in the guide as it stands today. 

Thanks

Mark

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...