POST
Confirm a vendor return
Company space Cannot be undone For: Buyer, Stock keeper · Permission: vendor_returns.confirm Conditions
  • The supplier return must still be a draft; a confirmed return is refused with a conflict (409).
  • replacement_expected cannot be true.
  • The return must have at least one item (409).
  • Every item is checked again against the stock tagged with this supplier in the chosen sources, after the quantities reserved by other drafts of the same supplier; insufficient stock is refused.
What else happens
  • Withdraws the quantity of each stock-tracked item from its stock sources (assets or groups), as a supplier-return stock operation.
  • Records on each item the cost of the stock that left (cost_total, in minor units internally); untracked items keep a cost of 0.
  • Sets the status to confirmed and returned_at to the time of confirmation. A confirmed return can no longer be edited or deleted.
  • No accounting entry is posted and no purchase balance changes.
Part of Return goods to suppliers.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

vendorReturn
string
required

Identifier of the vendor return (27-character KSUID string).

Response

200 - application/json

VendorReturnResource

id
string
required

Identifier of the supplier return (27-character KSUID string).

vendor_id
string
required

Identifier of the supplier the goods go back to.

reference
string | null
required

Free reference of the return, unique among the company's supplier returns.

status
string
required

Lifecycle status: draft while it can still be edited or deleted, confirmed once the goods have left stock.

replacement_expected
boolean
required

Whether a replacement was expected. Always false today: replacement tracking is not supported.

returned_at
string<date-time> | null
required

Date and time the return was confirmed (ISO 8601); null while it is a draft.

created_at
string<date-time>
required

Date and time the record was created (ISO 8601, UTC).

updated_at
string<date-time>
required

Date and time the record was last changed (ISO 8601, UTC).

items
VendorReturnItemResource · object[]

Lines of the return, when loaded (they are on the show, create, update and confirm answers and on each item of the list).