Making API calls for Group Accounts
If your account has enabled Group Accounts feature, you can use a token from the main account and send API calls for any of the sub-accounts in the structure with only one additional parameter in the request, named child_company_id.
Creating an API v2 application that supports Group API access
If you don't have an API v2 application, you need to create it first.
Go to Settings, then API v2 and a form for creating new application will be shown.
Set the application name, and select Yes in Group API access dropdown.
Click Save.
Under Manage API Application section, your newly created application will appear:
With the App ID, App Secret, username and password, you need to get the access token. More details on how to do it can be found here.
Once the access token is obtained, any API v2 call can be made with the parameter child_company_id with the ID of any of the child accounts. For GET requests this parameter should be a query parameter in URL, and for all others in the body of the request.
On a screenshot below you can see the API request for creating a new location in the child account.
Updated over 6 years ago