Skip to main content
POST
Move an asset, hand it to a new custodian, restate its department and change its status in one

Headers

Prefer
enum<string>

Preference

Available options:
params=single-object

Body

Move an asset, hand it to a new custodian, restate its department and change its status in one act, and record that it happened.

The three verbs it calls keep every refusal they have; what this adds is the order the state model's requires_custodian demands, one approval rather than three, and the transfer row a handover or a gate pass is printed from.

Who holds the asset afterwards is that same flag's answer. A status marked "Requires custodian" is one this asks who; any other is a status nobody holds an asset in, so a transfer into one releases whoever holds it — unless the call names somebody, which is always obeyed.

p_asset_id
string<uuid>
required
p_authorised_by_user_id
string<uuid>
p_batch_id
string<uuid>
p_custom_fields
string<jsonb>
p_department_id
string<uuid>
p_notes
string<text>
p_reason
string<text>
p_to_custodian_name
string<text>
p_to_custodian_user_id
string<uuid>
p_to_custody_until
string<date>
p_to_location_id
string<uuid>
p_to_site_id
string<uuid>
p_to_status_code
string<text>
p_transferred_at
string<timestamp with time zone>

Response

200

OK