---
search:
  tags:
    - Medicines
    - PUT
seo:
  description: >-
    Admin, inventory manager, or branch manager. Patches editable fields and…
    Reference for the PUT /api/v1/medicines/{medicineId} endpoint in the
    PharmaFlow API.
sidebar:
  label: Update a medicine
  badge: PUT
title: Update a medicine
type: openapi-operation
---
Admin, inventory manager, or branch manager. Patches editable fields and returns the row. Fields outside the editable set are ignored, and a payload with nothing editable is refused.

`PUT /api/v1/medicines/{medicineId}`

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

- `name` (string)
- `generic_name` (string)
- `barcode` (string)
- `category` (string)
- `form` (string)
- `strength` (string)
- `unit` (string)
- `selling_price` (string)
- `low_stock_threshold` (integer)
- `requires_prescription` (boolean)
- `is_controlled` (boolean)
- `vat_category` (string)
- `requires_cold_chain` (boolean)
- `sfda_registration_no` (string)
- `max_public_price` (string)

Request body example:

```json
{
  "name": "string",
  "generic_name": "",
  "barcode": "",
  "category": "",
  "form": "",
  "strength": "",
  "unit": "",
  "selling_price": "0.000",
  "low_stock_threshold": 10,
  "requires_prescription": false,
  "is_controlled": false,
  "vat_category": "zero_rated",
  "requires_cold_chain": false,
  "sfda_registration_no": "",
  "max_public_price": "0.000"
}
```

**Responses**

- `200` — Medicine updated
- `400` — The body is invalid, or no updatable field is supplied
- `401` — Not authenticated
- `403` — Caller is not an admin, inventory manager, or branch manager
- `404` — Medicine not found

Response example, 200:

```json
{
  "id": "string",
  "name": "string",
  "generic_name": "string",
  "barcode": "string",
  "category": "string",
  "form": "string",
  "strength": "string",
  "unit": "string",
  "selling_price": "string",
  "max_public_price": "string",
  "stock_quantity": -9007199254740991,
  "low_stock_threshold": -9007199254740991,
  "requires_prescription": true,
  "is_controlled": true,
  "vat_category": "string",
  "requires_cold_chain": true,
  "sfda_registration_no": "string",
  "image_key": "string",
  "image_url": "string",
  "is_active": true,
  "created_at": "string",
  "updated_at": "string"
}
```
