Update quantity
Update a quantity count entry
Also accepts PATCH with the same body.
PUT
/
admin
/
api
/
v1
/
inventories
/
quantities
/
{id}
Update quantity
curl --request PUT \
--url https://erp.arukz.com/admin/api/v1/inventories/quantities/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"counted_quantity": 25
}
'import requests
url = "https://erp.arukz.com/admin/api/v1/inventories/quantities/{id}"
payload = { "counted_quantity": 25 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({counted_quantity: 25})
};
fetch('https://erp.arukz.com/admin/api/v1/inventories/quantities/{id}', 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/inventories/quantities/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'counted_quantity' => 25
]),
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,
"quantity": -100,
"reserved_quantity": 0,
"counted_quantity": 0,
"difference_quantity": 0,
"inventory_diff_quantity": 100,
"available_quantity": -100,
"inventory_quantity_set": false,
"scheduled_at": "2025-12-31T00:00:00.000000Z",
"incoming_at": "2025-04-10T12:36:39.000000Z",
"created_at": "2025-04-10T12:36:39.000000Z",
"updated_at": "2025-04-10T12:36:39.000000Z"
},
"message": "Quantity updated successfully."
}{
"message": "Unauthenticated."
}{
"message": "The given data was invalid.",
"errors": {
"counted_quantity": [
"The counted quantity field is required."
]
}
}Authorizations
An API token from Sign in, sent as Authorization: Bearer <token>. Tokens last 30 days.
Body
application/json
Response
Success
⌘I
Update quantity
curl --request PUT \
--url https://erp.arukz.com/admin/api/v1/inventories/quantities/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"counted_quantity": 25
}
'import requests
url = "https://erp.arukz.com/admin/api/v1/inventories/quantities/{id}"
payload = { "counted_quantity": 25 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({counted_quantity: 25})
};
fetch('https://erp.arukz.com/admin/api/v1/inventories/quantities/{id}', 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/inventories/quantities/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'counted_quantity' => 25
]),
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,
"quantity": -100,
"reserved_quantity": 0,
"counted_quantity": 0,
"difference_quantity": 0,
"inventory_diff_quantity": 100,
"available_quantity": -100,
"inventory_quantity_set": false,
"scheduled_at": "2025-12-31T00:00:00.000000Z",
"incoming_at": "2025-04-10T12:36:39.000000Z",
"created_at": "2025-04-10T12:36:39.000000Z",
"updated_at": "2025-04-10T12:36:39.000000Z"
},
"message": "Quantity updated successfully."
}{
"message": "Unauthenticated."
}{
"message": "The given data was invalid.",
"errors": {
"counted_quantity": [
"The counted quantity field is required."
]
}
}