# PUT /api/v1/inventory/counts/{count_id}/lines/{line_id}

> Record a counted quantity

- **Tag:** inventory:counts
- **Operation ID:** `submit_count_line_api_v1_inventory_counts__count_id__lines__line_id__put`

## Description

Record / update the counter's measured quantity on a line.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Parameters

- `count_id` (path, string, required)
- `line_id` (path, string, required)

## Request body

Schema: `SubmitCountLineRequest`

- `counted_quantity` (number · required) — Counter-recorded quantity.
- `reason` (string)
- `notes` (string)

## Responses

### 200 — Successful Response

### 400 — Bad Request - Invalid input

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 404 — Not Found - Resource does not exist

### 409 — Conflict - Resource already exists

### 422 — Validation Error - Invalid data format

## Code samples

### cURL

```bash
curl -X PUT 'https://api.ondayzero.com/api/v1/inventory/counts/{count_id}/lines/{line_id}' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "counted_quantity": 0
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/inventory/counts/{count_id}/lines/{line_id}', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "counted_quantity": 0
}),
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

payload = {
  "counted_quantity": 0
}

response = httpx.put("https://api.ondayzero.com/api/v1/inventory/counts/{count_id}/lines/{line_id}", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/inventory-counts/submit-count-line
- OpenAPI slice: https://www.ondayzero.com/docs/reference/inventory-counts/submit-count-line/openapi.json
- Other endpoints in **inventory:counts**: https://www.ondayzero.com/docs/reference/inventory-counts
