Company

A fundamental unit linked to every user on the GRC Watch platform.

Every user on the GRC Watch platform is associated with at least one company, but is limited to actively operating within only one company at a time, as detailed in our API Authentication guide.

Company ID

When using the GRC Watch API, you will do so on behalf of a company. To get a company ID, call the user info endpoint.

GET /api/auth/user-info

The company IDs are located under roles, at the end of the name path of each company that you are part of

{
...
  roles": [
    {
      "companyId": COMPANY-ID,
      "internal": {
        "names": [ "Editor", "Sharer" ],
        "companyTypeIds": [ COMPANY-TYPE-ID, COMPANY-TYPE-ID ]
      },
      "external": {
        "names": [ "Sharer", "Approver" ],
        "companyTypeIds": [ COMPANY-TYPE-ID, COMPANY-TYPE-ID ]
      }
    },
    {
      "companyId": "f0912d8e-500f-4713-8894-c6462d6994fd",
      "internal": {
        "names": [ "SuperAdmin" ],
        "companyTypeIds": [ COMPANY-TYPE-ID ]
      },
      "external": {
        "names": [ "Admin" ],
        "companyTypeIds": [ COMPANY-TYPE-ID, COMPANY-TYPE-ID, COMPANY-TYPE-ID ]
      }
    },
  ],
...
}
                

To make use of it, add an x-namespace header in all the requests to the GRC Watch API. Here is an example of how a header should look:

{
  Authorization: Bearer ey...
  x-namespace: /api/company/{company-id}
}
                

Get company information

For retrieving details about a designated company, utilize the endpoint GET /api/companies/{company-id}. You should use the specific companyId of the company you wish to acquire information about.

GET /api/companies/{company-id}

{
  "id": "COMPANY-ID",
  "name": "Example AM",
  "country": "Sweden",
  "city": "Stockholm",
  "lei": "TEST1234TEST1234TEST",
  "cin": "U 42344 MP 2022 PTC 053245"
}