Skip to main content

Preview Vendor Deposit Application

POST 

/api/vendor-deposits/:vendorDepositId/applications/preview

Preview the effect of applying a deposit amount to a purchase invoice (bill) without committing anything. Returns the before/after balances on both the deposit and the bill, the tenant-currency amount, and any FX gain/loss that would be posted when the deposit and bill currencies differ.

Required scope: accounting:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Validation problems (deposit not applicable, supplier mismatch, amount exceeding the deposit's unapplied balance, amount exceeding what the bill still owes) are returned in the errors and warnings arrays rather than as an HTTP error.

A deposit can only settle what the bill still owes (its total with tax, less payments, deposits and vendor credits already applied). An amount above that is reported in errors, and applying it would be refused with 422.

Request​

Responses​

OK

Response Headers
    Content-Type