Set location or vehicle details
curl --request PUT \
--url https://api.exowpee.com/v1/catalog/assets/{asset}/metadata \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/assets/{asset}/metadata"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/assets/{asset}/metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exowpee.com/v1/catalog/assets/{asset}/metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/assets/{asset}/metadata"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.exowpee.com/v1/catalog/assets/{asset}/metadata")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/assets/{asset}/metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"metadata": {}
}{
"message": "<string>",
"errors": {}
}Locations, vehicles and site sharing
Set location or vehicle details
Saves descriptive details of a location or vehicle (for example capacity or measurements) in one call, creating or updating each key sent; the answer lists the casted values of the keys that are not null.
PUT
/
catalog
/
assets
/
{asset}
/
metadata
Set location or vehicle details
curl --request PUT \
--url https://api.exowpee.com/v1/catalog/assets/{asset}/metadata \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/assets/{asset}/metadata"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/assets/{asset}/metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exowpee.com/v1/catalog/assets/{asset}/metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/assets/{asset}/metadata"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.exowpee.com/v1/catalog/assets/{asset}/metadata")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/assets/{asset}/metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"metadata": {}
}{
"message": "<string>",
"errors": {}
}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).
- 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.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the location or vehicle (27-character KSUID).
Response
AssetMetadataPayloadResource
The metadata keys touched by the call with their casted values; keys whose value is null are left out.