# Get Installer Details

GET https://services.leadconnectorhq.com/marketplace/app/{appId}/installations

Fetches installer details for the authenticated user. This endpoint returns information about the company, location, user, and installation details associated with the current OAuth token.

## Authentication

Send `Authorization: Bearer <token>` using any one of:

- **Sub-Account token: OAuth access token only (Private Integration Tokens are not accepted).** Scopes: `marketplace-installer-details.readonly`
- **Agency token: OAuth access token only (Private Integration Tokens are not accepted).** Scopes: `marketplace-installer-details.readonly`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

### Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `appId` | string | Yes | ID of the app to get installer details |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "LeadConnector API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/marketplace/app/{appId}/installations": {
      "get": {
        "summary": "Get Installer Details",
        "operationId": "getInstallerDetails",
        "description": "Fetches installer details for the authenticated user. This endpoint returns information about the company, location, user, and installation details associated with the current OAuth token.",
        "parameters": [
          {
            "name": "appId",
            "required": true,
            "in": "path",
            "description": "ID of the app to get installer details",
            "schema": {
              "example": "6578278e879ad2646715ba9c",
              "type": "string"
            }
          },
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v3"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved installer details. Returns company, location, user, and installation information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetInstallerDetailsResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. Invalid request parameters or missing required data."
          },
          "403": {
            "description": "Forbidden. The client does not have necessary permissions to access installer details."
          }
        },
        "security": [
          {
            "Location-Access-Only": [
              "marketplace-installer-details.readonly"
            ]
          },
          {
            "Agency-Access-Only": [
              "marketplace-installer-details.readonly"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "GetInstallerDetailsResponseDTO": {
        "type": "object",
        "properties": {
          "installationDetails": {
            "description": "Installation details",
            "example": {
              "companyId": "company123",
              "locationId": "location123",
              "companyName": "Example Company",
              "relationshipNumber": "0-002-230",
              "companyEmail": "contact@example.com",
              "companyOwnerFullName": "John Doe",
              "userId": "user123",
              "isWhitelabelCompany": false,
              "companyPlan": "agency_monthly_497",
              "companyHighLevelPlan": "agency_monthly_497",
              "marketplaceAppPlanId": "plan123"
            },
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "companyId": {
                    "type": "string",
                    "description": "Company ID",
                    "example": "company123"
                  },
                  "locationId": {
                    "type": "string",
                    "description": "Location ID (if applicable)",
                    "example": "location123"
                  },
                  "companyName": {
                    "type": "string",
                    "description": "Company name",
                    "example": "Example Company"
                  },
                  "relationshipNumber": {
                    "type": "string",
                    "description": "Company relationship number",
                    "example": "0-002-230"
                  },
                  "companyEmail": {
                    "type": "string",
                    "description": "Company email. Will be null for sub-account installations due to PII concerns.",
                    "example": "contact@example.com",
                    "nullable": true
                  },
                  "companyOwnerFullName": {
                    "type": "string",
                    "description": "Company owner full name. Will be null for sub-account installations due to PII concerns.",
                    "example": "John Doe",
                    "nullable": true
                  },
                  "userId": {
                    "type": "string",
                    "description": "User ID who installed the app",
                    "example": "user123"
                  },
                  "isWhitelabelCompany": {
                    "type": "boolean",
                    "description": "Whether the company is a whitelabel company",
                    "example": false
                  },
                  "companyPlan": {
                    "type": "string",
                    "description": "Company plan. Will be null for sub-account installations due to business sensitivity.",
                    "example": "agency_monthly_497",
                    "nullable": true
                  },
                  "companyHighLevelPlan": {
                    "type": "string",
                    "description": "Company plan. Will be null for sub-account installations due to business sensitivity.",
                    "example": "agency_monthly_497",
                    "nullable": true,
                    "deprecated": true
                  },
                  "marketplaceAppPlanId": {
                    "type": "string",
                    "description": "Marketplace app plan ID for paid apps",
                    "example": "plan123"
                  },
                  "whitelabelDetails": {
                    "description": "Whitelabel details (only present if isWhitelabelCompany is true)",
                    "example": {
                      "domain": "example.com",
                      "logoUrl": "https://example.com/logo.png"
                    },
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "domain": {
                            "type": "string",
                            "description": "Domain of the whitelabel company",
                            "example": "example.com"
                          },
                          "logoUrl": {
                            "type": "string",
                            "description": "Logo URL of the whitelabel company",
                            "example": "https://example.com/logo.png"
                          }
                        },
                        "required": [
                          "domain",
                          "logoUrl"
                        ],
                        "title": "WhitelabelDetailsDTO"
                      }
                    ]
                  }
                },
                "required": [
                  "companyId",
                  "companyName",
                  "relationshipNumber",
                  "userId",
                  "isWhitelabelCompany"
                ],
                "title": "InstallerDetailsDTO"
              }
            ]
          }
        },
        "required": [
          "installationDetails"
        ],
        "title": "GetInstallerDetailsResponseDTO"
      }
    }
  }
}
```

## Code Examples

**cURL**

```bash
curl -L -X GET 'https://services.leadconnectorhq.com/marketplace/app/<appId>/installations' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: v3'
```

**Node.js**

```javascript
const options = {
  method: 'GET',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: 'v3'
  }
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/marketplace/app/<appId>/installations', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/marketplace/app/{appId}/installations"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "v3"
}

response = requests.get(url, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/marketplace/app/<appId>/installations',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: v3',
  ],
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .get("https://services.leadconnectorhq.com/marketplace/app/<appId>/installations")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "v3")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {
  url := "https://services.leadconnectorhq.com/marketplace/app/<appId>/installations"
  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "v3")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/marketplace/app/<appId>/installations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "v3"

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "v3"
}

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/marketplace/app/<appId>/installations' -Method 'GET' -Headers $headers
$response | ConvertTo-Json
```
