---
search:
  tags:
    - Stockcount
    - POST
seo:
  description: >-
    Admin or branch manager. Applies the counts as stock adjustments on the…
    Reference for the POST /api/v1/stockcount/submit endpoint in the PharmaFlow
    API.
sidebar:
  label: Submit a stock count
  badge: POST
title: Submit a stock count
type: openapi-operation
---
Admin or branch manager. Applies the counts as stock adjustments on the caller's branch. Empty items get 400, a surplus lands on the newest batch, and a shortfall drains the oldest.

`POST /api/v1/stockcount/submit`

**Request body** (`application/json`, required)

- `items` (object[], required)

Request body example:

```json
{
  "items": [
    {
      "medicine_id": "string",
      "counted_quantity": 0,
      "notes": "string"
    }
  ]
}
```

**Responses**

- `200` — The adjustments that were applied
- `400` — No items submitted
- `401` — Not authenticated
- `403` — Access forbidden for the caller's role

Response example, 200:

```json
{
  "status": "string",
  "adjustments_made": -9007199254740991,
  "items": [
    {
      "medicine_id": "string",
      "db_quantity": 0,
      "counted_quantity": -9007199254740991,
      "delta": -9007199254740991
    }
  ]
}
```
