Correct landed cost on a paid or partially paid vendor bill
Authorization: requires purchasing:write API-key scope AND the per-user accounting.post SoD permission (this reverses and re-posts landed-cost GL and issues a vendor credit, a controller-tier financial action).
Corrects the landed cost on a PAID or PARTIAL landed bill: send the FULL desired line set with the CORRECTED landed amount. The handler reverses the prior landed allocation, re-allocates at the corrected freight amount, and issues a vendor credit (CR landed-cost clearing 2210) for the overcharge. THE ONE RULE: a thin wrapper over the canonical correctBillLandedCost.
Gates:
- 404 Bill not found.
- 409 historical_row_immutable: the bill was loaded via the migration API (post a manual inventory adjustment plus journal entry instead).
- 409 bill_terminal: the bill is voided or written_off.
- 409 bill_not_paid: no payments applied; use POST /vendor-bills//edit-lines instead (no credit memo is needed).
Requires purchasing:write scope. Idempotent via the Idempotency-Key header.
Authorizations
API key issued per entity via Settings > Developers > API Keys.
Each key carries scopes (e.g. orders:read, products:write).
Bearer token format: Authorization: Bearer ark_live_ent_
Test keys use ark_test_ent_. Both are issued per entity
via Settings > Developers > API Keys.
Headers
Optional idempotency key (UUID). Re-POST with same key returns cached 200 without re-processing.
Path Parameters
Body
The full desired line set for the bill, carrying the corrected landed amount.
Response
Landed cost corrected; vendor credit issued

