---
search:
  tags:
    - Alerts
    - GET
seo:
  description: >-
    Any signed in user. Returns active batches that expire within the window,
    soonest… Reference for the GET /api/v1/alerts/expiry endpoint in the
    PharmaFlow API.
sidebar:
  label: List expiring batches
  badge: GET
title: List expiring batches
type: openapi-operation
---
Any signed in user. Returns active batches that expire within the window, soonest first. Recalled and quarantined batches are left out, as one already pulled is not a stock threat.

`GET /api/v1/alerts/expiry`

**Responses**

- `200` — Batches expiring inside the window
- `401` — Not authenticated

Response example, 200:

```json
{
  "alerts": [
    {
      "batch_id": "string",
      "medicine_id": "string",
      "medicine_name": "string",
      "branch_id": "string",
      "branch_name": "string",
      "batch_number": "string",
      "expiry_date": "string",
      "days_to_expiry": -9007199254740991,
      "qty_remaining": 0,
      "unit_cost": "string"
    }
  ],
  "count": -9007199254740991
}
```
