> ## 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 Onboarding by Company ID

> This endpoint retrieves onboarding status information for all stores belonging to a specific company. This provides a company-wide view of store onboarding progress and operational status across all delivery platforms.

This endpoint provides a comprehensive overview of onboarding status for all stores under a company. It's useful for company-level monitoring and management of store operations across multiple locations.

### Path Parameters

<ParamField path="company_id" type="string" required>
  The unique identifier of the company to retrieve onboarding information for all its stores
</ParamField>

### Response

<ResponseField name="company_id" type="string">
  The company ID for which onboarding information was retrieved
</ResponseField>

<ResponseField name="total_stores" type="number">
  Total number of stores belonging to this company
</ResponseField>

<ResponseField name="onboarded_stores" type="number">
  Number of stores that have completed onboarding
</ResponseField>

<ResponseField name="pending_onboarding" type="number">
  Number of stores with onboarding in progress or pending
</ResponseField>

<ResponseField name="stores" type="array">
  Array of store onboarding information

  <Expandable title="Store Onboarding Object">
    <ResponseField name="store_id" type="string">
      Unique identifier for the store
    </ResponseField>

    <ResponseField name="store_name" type="string">
      Name of the store
    </ResponseField>

    <ResponseField name="onboarding_status" type="string">
      Overall onboarding status for this store

      <Info>Values: "completed", "in\_progress", "pending", "failed"</Info>
    </ResponseField>

    <ResponseField name="created_at" type="string">
      When the store was created
    </ResponseField>

    <ResponseField name="onboarded_at" type="string">
      When onboarding was completed (null if not completed)
    </ResponseField>

    <ResponseField name="current_status" type="object">
      Current operational status across platforms

      <Expandable title="Current Status Object">
        <ResponseField name="is_operational" type="boolean">
          Whether the store is currently operational
        </ResponseField>

        <ResponseField name="platforms_online" type="number">
          Number of delivery platforms currently online
        </ResponseField>

        <ResponseField name="platforms_total" type="number">
          Total number of configured delivery platforms
        </ResponseField>

        <ResponseField name="last_status_check" type="string">
          When status was last checked
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="platform_details" type="object">
      Detailed status for each delivery platform

      <Expandable title="Platform Details Object">
        <ResponseField name="UberEats" type="object">
          UberEats status information

          <Expandable title="Platform Status">
            <ResponseField name="is_active" type="boolean">
              Whether this platform is active for the store
            </ResponseField>

            <ResponseField name="status" type="string">
              Current platform status
            </ResponseField>

            <ResponseField name="partner_store_id" type="string">
              Platform-specific store identifier
            </ResponseField>

            <ResponseField name="last_updated" type="string">
              When this platform status was last updated
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="DoorDash" type="object">
          DoorDash status information with similar structure
        </ResponseField>

        <ResponseField name="GrubHub" type="object">
          GrubHub status information with similar structure
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

### Response Example

