v1
Materials
Materials

Preview Next Po Number

Read-only peek at what next-po-number WOULD mint, without consuming it.

Mirrors next_vendor_po_number()'s exact formatting (<project_number>-P<seq>, falling back to the project id when project_number is blank) via a plain SELECT instead of the RPC's row-locking UPDATE — no increment, no side-effects, safe to call on every render/reopen.

Vinay reads the raised-PO count directly off this number, so a "preview" that silently burned it (the old RaisePOConfirmModal prefetch, removed 2026-07-22 — see CLAUDE.md) made it look like dozens of POs had gone out before a single one actually had. This is what makes a live preview safe to bring back: next_seq/project_number are returned separately (not just the formatted string) so the frontend can project subsequent groups' numbers in the same raise batch without calling this once per group.

get/api/v1/materials/next-po-number/preview

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/next-po-number/preview
  • Auth: none declared

Query parameters

project_idinteger nullable

Response

Successful Response

object required

Changes

No recorded changes to this operation across all 1 revision of this API.