Finding Your Company ID


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

  1. Navigate to the Admin tab
  2. Under the Companies section, select View Companies
  3. Use the general Search text box to locate your company
  4. Click the cog button in the right corner of the screen
  5. Select Edit Company
  6. 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
    }
  ]
}
}