Overview
Many MachShip API operations require a company ID. This guide explains how to locate your company ID through the MachShip interface, or the API.
In The MachShip UI
- Navigate to the Admin tab
- Under the Companies section, select View Companies
- Use the general Search text box to locate your company
- Click the cog button in the right corner of the screen
- Select Edit Company
- The company ID will be visible in the URL
For example, if the URL is:
https://live.machship.com/companies/edit/123456
Then 123456
is your company ID.
Via The API
To get a list of the company ids in your organisation, you can hit the following endpoint:
GET https://live.machship.com/apiv2/companies/getAll
Note, this endpoint requires certain permissions to be accessible.
{
{
"object": [
{
"id": 12345,
"name": "Big Company Co (Big Co)",
"accountCode": "BIG_CO",
"displayName": "Big Company Co",
"parentCompanyId": 0
}
],
"errors": [
{
"memberNames": [
"string"
],
"errorMessage": "string",
"validationType": 0
}
]
}
}