# Contracts Metadata

Get contract metadata for a company.

Returns metadata about contracts associated with the specified company.

## Endpoint

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

## Parameters

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

## Code Examples

**Get contracts metadata**

**Python**

```python
import requests

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

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/contracts/meta"

	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

**Success response**

```json
{
  "company_id": 12345,
  "gov_contracts_meta": [
    { "sum": 15000000, "year": 2024, "count": 3, "method": "Из одного источника" }
  ],
  "gov_applications_meta": [
    { "sum": 2500000, "year": 2024, "count": 1 }
  ],
  "quasi_contracts_meta": [
    { "sum": 5000000, "year": 2024, "count": 2 }
  ]
}
```

## Error Handling

**Error response**

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