```json theme={null}
{
    "company_id": "1000022",
    "total_stores": 5,
    "onboarded_stores": 3,
    "pending_onboarding": 2,
    "stores": [
        {
            "store_id": "7669f473-6c40-45ee-8737-43c667407b3a",
            "store_name": "Lula Convenience Store - Main",
            "onboarding_status": "completed",
            "created_at": "2023-09-20T13:27:11.318Z",
            "onboarded_at": "2023-09-20T14:15:22.456Z",
            "current_status": {
                "is_operational": true,
                "platforms_online": 2,
                "platforms_total": 3,
                "last_status_check": "2024-11-15T03:46:34.000Z"
            },
            "platform_details": {
                "UberEats": {
                    "is_active": true,
                    "status": "ONLINE",
                    "partner_store_id": "15be0357-9b4d-4f05-9a5a-9485b5f783e5",
                    "last_updated": "2024-11-15T03:30:00.000Z"
                },
                "DoorDash": {
                    "is_active": true,
                    "status": "ONLINE",
                    "partner_store_id": "b1015bdb-e831-42ef-b6f8-720fab19321f",
                    "last_updated": "2024-11-15T03:30:00.000Z"
                },
                "GrubHub": {
                    "is_active": false,
                    "status": "OFFLINE",
                    "partner_store_id": "1240569280",
                    "last_updated": "2024-11-15T02:15:00.000Z"
                }
            }
        },
        {
            "store_id": "8669f473-6c40-45ee-8737-43c667407b3b",
            "store_name": "Lula Convenience Store - Branch",
            "onboarding_status": "in_progress",
            "created_at": "2023-09-21T10:15:30.123Z",
            "onboarded_at": null,
            "current_status": {
                "is_operational": false,
                "platforms_online": 0,
                "platforms_total": 3,
                "last_status_check": "2024-11-15T03:46:34.000Z"
            },
            "platform_details": {
                "UberEats": {
                    "is_active": false,
                    "status": "SETUP_PENDING",
                    "partner_store_id": null,
                    "last_updated": "2023-09-21T10:15:30.123Z"
                },
                "DoorDash": {
                    "is_active": false,
                    "status": "SETUP_PENDING",
                    "partner_store_id": null,
                    "last_updated": "2023-09-21T10:15:30.123Z"
                },
                "GrubHub": {
                    "is_active": false,
                    "status": "SETUP_PENDING",
                    "partner_store_id": null,
                    "last_updated": "2023-09-21T10:15:30.123Z"
                }
            }
        }
    ]
}
```

### Company-Level Insights

<Accordion title="Understanding Company Onboarding Metrics">
  <ResponseField name="Onboarding Progress" type="insight">
    Track overall onboarding completion rate across all company stores

    <Info>Helps identify if onboarding processes are working efficiently</Info>
  </ResponseField>

  <ResponseField name="Operational Health" type="insight">
    Monitor how many stores are currently operational and accepting orders

    <Warning>Low operational rates may indicate systemic issues</Warning>
  </ResponseField>

  <ResponseField name="Platform Performance" type="insight">
    Identify which delivery platforms have the highest success rates

    <Tip>Focus troubleshooting efforts on problematic platforms</Tip>
  </ResponseField>

  <ResponseField name="Expansion Readiness" type="insight">
    Assess company readiness for opening additional store locations

    <Note>High success rates indicate good operational processes</Note>
  </ResponseField>
</Accordion>

### Use Cases

<Accordion title="When to Use This Endpoint">
  <ResponseField name="Executive Dashboard" type="use-case">
    Provide company leadership with overview of store operations

    <Info>Useful for board meetings and operational reviews</Info>
  </ResponseField>

  <ResponseField name="Operations Management" type="use-case">
    Monitor onboarding progress across all company locations

    <Tip>Identify stores that need additional support or attention</Tip>
  </ResponseField>

  <ResponseField name="Performance Analysis" type="use-case">
    Analyze patterns in onboarding success and operational efficiency

    <Note>Data can inform process improvements and training needs</Note>
  </ResponseField>

  <ResponseField name="Support Prioritization" type="use-case">
    Identify which stores need immediate attention or support

    <Warning>Failed or stuck onboarding processes should be prioritized</Warning>
  </ResponseField>
</Accordion>

### Filtering and Analysis

<Accordion title="Data Analysis Tips">
  <ResponseField name="Status Filtering" type="tip">
    Filter stores by onboarding\_status to focus on specific groups

    <Info>Common filters: "pending", "in\_progress", "failed"</Info>
  </ResponseField>

  <ResponseField name="Performance Metrics" type="tip">
    Calculate success rates and average onboarding times

    <Note>Track improvements over time to measure process efficiency</Note>
  </ResponseField>

  <ResponseField name="Platform Comparison" type="tip">
    Compare platform activation success rates across stores

    <Tip>Identify if certain platforms consistently cause issues</Tip>
  </ResponseField>
</Accordion>

<Info>
  **Data Freshness:** Company-level onboarding data is updated in real-time as individual store statuses change, providing current operational insights.
</Info>

<Note>
  **Scalability:** This endpoint efficiently handles companies with large numbers of stores, making it suitable for enterprise-level operations monitoring.
</Note>
