# View

Get new metadata view for a company.

Returns an updated metadata view for the specified company.

## Endpoint

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

## Parameters

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

## Code Examples

**Get company view**

**Python**

```python
import requests

url = 'https://statsnet.co/api/v1/companies/12345/view'
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/view';

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/view"

	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 has no `{"ok": ...}` envelope — it is a single `meta` array of localized key/value pairs (labels come back in Russian when the request language is `ru`).

**Success response**

```json
{
  "meta": [
    { "key": "Shareholders", "value": "1 shareholder" },
    { "key": "Officers", "value": "1 officers" },
    { "key": "Scoring", "value": "" },
    { "key": "Counterparties", "value": "12" },
    { "key": "Certificates", "value": "2" },
    { "key": "Events", "value": "0" },
    { "key": "Debtors", "value": "1" },
    { "key": "Jobs", "value": "5" },
    { "key": "Domains", "value": "1" },
    { "key": "Court cases", "value": "0" },
    { "key": "Bank accounts", "value": "3" }
  ]
}
```

## Error Handling

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

**Error response**

```json
{
  "status": 403,
  "message": "access denied"
}
```
