Link Vendor Deposit to Third-Party Purchase Order
PUT/api/vendor-deposits/:vendorDepositId/related-purchase-order
Link a vendor deposit to a purchase order owned by a DIFFERENT supplier as a third-party reference, or unlink it by passing null. Use this for freight, duty, or inspection prepayments (e.g. DDP freight paid to a forwarder against the goods supplier's PO).
accounting:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
The reference is advisory: it surfaces the deposit on the referenced PO's cash picture and suggests matching bills for settlement, but never affects that PO's expected-deposit milestones or deposit capacity, and settlement remains restricted to the deposit's own supplier.
Validation: the purchase order must NOT belong to the deposit's own supplier (link it as the primary purchase order instead), the deposit must not already have a primary purchase order link, and terminal deposits (cancelled, void, refunded, written off) cannot be changed. Unlike the primary link, the reference may be changed after the deposit has been applied to a bill.
Returns the updated deposit.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.