Allocate to Purchase Invoice
POST/api/vendor-credits/:vendor_credit/allocate
Allocate part or all of the vendor credit's remaining balance to a purchase invoice (bill).
Required fields:
purchase_invoice_id(int) — Must exist.amount(float, >= 0.01) — Amount to allocate. Cannot exceed the credit's remaining balance or the bill's outstanding balance.
Optional fields:
allocated_at(date) — Defaults to now.notes(string)
The allocation is recorded on vendor_credit_allocations and reduces the bill's outstanding amount. The response includes the new allocation with its purchase invoice and allocator user.
Request
Responses
- 200
Successful response