v1
Materials
Materials

Get Next Po Number

Return the next sequential PO number, minted from the right counter.

Scope decides which counter, because Jeevy has two and they must not be crossed: a project's <project_number>-P<seq> and the shop's INY-YYMMDD-P<seq> for facility stock.

  • project_id given -> next_vendor_po_number(project_id)
  • project_id absent -> next_shop_inventory_po_number(session shop)

project_id became optional when the sign-off gate started routing facility restocks to qs_state='approval'. Approving one has to mint a number, and there is no project to mint from — the approve path used to hard-fail with "no project context for this item", stranding the order permanently.

The shop comes from the SESSION, never a parameter: it is an identity, and accepting it from the caller would let one shop spend another's sequence.

Both RPCs atomically increment and never reuse, so consuming this endpoint is intentional — the caller is expected to store what it gets back.

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

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
  • 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.