---
search:
  tags:
    - Currency
    - PATCH
seo:
  description: >-
    Admin only. Patches the name, symbol, exponent, or active flag.
    Deactivation… Reference for the PATCH /api/v1/currency/{code} endpoint in
    the PharmaFlow API.
sidebar:
  label: Update a currency
  badge: PATCH
title: Update a currency
type: openapi-operation
---
Admin only. Patches the name, symbol, exponent, or active flag. Deactivation is refused for the base currency and for one an active branch still trades in.

`PATCH /api/v1/currency/{code}`

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

- `name` (string)
- `symbol` (string)
- `exponent` (integer)
- `is_active` (boolean)

Request body example:

```json
{
  "name": "string",
  "symbol": "string",
  "exponent": 0,
  "is_active": true
}
```

**Responses**

- `200` — Currency updated
- `400` — No field to update, or the deactivation is refused because the currency is the base currency or still in use by an active branch
- `403` — Caller is not an admin
- `404` — No currency with that code

Response example, 200:

```json
{
  "code": "string",
  "name": "string",
  "symbol": "string",
  "exponent": -9007199254740991,
  "is_active": true
}
```
