---
search:
  tags:
    - Transfers
    - POST
seo:
  description: >-
    Admin or branch manager. Moves one medicine between two branches and
    completes it.… Reference for the POST /api/v1/transfers endpoint in the
    PharmaFlow API.
sidebar:
  label: Create a stock transfer
  badge: POST
title: Create a stock transfer
type: openapi-operation
---
Admin or branch manager. Moves one medicine between two branches and completes it. FEFO from active batches, the branches must differ, and short stock is refused with 400.

`POST /api/v1/transfers`

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

- `from_branch_id` (string, required)
- `to_branch_id` (string, required)
- `medicine_id` (string, required)
- `qty` (integer, required)
- `notes` (string)

Request body example:

```json
{
  "from_branch_id": "string",
  "to_branch_id": "string",
  "medicine_id": "string",
  "qty": -9007199254740991,
  "notes": ""
}
```

**Responses**

- `201` — Transfer completed
- `400` — The quantity is not positive, both branches are the same, or the source branch has insufficient stock
- `401` — Not authenticated
- `403` — Caller is not an admin, branch manager, or inventory manager
- `404` — The medicine, source branch, or destination branch was not found

Response example, 201:

```json
{
  "id": "string",
  "from_branch_id": "string",
  "to_branch_id": "string",
  "medicine_id": "string",
  "medicine_name": "string",
  "qty": -9007199254740991,
  "status": "string",
  "created_at": "string"
}
```
