> ## Documentation Index
> Fetch the complete documentation index at: https://developer.lulacommerce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Company Details

> This endpoint retrieves company information from the system. You can fetch either all companies or specific company details by providing a company ID. The response includes company details, address information, and associated store counts.

This endpoint provides comprehensive company information including business details, address, operational status, and the number of associated stores. It supports both retrieving all companies and fetching specific company details.

## Get All Companies

Retrieves a list of all companies in the system with summary information including total counts.

### Query Parameters

<ParamField query="company_id" type="string" optional>
  Specific company ID to retrieve details for a single company. If not provided, returns all companies.
</ParamField>

### Response - All Companies

<ResponseField name="totalStoresCount" type="number">
  Total number of stores across all companies
</ResponseField>

<ResponseField name="totalCompaniesCount" type="number">
  Total number of companies in the system
</ResponseField>

<ResponseField name="companies" type="array">
  Array of company objects

  <Expandable title="Company Object">
    <ResponseField name="id" type="string">
      Unique company identifier
    </ResponseField>

    <ResponseField name="name" type="string">
      Company name
    </ResponseField>

    <ResponseField name="status" type="string">
      Current operational status (On Boarding, Live, Off Boarding, etc.)
    </ResponseField>

    <ResponseField name="point_of_contact" type="string">
      Primary contact person for the company
    </ResponseField>

    <ResponseField name="addresses" type="object">
      Company address information

      <Expandable title="Address Object">
        <ResponseField name="id" type="string">
          Unique address identifier
        </ResponseField>

        <ResponseField name="line_1" type="string">
          Primary address line
        </ResponseField>

        <ResponseField name="line_2" type="string">
          Secondary address line (optional)
        </ResponseField>

        <ResponseField name="city" type="string">
          City name
        </ResponseField>

        <ResponseField name="zip" type="string">
          ZIP or postal code
        </ResponseField>

        <ResponseField name="state" type="string">
          State or province
        </ResponseField>

        <ResponseField name="country" type="string">
          Country (optional)
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="stores" type="object">
      Store count information

      <Expandable title="Stores Object">
        <ResponseField name="stores_count" type="string">
          Number of stores associated with this company
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

## Get Specific Company

When a `company_id` is provided, returns detailed information for that specific company.

### Response - Single Company

Returns an array with a single company object containing the same structure as described above.

### Response Examples

#### All Companies Response

```json theme={null}
{
    "totalStoresCount": 12,
    "totalCompaniesCount": 16,
    "companies": [
        {
            "id": "1000008",
            "name": "Lula Demo Company\n",
            "status": null,
            "point_of_contact": null,
            "addresses": {
                "id": "8b9ab17c-5dbb-4080-8719-a3a2e9226584",
                "line_1": "3230 Market Street",
                "line_2": null,
                "city": "Philadelphia",
                "zip": "19104",
                "state": "PA",
                "country": null
            },
            "stores": {
                "stores_count": "1"
            }
        },
        {
            "id": "1000016",
            "name": "Salman's Company",
            "status": "On Boarding",
            "point_of_contact": null,
            "addresses": {
                "id": "44cf546d-3deb-459c-883d-ceb47e94451a",
                "line_1": "39 Block Q, Phase 2 Johar Town",
                "line_2": null,
                "city": "Lahore",
                "zip": "54782",
                "state": "Punjab",
                "country": null
            },
            "stores": {
                "stores_count": "1"
            }
        }
    ]
}
```

#### Single Company Response

```json theme={null}
[
    {
        "id": "1000022",
        "name": "Salman's Company",
        "status": "On Boarding",
        "point_of_contact": "lula delivery",
        "addresses": {
            "id": "1359b612-3f09-430b-9bf1-5fc1460c8535",
            "line_1": "39 Block Q, Phase 2 Johar Town",
            "line_2": null,
            "city": "Lahore",
            "zip": "54782",
            "state": "Punjab",
            "country": null
        },
        "stores": {
            "stores_count": "7"
        }
    }
]
```

<Info>
  **Usage Tips:**

  * Use without parameters to get an overview of all companies and their store counts
  * Include `company_id` parameter to get detailed information for a specific company
  * The `stores_count` field helps you understand the scale of each company's operations
  * `point_of_contact` field may be null if no contact person is assigned
</Info>

<Warning>
  Some companies may have null values for status or point\_of\_contact fields. Always check for null values when processing the response.
</Warning>
