---
search:
  tags:
    - Medicines
    - POST
seo:
  description: >-
    Admin, inventory manager, or branch manager. Adds a medicine and returns the
    stored… Reference for the POST /api/v1/medicines endpoint in the PharmaFlow
    API.
sidebar:
  label: Create a medicine
  badge: POST
title: Create a medicine
type: openapi-operation
---
Admin, inventory manager, or branch manager. Adds a medicine and returns the stored row. Every field but the name defaults, so a sparse payload registers a medicine to price later.

`POST /api/v1/medicines`

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

- `name` (string, required)
- `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**

- `201` — Medicine created
- `400` — The body is invalid, which includes an empty medicine name
- `401` — Not authenticated
- `403` — Caller is not an admin, inventory manager, or branch manager

Response example, 201:

```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"
}
```
