Apply a vendor prepayment to a bill
Purchasing
Apply a vendor prepayment to a bill
Applies some or all of an unapplied vendor prepayment balance to a specific vendor bill.
Decrements vendor_bills.balance_due by the applied amount (Rule 23 SSOT).
GL entry posted:
DR Accounts Payable (ap_account) <amount>
CR Vendor Prepayments Asset (1440) <amount>
Validation:
- Prepayment must be in
activeorpartially_appliedstatus. amountmust not exceedprepayment.balance(returns 422amount_exceeds_prepayment_balance).amountmust not exceedbill.balance_due(returns 422amount_exceeds_bill_balance_due).- Bill vendor must match prepayment vendor (returns 403
vendor_mismatch). - If
amountis omitted, appliesmin(prepayment.balance, bill.balance_due)automatically.
Requires ap:write scope.
POST
Apply a vendor prepayment to a bill
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.
Path Parameters
Vendor prepayment UUID.
Body
application/json
Response
Prepayment applied to bill

