---
search:
  tags:
    - Purchases
    - GET
seo:
  description: >-
    Any signed in user. Returns active in-stock batches within the days window,…
    Reference for the GET /api/v1/purchases/expiring 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 in-stock batches within the days window, soonest first. Recalled and quarantined batches are excluded, days defaults to 90, and limit caps rows.

`GET /api/v1/purchases/expiring`

**Responses**

- `200` — The batches nearest expiry
- `401` — Not authenticated

Response example, 200:

```json
{
  "items": [
    {
      "id": "string",
      "medicine_id": "string",
      "branch_id": "string",
      "supplier_id": "string",
      "batch_number": "string",
      "expiry_date": "string",
      "manufacturing_date": "string",
      "qty_received": -9007199254740991,
      "qty_remaining": -9007199254740991,
      "unit_cost": "string",
      "status": "string",
      "sfda_status": "string",
      "created_at": "string",
      "medicine_name": "string",
      "medicine_selling_price": 0,
      "supplier_name": "string",
      "is_deleted": true
    }
  ],
  "limit": -9007199254740991
}
```
