# GetCompanyInfo - Get all company information for the authenticated user based on their affiliations

This API returns a list of all trucking companies the authenticated user has access to,
derived from their UserAffiliations for the current application context. Only companies
with a CompanyType_Cd of "T" (Trucking) are included.
The primary company is listed first, followed by remaining companies sorted alphabetically by name.
Request:
No request body is required. The authenticated user's identity and affiliations are resolved from the authorization token.
Response:
The response contains:
- Companies: A list of company records, each containing:
  - Company_Id: The internal company identifier.
  - Company_Uid: The SSO company unique identifier (GUID).
  - Company_Nm: The company name.
  - SCAC: The Standard Carrier Alpha Code for the trucking company.
  - CompanyType_Cd: The company type code (e.g., "T" for Trucking).
  - IsPrimary: Indicates whether this is the user's primary affiliated company.
- TotalCount: The total number of companies returned.
Notes:
- If the user has no company affiliations or no matching companies are found in the database, an empty list with TotalCount of 0 is returned.

Endpoint: GET /api/appointment/getcompanyinfo
Version: 1.0

## Header parameters:

  - `X-Cargosprint-Api-Key` (string, required)
    The company API key provided by Cargosprint.

  - `X-Cargosprint-User-Key` (string, required)
    The API key of the user to be impersonated.

## Response 200:

  - `200` (unknown)
    Company information retrieved successfully.

## Response 200 fields (application/json):

  - `companies` (array)

  - `companies.company_Id` (integer)

  - `companies.isPrimary` (boolean)

  - `companies.company_Uid` (string)

  - `companies.company_Nm` (string)

  - `companies.scac` (string)

  - `companies.companyType_Cd` (string)

  - `totalCount` (integer)

## Response 401:

  - `401` (unknown)
    Unauthorized. The client must authenticate itself to get the requested response.

## Response 401 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (integer)

  - `detail` (string)

  - `instance` (string)

## Response 403:

  - `403` (unknown)
    Forbidden. The client does not have access rights to the content.

## Response 403 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (integer)

  - `detail` (string)

  - `instance` (string)

## Response 500:

  - `500` (unknown)
    An internal server error occurred while processing the request.

