Sync PO Price From Invoice Line
POST/api/purchase-invoices/:purchaseInvoice/lines/:purchaseInvoiceLine/sync-po-price
Push the unit_price from a single invoice line up to the linked PO line's amount, then re-evaluate the invoice's approval status.
Use this from the 3-Way Match view when a price variance is confirmed legitimate (e.g. supplier raised the price). The PO line is updated, an activity log entry is recorded on the PO line, and the invoice is re-evaluated — typically returning it to auto_approved once the price matches. Works on both open and closed POs.
Authentication: Requires Bearer token.
Request body fields:
- notes (string, optional, max 1000): free-text justification stored on the activity log entry.
Result statuses:
- updated: PO line amount changed; old_amount and new_amount are returned.
- unchanged: PO line amount already matched invoice line unit price; no write occurred.
- skipped: nothing was done. The reason field explains why. Possible reasons: 'invoice line not linked to a PO line', 'invoice line has no unit price'.
Returns 404 if the invoice line does not belong to the purchase invoice.
Request
Responses
- 200
Successful response