Create UOM
Create a new UOM for a specific category
POST
/
admin
/
api
/
v1
/
support
/
uom-categories
/
{uom_category_id}
/
uoms
Create UOM
curl --request POST \
--url https://erp.arukz.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "reference",
"name": "Kilogram",
"factor": 1,
"rounding": 0.01,
"category_id": 1
}
'import requests
url = "https://erp.arukz.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms"
payload = {
"type": "reference",
"name": "Kilogram",
"factor": 1,
"rounding": 0.01,
"category_id": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: 'reference', name: 'Kilogram', factor: 1, rounding: 0.01, category_id: 1})
};
fetch('https://erp.arukz.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms', 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://erp.arukz.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'reference',
'name' => 'Kilogram',
'factor' => 1,
'rounding' => 0.01,
'category_id' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": 1,
"type": "reference",
"name": "Units",
"factor": "1.0000",
"rounding": "0.0100",
"category_id": 1,
"creator_id": null,
"created_at": "2025-04-07T12:34:35.000000Z",
"updated_at": "2025-04-07T12:34:35.000000Z",
"deleted_at": null,
"category": {
"id": 1,
"name": "Unit",
"created_at": "2025-04-07T12:34:35.000000Z",
"updated_at": "2025-04-07T12:34:35.000000Z"
}
},
"message": "UOM created successfully."
}{
"message": "Unauthenticated."
}{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is required."
]
}
}Authorizations
An API token from Sign in, sent as Authorization: Bearer <token>. Tokens last 30 days.
Body
application/json
Response
Created
⌘I
Create UOM
curl --request POST \
--url https://erp.arukz.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "reference",
"name": "Kilogram",
"factor": 1,
"rounding": 0.01,
"category_id": 1
}
'import requests
url = "https://erp.arukz.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms"
payload = {
"type": "reference",
"name": "Kilogram",
"factor": 1,
"rounding": 0.01,
"category_id": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: 'reference', name: 'Kilogram', factor: 1, rounding: 0.01, category_id: 1})
};
fetch('https://erp.arukz.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms', 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://erp.arukz.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'reference',
'name' => 'Kilogram',
'factor' => 1,
'rounding' => 0.01,
'category_id' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": 1,
"type": "reference",
"name": "Units",
"factor": "1.0000",
"rounding": "0.0100",
"category_id": 1,
"creator_id": null,
"created_at": "2025-04-07T12:34:35.000000Z",
"updated_at": "2025-04-07T12:34:35.000000Z",
"deleted_at": null,
"category": {
"id": 1,
"name": "Unit",
"created_at": "2025-04-07T12:34:35.000000Z",
"updated_at": "2025-04-07T12:34:35.000000Z"
}
},
"message": "UOM created successfully."
}{
"message": "Unauthenticated."
}{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is required."
]
}
}