Generate Purchase Orders
Changed onGenerate Purchase Order PDFs for multiple vendors.
For each PO group:
- Resolves the PO number (minting one via next_vendor_po_number when the caller does not supply one) and generates a PO PDF
- Uploads it, seeds a files row, and creates -- or on reissue updates -- a procurement_documents row at lifecycle_status='DRAFT'
It writes NOTHING onto manual_material_items: not status, not po_number, not po_document_id / po_date / vendor_id. The one exception is the 'doc_regenerated' state_history entry appended to the group's representative item on a reissue.
So at this point the item -> PO association lives ONLY in the document's metadata.item_ids / metadata.items snapshot; nothing on the item rows points back to the document (JEEVY-1349). The caller is what advances items: RaisePOConfirmModal PATCHes po_number and qs_state after this returns, and /backfill-po-numbers repairs items that missed it. See the NOTE at the end of the per-group loop below for why the status transition is deliberately not performed here.
Request
- Base URLhttps://api.jeevyfabrication.com (the document declares no server; this is the origin it was published from)
- Authnone declared
Request body
Response
Successful Response
Changes
- info
added the new optional request property
purchase_orders/items/attachments
- info
- info
added the new optional request property
preview - info
added the new optional request property
purchase_orders/items/delivery_address
1 more change in this revision
- info