# UCC liens (US)

Get UCC-1 lien filings against a US company.

Returns UCC financing statements where the company is the debtor, matched by legal name across state UCC indexes. Typed fields (`state`, `number`, `date`, `name`) are uniform; `row` carries the source filing as the state publishes it — secured party, filing type, lapse date and collateral where available. Non-US companies return an empty list.

## Endpoint

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

Find the `company_id` with [Search](/en/docs/reference) (`POST /api/v1/companies/search` with `"filters": {"jurisdiction": ["us-de"]}`) or resolve a state entity number with `GET /api/v1/companies/get_id/:jurisdiction/:identifier` (e.g. `us-de`, `5600000`).

## Parameters

| Parameter | Type | In | Description |
| --- | --- | --- | --- |
| `company_id` | `integer` | path | Numeric Statsnet id of a US company (from search or `get_id`). |
| `page` | `integer` | query | Page number (default: 1). |
| `limit` | `integer` | query | Records per page (default: 100). |

## Code Examples

**Get UCC liens**

**cURL**

```bash
curl "https://statsnet.co/api/v1/companies/10000913141092/liens" \
  -H "x-api-key: sk_live_YOUR_KEY"
```

**Python**

```python
import requests

url = 'https://statsnet.co/api/v1/companies/10000913141092/liens'
headers = {'x-api-key': 'sk_live_YOUR_KEY'}

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

**TypeScript**

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

const response = await fetch(url, {
  headers: { 'x-api-key': 'sk_live_YOUR_KEY' },
});

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

**Go**

```go
package main

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

func main() {
	req, _ := http.NewRequest("GET", "https://statsnet.co/api/v1/companies/10000913141092/liens", nil)
	req.Header.Set("x-api-key", "sk_live_YOUR_KEY")

	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()

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

## Response

**Success response**

```json
{
  "records": [
    {
      "category": "ucc",
      "state": "CA",
      "number": "U240012345678",
      "date": "2024-02-14",
      "name": "ACME HOLDINGS LLC",
      "row": {
        "filing_type": "UCC-1",
        "secured_party": "FIRST NATIONAL BANK",
        "lapse_date": "2029-02-14"
      }
    }
  ],
  "total": 1
}
```

## Error Handling

**Error response**

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

This endpoint can also return `{"status": 402, "message": "payment required"}` when the subscription is canceled or expired, and `{"status": 429, "message": "quota exhausted"}` when the plan’s report quota for the current period is used up.
