---
search:
  tags:
    - Suppliers
    - PUT
seo:
  description: >-
    Admin or branch manager. Patches the contact, type, lead time,… Reference
    for the PUT /api/v1/suppliers/{supplierId} endpoint in the PharmaFlow API.
sidebar:
  label: Update a supplier
  badge: PUT
title: Update a supplier
type: openapi-operation
---
Admin or branch manager. Patches the contact, type, lead time, reliability, or active flag. Fields outside that set are ignored, and a payload holding none of them is refused.

`PUT /api/v1/suppliers/{supplierId}`

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

- `name` (string)
- `tax_number` (string)
- `contact_person` (string)
- `phone` (string)
- `email` (string)
- `address` (string)
- `supplier_type` (string)
- `lead_time_days` (integer)
- `reliability_score` (number)
- `is_active` (boolean)

Request body example:

```json
{
  "name": "string",
  "tax_number": "string",
  "contact_person": "string",
  "phone": "string",
  "email": "string",
  "address": "string",
  "supplier_type": "string",
  "lead_time_days": -9007199254740991,
  "reliability_score": 0,
  "is_active": true
}
```

**Responses**

- `200` — Supplier updated
- `400` — No valid field is supplied to update
- `401` — Not authenticated
- `403` — Caller is not an admin, inventory manager, or branch manager
- `404` — Supplier not found

Response example, 200:

```json
{
  "id": "string",
  "name": "string",
  "tax_number": "string",
  "contact_person": "string",
  "phone": "string",
  "email": "string",
  "address": "string",
  "supplier_type": "string",
  "lead_time_days": -9007199254740991,
  "reliability_score": 0,
  "is_active": true,
  "created_at": "string",
  "updated_at": "string"
}
```
