/stocks/stock-status/{stockStatus}
This endpoint allows you to update a Stock Status. A stock status corresponds to an existing stock in a warehouse for a material.
updateStockStatus
| Name | Type | Description |
|---|---|---|
stockStatus
required
|
string |
The stock status ID |
Content-Type: application/json
minimum_quantity
integer
Minimum quantity
Example: 10
mean_price
number
Mean price
Example: 10.5
observations
string
Observations about the stock status update
Example: Stock status updated to in stock
data
object
StockStatus model structure details
id
string
required
read-only
ID of the StockStatus
type
string
required
read-only
Model type
stock-status
attributes
object
required
material_id
integer
read-only
ID of the Material
Example: 1
warehouse_id
integer
read-only
ID of the Warehouse
Example: 1
quantity
number
read-only
Quantity of the material present in the warehouse
mean_price
number | null
read-only
Mean price of the material associated with the warehouse
observations
string | null
read-only
Description or notes
status
string
error
error
object
properties
object
Only present when related to property validation error
dev_message
string
Example: Property validation error. Check the "properties" section in the response.
http_code
integer
400
message
string
Example: Property validation error.
more_info
string
status
string
error
error
object
http_code
integer
401
message
string
Example: Authentication token invalid.
more_info
string
status
string
error
error
object
http_code
integer
429
message
string
Example: Too Many Requests.
more_info
string
status
string
error
error
object
http_code
integer
500
message
string
Example: An error has occurred during the request.
more_info
string
curl -X PATCH \
'https://api.sandbox.infraspeak.com/v3/stocks/stock-status/{stockStatus}' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d '{
"minimum_quantity": 10,
"mean_price": 10.5,
"observations": "Stock status updated to in stock"
}'
const response = await fetch('https://api.sandbox.infraspeak.com/v3/stocks/stock-status/{stockStatus}', {
method: 'PATCH',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
body: JSON.stringify({
"minimum_quantity": 10,
"mean_price": 10.5,
"observations": "Stock status updated to in stock"
}),
});
const data = await response.json();
$response = Http::withHeaders([
'Accept' => 'application/json',
'Content-Type' => 'application/json',
])->withToken('YOUR_API_TOKEN')
->patch('https://api.sandbox.infraspeak.com/v3/stocks/stock-status/{stockStatus}',
array (
'minimum_quantity' => 10,
'mean_price' => 10.5,
'observations' => 'Stock status updated to in stock',
)
);
import requests
response = requests.patch(
'https://api.sandbox.infraspeak.com/v3/stocks/stock-status/{stockStatus}',
headers={
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
json={
{
"minimum_quantity": 10,
"mean_price": 10.5,
"observations": "Stock status updated to in stock"
}
},
)
data = response.json()