Inbound Shipments
List Inbound Shipments
Returns a paginated list of inbound shipments. Supports Spatie QueryBuilder filters and sorts.
Create Inbound Shipment
Creates a new inbound shipment in Draft status. Lines are optional and can be added later.
Get Inbound Shipment
Returns a single inbound shipment with its lines, supplier, destination warehouse, shipping method, purchase order references, and creator.
Update Inbound Shipment
Updates an inbound shipment. Only editable for shipments in Draft status. Lines array syncs the shipment lines (pass line id to update existing, omit id to add new, omit line entirely to delete).
Delete Inbound Shipment
Deletes an inbound shipment. Only shipments in Draft or Cancelled status that have not been received can be deleted.
Create Inbound Shipment From Purchase Invoice
Create a new inbound shipment pre-filled from a supplier invoice. Each invoice line is converted into a shipment line that retains the purchase_invoice_line_id and resolves to its underlying purchase_order_line_id.
Mark As Shipped
Transitions the shipment from Draft to In Transit status and records carrier/tracking information.
Receive Shipment
Records receipt of items for the specified shipment lines and updates inventory. Can be called multiple times for partial receiving.
Create Receipt (Native IS Path)
Creates a native InboundShipmentReceipt with lines and posts FIFO/inventory directly via the new IS-first path (Phase 1 of the InboundShipment / PurchaseOrderShipment unification — see SKU-8029). Coexists with the legacy `/receive` endpoint, which delegates through the PO shipment receipt path.
Cancel Shipment
Cancels an inbound shipment. Only shipments in Draft or In Transit status can be cancelled.
Close Shipment
Closes an inbound shipment, marking it as fully processed. Only Received shipments can be closed.
Revert to Draft
Reverts an In Transit shipment back to Draft status, allowing edits. Only In Transit shipments that have not been received can be reverted.
Resolve Import (Preview SKUs/POs)
Resolves SKUs and PO numbers from a bulk import file, returning matched products and purchase order lines before committing. Use this as a preview/validation step before calling import-items.
Import Items
Bulk imports items into an inbound shipment. Adds shipment lines for each item. Set replace_existing=true to clear existing lines first.
Available Purchase Orders
Returns open purchase orders that have unreceived lines available to be added to this inbound shipment. Excludes POs where all lines are already fully assigned.
Available Purchase Order Lines
Returns unreceived PO lines grouped by purchase order for the given PO IDs. Each line shows how much quantity is available to assign to this shipment.
List Bills
Returns all landed cost bills attached to this inbound shipment, ordered by invoice date descending. Includes bill lines and allocations to purchase order lines.
Create Bill
Creates a landed cost bill attached to this inbound shipment. Cannot be added to cancelled shipments.
Get Bill
Returns a single bill attached to this inbound shipment with all lines and allocations.
Update Bill
Updates a bill attached to this inbound shipment. Cannot modify bills on a cancelled shipment.
Delete Bill
Deletes a bill attached to this inbound shipment. Cannot delete bills on a cancelled shipment.
Landed Cost Preview
Returns a per-PO-line aggregation of all landed cost allocations across every bill attached to this shipment. Useful for previewing total landed costs before closing.
Get Inbound Shipment Receipt
Returns full details for an inbound shipment receipt including the parent inbound shipment, supplier, destination warehouse, all distinct purchase orders represented across receipt lines, line items (with product + PO line context), and the linked accounting transaction.
Get Activity Log
Paginated activity log entries for an inbound shipment receipt. Supports search across causer name, properties JSON, and event; filterable by event, causer, and date range.
Get FIFO Layers
Paginated list of FIFO layers created by this inbound shipment receipt's lines. Each layer is scoped to `link_type = InboundShipmentReceiptLine` and the receipt's line IDs.
Get Inventory Movements
Paginated inventory movements generated by this inbound shipment receipt's lines. Includes per-movement FIFO layer reference and unit/total cost.
Generate Accounting Transaction
Generates (or regenerates) the accounting transaction entry for an inbound shipment receipt. Returns the created transaction with its nominal-code-tagged lines.