---
search:
  tags:
    - PurchaseOrders
    - PUT
seo:
  description: >-
    Admin and branch manager. Moves an order to SENT or… Reference for the PUT
    /api/v1/purchase-orders/{purchaseOrderId}/status endpoint in the PharmaFlow
    API.
sidebar:
  label: Send or cancel a purchase order
  badge: PUT
title: Send or cancel a purchase order
type: openapi-operation
---
Admin and branch manager. Moves an order to SENT or CANCELLED and writes an audit entry. A status that is neither, or an order already received or cancelled, is refused with 400.

`PUT /api/v1/purchase-orders/{purchaseOrderId}/status`

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

- `status` (string, required)

Request body example:

```json
{
  "status": "string"
}
```

**Responses**

- `200` — The new status
- `400` — status is neither SENT nor CANCELLED, the PO is already received, or it is already cancelled
- `401` — Not authenticated
- `403` — Access forbidden for this role
- `404` — PO not found

Response example, 200:

```json
{
  "id": "string",
  "status": "string"
}
```
