---
title: "Void Po Group"
method: POST
path: "/api/v1/materials/po-groups/{po_number}/void"
tags: ["v1", "Materials"]
---

# Void Po Group

`POST /api/v1/materials/po-groups/{po_number}/void`

## Request

- Base URL: `https://api.jeevyfabrication.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.jeevyfabrication.com/api/v1/materials/po-groups/{po_number}/void`
- Auth: none declared

Void an entire PO — the order should never have been placed.

Distinct from cancel_po_group_remainder, which keeps what arrived and only
releases the outstanding balance. This says the whole order was a mistake:
entered against the wrong project, duplicated, or cancelled with the vendor
after goods had already been booked in.

ALL OR NOTHING ON THE GUARDS, ITEM BY ITEM ON THE WRITES. Every item is
checked before any of them is touched, so a PO with one consumed line does
not half-void and leave the shop reconciling a partial reversal by hand. The
writes themselves are per item and each is independently committed — there
is no transaction spanning them — so a failure mid-way is reported with the
exact items that did and did not reverse rather than being swallowed.

Reuses _void_one_item_purchase per item, so the reversal is identical to the
single-item path: negative receiving_log line, offsetting qc_log entry,
state back to 'sel' with the PO number cleared, and the linked tasks
re-evaluated.

NO 'cancelled' qs_state EXISTS. The column's CHECK constraint allows
needs/sent/opts/sel/approval/po/purch only, so "cancelled" is expressed the
way cancel_po_group_remainder already expresses it — items revert to 'sel'
with po_number cleared, and the void_purchase event on each item's
state_history is the record that this PO was voided rather than withdrawn.

Body: { reason: str (required), force?: bool }

## Path parameters

- `po_number` string, required

## Request body

- object

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api.md) - [All operations](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/revisions/ad9a01abeac9?raw)
