---
search:
  tags:
    - Branches
    - PUT
seo:
  description: >-
    Admin only. Patches a branch's name, city, address, VAT number, flag, or…
    Reference for the PUT /api/v1/branches/{branchId} endpoint in the PharmaFlow
    API.
sidebar:
  label: Update a branch
  badge: PUT
title: Update a branch
type: openapi-operation
---
Admin only. Patches a branch's name, city, address, VAT number, flag, or currency. Closing a branch is done by setting is_active false, and the code itself is fixed once the branch exists.

`PUT /api/v1/branches/{branchId}`

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

- `name` (string)
- `city` (string)
- `vat_number` (string)
- `address` (string)
- `is_active` (boolean)
- `currency_code` (string)

Request body example:

```json
{
  "name": "string",
  "city": "string",
  "vat_number": "string",
  "address": "string",
  "is_active": true,
  "currency_code": "string"
}
```

**Responses**

- `200` — Branch updated
- `400` — No valid fields to update, or the currency is unknown
- `401` — Not authenticated
- `403` — Caller is not an admin
- `404` — Branch not found

Response example, 200:

```json
{
  "id": "string",
  "code": "string",
  "name": "string",
  "city": "string",
  "vat_number": "string",
  "address": "string",
  "currency_code": "string",
  "image_url": "string",
  "is_active": true,
  "is_deleted": -9007199254740991,
  "created_at": "string",
  "updated_at": "string"
}
```
