Skip to main content
POST
Transfer a prepayment to another purchase order

Authorizations

Authorization
string
header
required

Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.

Path Parameters

id
integer
required

Prepayment ID

Body

application/json
purchase_order_id
integer

Target purchase order. Must be from the same vendor and not deleted. Required unless work_order_id is sent; send this or work_order_id, not both.

work_order_id
integer

Target production-run work order. Must be from the same vendor and not cancelled. Required unless purchase_order_id is sent; send this or purchase_order_id, not both. Prepayments can be linked to work orders only on accounts where that is enabled; otherwise the transfer is refused (422).

amount
number | null

Amount to move. Must be more than 0 and no more than what is still on the source (the prepayment's purchase order, or the work order named in from_work_order_id). Omit (or null) to move all of it.

Required range: x > 0
from_work_order_id
integer | null

Move credit off this production-run work order instead of off the prepayment's purchase order. The run must hold slices moved onto it, or the whole deposit when it was recorded straight onto that one run.

Response

The transferred prepayment (top-level object, not wrapped in data).

A vendor prepayment (deposit).

id
integer
vendor_id
integer
purchase_order_id
integer | null

The prepayment's home purchase order.

purchase_order_shipment_id
integer | null

Purchase order shipment the deposit was paid for; null when none was given.

currency_code
string
amount
number
base_amount
number
exchange_rate
number
unapplied_amount
number
base_unapplied_amount
number
payment_date
string<date> | null
reference
string | null
notes
string | null
auto_apply
boolean
voided_at
string<date-time> | null
void_reason
string | null
is_voided
boolean
quickbooks_sync_status
string | null
quickbooks_detailed_message
string | null
quickbooks_purchase_id
string | null
quickbooks_last_synced_at
string<date-time> | null
bill_pay_owned
boolean | null

Set by the list endpoint only; null on other responses.

created_at
string<date-time> | null
purchase_order_shipment
object | null

The linked purchase order shipment, or null when none. Present on the list and create responses.

vendor
object | null

Present only when loaded.

applications
object[]

Bill applications. Present only when loaded (list and show).

purchase_orders
object[]

Linked purchase orders. Present only when loaded.

work_orders
object[]

Linked production-run work orders. Present only when loaded.

allocations
object[]

Slices of the credit moved off the home purchase order by a partial transfer. amount minus the sum of these is what is still on purchase_order_id. Present only when loaded (e.g. on the transfer response).