# Get Company

Retrieve detailed information about a company by its ID.

Returns comprehensive company data including general info, officers, shareholders, contacts, addresses, financials, and more.

## Endpoint

```text
GET /api/v1/companies/:company_id
```

## Parameters

| Parameter | Type | In | Description |
| --- | --- | --- | --- |
| `company_id` | `integer` | path | The unique identifier of the company. |

## Code Examples

**Get company by ID**

**Python**

```python
import requests

url = 'https://statsnet.co/api/v1/companies/12345'
headers = {
  'Authorization': 'Bearer sk_live_YOUR_KEY',
  'Content-Type': 'application/json'
}

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

**TypeScript**

```typescript
const url = 'https://statsnet.co/api/v1/companies/12345';

const response = await fetch(url, {
headers: {
  'Authorization': 'Bearer sk_live_YOUR_KEY',
  'Content-Type': 'application/json',
},
});

const data = await response.json();
console.log(data);
```

**Go**

```go
package main

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

func main() {
	url := "https://statsnet.co/api/v1/companies/12345"

	req, _ := http.NewRequest("GET", url, nil)
	req.Header.Set("Authorization", "Bearer sk_live_YOUR_KEY")
	req.Header.Set("Content-Type", "application/json")

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()

	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
```

## Response

The response body is the object itself — there is no `{"ok": ...}` envelope. Top-level keys: `company`, `seo`, `alternatives`, `risks`, `relations`, `meta`, `contacts_summary`.

**Success response**

```json
{
  "company": {
    "id": 58725961,
    "identifier": "302233483",
    "title": "ULKAN UZBEK QURILISH MCHJ",
    "name": "ULKAN UZBEK QURILISH MCHJ",
    "name_en": "ULKAN UZBEK QURILISH MCHJ",
    "legal_form": "llc",
    "jurisdiction": "uz",
    "status": "Active",
    "ownership_type": "private",
    "inactive": false,
    "addresses": [],
    "identifiers": [{ "type": "inn", "value": "302233483" }],
    "officers": [],
    "financials": [],
    "incorporation_date": "2018-04-12T00:00:00Z",
    "created_at": "2021-01-14T00:06:22.439Z",
    "updated_at": "2021-01-15T13:24:54.248Z"
  },
  "seo": {
    "title": "ULKAN UZBEK QURILISH MCHJ — company profile",
    "description": "Company details, officers and financials",
    "keywords": "ULKAN UZBEK QURILISH MCHJ, 302233483"
  },
  "alternatives": [],
  "risks": { "company": [], "shareholders": [], "officers": [], "all": [] },
  "relations": [
    { "connection": "shareholders", "count": 6 },
    { "connection": "officers", "count": 6 },
    { "connection": "addresses", "count": 6 },
    { "connection": "contacts", "count": 3 }
  ],
  "meta": {
    "events": 0,
    "contacts": 3,
    "subsidiaries": 0,
    "quasi_contracts": 0,
    "employment_contracts": 24,
    "employees_count": 12,
    "contracts": 2,
    "gov_contracts": 2,
    "activities": 4,
    "court_cases": 0
  },
  "contacts_summary": { "phones": 2, "emails": 1, "websites": 1, "total": 4 }
}
```

## Error Handling

Errors are returned as `{"status": <HTTP code>, "message": "<text>"}`.

**Error response**

```json
{
  "status": 404,
  "message": "not found"
}
```
