PUT
Set location or vehicle details
Company space For: Manager, Stock keeper · Permission: asset_metadata_{locations|vehicles}.update Conditions
  • The body must be a non-empty JSON object, not a list; keys are lowercased before validation.
  • Every key must be allowed for the asset type (location: address, city, is_active, total_volume, fillable_volume, volume_unit_id; vehicle: type, plate_number, driver, status, load_volume, volume_unit_id, load_weight, vehicle_weight, weight_unit_id, insurance_expiry_date, fuel_type, avg_fuel_consumption_per_100km); a null value is accepted and skips validation of that key.
  • A measurement and its unit travel together: sending any field of a group (for example total_volume, fillable_volume and volume_unit_id) requires all fields of the group, and when all are non-null the unit must exist and be of the right category (volume or weight).
What else happens
  • Creates or updates one metadata row per key sent (upsert on asset and key). Measurement values are converted and stored in the reference unit of their category. Keys not sent are untouched.
Part of Locations, vehicles and site sharing.

Authorizations

Authorization
string
header
required

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

Path Parameters

asset
string
required

Identifier of the location or vehicle (27-character KSUID).

Response

AssetMetadataPayloadResource

metadata
object
required

The metadata keys touched by the call with their casted values; keys whose value is null are left out.