Skip to main content

Preview Bulk Submit Purchase Orders

POST 

/api/purchase-orders/submit/preview

Preview what a bulk submit would do to the selected purchase orders before running it: which orders are email-format (their supplier is emailed immediately on submit) and which are Manual-format (marked Finalized without emailing). Orders that are not open are counted as ineligible and skipped by the bulk submit.

Authentication: Requires Bearer token.

Body (one of ids, filters, or apply_to_all is required):

  • ids[]: Array of purchase order IDs (required without filters/apply_to_all)
  • filters: Spatie filter params (required without ids/apply_to_all)
  • apply_to_all (boolean, optional): Targets every purchase order matching the active filters instead of an explicit ids list. Send {"apply_to_all": true, "filters": {}} to target every purchase order.

Response fields:

  • email_count (integer): Open orders whose submission format emails the supplier on submit
  • manual_count (integer): Open Manual-format orders (finalized without emailing)
  • ineligible_count (integer): Selected orders that are not open and will be skipped
  • email_orders[] (array): The email-format orders — purchase_order_number and supplier_name

Requires permission: purchase_orders.approve

Request

Responses

OK

Response Headers
    Content-Type