cURL
curl -X PATCH "$EXSITED_BASE_URL/api/v4/settings/uom/uom_1a2b3c4d5e6f708192a3b4c5d6e7f809" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"uom": {
"display_name": "Centimetre",
"description": "Metric length unit"
}
}'from exsited import build_client
client = build_client()
response = client.uom.update_settings_uom(
"uom_1a2b3c4d5e6f708192a3b4c5d6e7f809",
{"uom": {"display_name": "Centimetre", "description": "Metric length unit"}},
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.uom.updateSettingsUom('uom_1a2b3c4d5e6f708192a3b4c5d6e7f809', {
uom: {display_name: 'Centimetre', description: 'Metric length unit'},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->uom->updateSettingsUom('uom_1a2b3c4d5e6f708192a3b4c5d6e7f809', [
'uom' => ['display_name' => 'Centimetre', 'description' => 'Metric length unit'],
]);
print_r($response->data);
import com.exsited.Dto;
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<Dto> response = client.uom().updateSettingsUom(
"uom_1a2b3c4d5e6f708192a3b4c5d6e7f809",
Map.of("uom", Map.of("display_name", "Centimetre", "description", "Metric length unit")));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Uom.UpdateSettingsUomAsync(
"uom_1a2b3c4d5e6f708192a3b4c5d6e7f809",
new Dictionary<string, object?>
{
["uom"] = new Dictionary<string, object?>
{
["display_name"] = "Centimetre",
["description"] = "Metric length unit",
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.uom.updateSettingsUom(
'uom_1a2b3c4d5e6f708192a3b4c5d6e7f809',
{
'uom': {
'display_name': 'Centimetre',
'description': 'Metric length unit',
},
},
);
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Uom().UpdateSettingsUom(context.Background(), "uom_1a2b3c4d5e6f708192a3b4c5d6e7f809", map[string]any{
"uom": map[string]any{
"display_name": "Centimetre",
"description": "Metric length unit",
},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
Units of measurement
Update a unit of measurement
Changes a unit of measurement, or turns it on or off, and returns it.
PATCH
/
settings
/
uom
/
{uom_id}
cURL
curl -X PATCH "$EXSITED_BASE_URL/api/v4/settings/uom/uom_1a2b3c4d5e6f708192a3b4c5d6e7f809" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"uom": {
"display_name": "Centimetre",
"description": "Metric length unit"
}
}'from exsited import build_client
client = build_client()
response = client.uom.update_settings_uom(
"uom_1a2b3c4d5e6f708192a3b4c5d6e7f809",
{"uom": {"display_name": "Centimetre", "description": "Metric length unit"}},
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.uom.updateSettingsUom('uom_1a2b3c4d5e6f708192a3b4c5d6e7f809', {
uom: {display_name: 'Centimetre', description: 'Metric length unit'},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->uom->updateSettingsUom('uom_1a2b3c4d5e6f708192a3b4c5d6e7f809', [
'uom' => ['display_name' => 'Centimetre', 'description' => 'Metric length unit'],
]);
print_r($response->data);
import com.exsited.Dto;
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<Dto> response = client.uom().updateSettingsUom(
"uom_1a2b3c4d5e6f708192a3b4c5d6e7f809",
Map.of("uom", Map.of("display_name", "Centimetre", "description", "Metric length unit")));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Uom.UpdateSettingsUomAsync(
"uom_1a2b3c4d5e6f708192a3b4c5d6e7f809",
new Dictionary<string, object?>
{
["uom"] = new Dictionary<string, object?>
{
["display_name"] = "Centimetre",
["description"] = "Metric length unit",
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.uom.updateSettingsUom(
'uom_1a2b3c4d5e6f708192a3b4c5d6e7f809',
{
'uom': {
'display_name': 'Centimetre',
'description': 'Metric length unit',
},
},
);
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Uom().UpdateSettingsUom(context.Background(), "uom_1a2b3c4d5e6f708192a3b4c5d6e7f809", map[string]any{
"uom": map[string]any{
"display_name": "Centimetre",
"description": "Metric length unit",
},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
Send the changes under
uom. Set status to active or inactive to turn the unit on or off.
The SDK samples get their client from credentials your app registers once when it starts, as shown in Authentication. To try the call here, click Try it, set
host to your Exsited API host name and paste an access token from Get an access token. To send a raw JSON body instead of filling in fields, copy the cURL sample and edit its -d payload.