Record a supplier refund of a vendor credit

Commits a refund previewed with vendorCredit.refund.preview: the same body, the preview's confirmation_token, the same Idempotency-Key and the vendor credit's ETag as If-Match. With bank_transaction_id the imported line is booked to the vendor credit and reconciled (settles_bank_line true, bank_transaction_id in the result); no second line is created. The journal is Dr bank / Cr Accounts Payable (plus an exchange difference for a foreign-currency credit at another rate); the vendor credit closes when nothing is left. A supplier refund goes this way: look first for an approved, open vendor credit of the supplier (vendorCredit.index, filter[contact_id]); only when there is none create the vendor credit (vendorCredit.store, with the account and VAT rule of the charge) and approve it (vendorCredit.approve); then refund it against the line; bankTransaction.categorize refuses a supplier on money in with supplier_refund_needs_vendor_credit. Reverse with vendorCredit.refund.reverse, which gives an imported line back unbooked. Requires Idempotency-Key, If-Match and the vendor-credits:action OAuth scope with update_vendor_credits and update_bank_accounts.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Body Params

Confirmed values used to record a supplier refund of a vendor credit, including the confirmation token returned by vendorCredit.refund.preview.

string | null

An imported money-in line the refund settles; omit to record a new line.

uuid | null

With bank_transaction_id: optional, must be the line's account.

number | null

With bank_transaction_id: optional, must equal the line amount.

date | null

With bank_transaction_id: optional, must be the line date.

string | null
string | null
string
required
length ≤ 8192
exchange_rate
object
Headers
string
required
length ≤ 191

Required unique key whose request hash and terminal response are stored durably for 24 hours.

string

Required. ETag from the latest representation; a stale value returns 412 precondition_failed. Send this header, not the standard If-Match: some HTTP intermediaries evaluate a standard If-Match themselves and can answer 412 even though the change was applied. Never send both; both with different ETags returns 400 conflicting_precondition_headers.

string
deprecated

Accepted with the same value and meaning as Cybooks-If-Match, but do not send it: an intermediary can answer 412 to it after the change was applied. Send Cybooks-If-Match instead.

Responses

Language
Credentials
OAuth2
Missing 1 required scope
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*