PUT
Edit a purchase return
Company space For: Buyer, Stock keeper · Permission: purchase_returns.update Conditions
  • The supplier return must still be a draft; a confirmed return cannot be changed.
  • purchase_id, purchase_reception_id and items cannot be changed here: they are refused. Items are managed on the items routes.
  • The reference, when sent, must be unique among the company’s supplier returns (the return itself is ignored).
  • After the change, replacement_expected and has_credit_note cannot both be true, and a VAT amount above zero requires has_credit_note to be true.
  • Quantities of the existing items are not checked again until confirmation.
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

purchase_return
string
required

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

Query Parameters

response
enum<string>
default:none

Response mode. Default none; none answers 204 No Content.

Available options:
none,
resource
fields
string

Comma-separated JSON keys of the root resource (id is always rendered). Available: id, purchase_id, purchase_reception_id, vendor_id, reference, status, vat_total, replacement_expected, has_credit_note, vat_is_recoverable, returned_at, created_at, updated_at.

include
string

Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: items, items.purchaseItem, items.stockableUnit.

Response

Resource (only with response=resource).

id

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

purchase_id

Identifier of the purchase the goods are returned to.

purchase_reception_id

Identifier of the reception the return is attached to; null when the return was created for the whole purchase.

vendor_id

Identifier of the supplier, copied from the purchase.

reference

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

status

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

vat_total
number

VAT on the supplier credit note in major units (the minor-unit amount divided by 10 to the power currency_exponent). 0 when there is no credit note.

replacement_expected
boolean

True when the supplier is expected to send replacement goods; confirming then reopens the returned quantities for receiving.

has_credit_note
boolean

True when the supplier issues a credit note for the returned goods; confirming then reduces the amount owed on the purchase. Cannot be true together with replacement_expected.

vat_is_recoverable
boolean

Whether the VAT of the purchase is recoverable, read from the purchase at rendering time; false when the purchase never set it.

returned_at

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

created_at

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

updated_at

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

items
array

Lines of the return. Present only when requested with include=items.