Get product stock status
curl --request GET \
--url https://api.noyax.com/api/v1/stock/products/{productId}/status \
--header 'Authorization: Bearer <token>' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/stock/products/{productId}/status");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-UserID", "<x-userid>");
request.AddHeader("X-CompanyID", "<x-companyid>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'GET',
headers: {
'X-UserID': '<x-userid>',
'X-CompanyID': '<x-companyid>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.noyax.com/api/v1/stock/products/{productId}/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/stock/products/{productId}/status"
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text){
"Success": true,
"ResultCode": "0000",
"Data": {
"UnitCode": "C62",
"Quantity": 123,
"Lots": [
{
"LotNo": "LOT-2026-001",
"Quantity": 123
}
],
"SerialNumbers": [
"<string>"
]
},
"Message": "<string>"
}{
"Success": false,
"ResultCode": "0201",
"Message": "X-UserID header is required.",
"Errors": [
{
"Code": "0201",
"Message": "X-UserID header is required."
}
]
}{
"Success": false,
"ResultCode": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token.",
"Errors": [
{
"Code": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token."
}
]
}{
"Success": false,
"ResultCode": "0110",
"Message": "You do not have permission for this operation.",
"Errors": [
{
"Code": "0110",
"Message": "You do not have permission for this operation."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Product Stock Status
Product stock status
The product’s total quantity on hand, with a lot/serial number breakdown.
GET
/
api
/
v1
/
stock
/
products
/
{productId}
/
status
Get product stock status
curl --request GET \
--url https://api.noyax.com/api/v1/stock/products/{productId}/status \
--header 'Authorization: Bearer <token>' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/stock/products/{productId}/status");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-UserID", "<x-userid>");
request.AddHeader("X-CompanyID", "<x-companyid>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'GET',
headers: {
'X-UserID': '<x-userid>',
'X-CompanyID': '<x-companyid>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.noyax.com/api/v1/stock/products/{productId}/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/stock/products/{productId}/status"
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text){
"Success": true,
"ResultCode": "0000",
"Data": {
"UnitCode": "C62",
"Quantity": 123,
"Lots": [
{
"LotNo": "LOT-2026-001",
"Quantity": 123
}
],
"SerialNumbers": [
"<string>"
]
},
"Message": "<string>"
}{
"Success": false,
"ResultCode": "0201",
"Message": "X-UserID header is required.",
"Errors": [
{
"Code": "0201",
"Message": "X-UserID header is required."
}
]
}{
"Success": false,
"ResultCode": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token.",
"Errors": [
{
"Code": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token."
}
]
}{
"Success": false,
"ResultCode": "0110",
"Message": "You do not have permission for this operation.",
"Errors": [
{
"Code": "0110",
"Message": "You do not have permission for this operation."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Read-only report: nothing on this page can be created, updated or deleted through the API.
- Don’t have the product’s ID? Get product stock status by product code or e-commerce code returns the same report for a
productCodeoreCommerceProductCode. Quantityis the sum of every stock movement of the product: despatches, invoices, warehouse slips, transfers and stock counts, whether they were entered through the API or in the Noyax application. This is what makes it reflect the product’s real quantity on hand.warehouseName(optional, query) restricts the count to movements in that warehouse; when omitted, every warehouse is summed.- Depending on the product’s
StockType, an additional breakdown is included:StockType3 (Lot), 4 (FIFO), 6 (LIFO) or 7 (FEFO):Lots, one entry per lot whose remaining quantity is greater than zero (LotNo,Quantity). Lots at zero or below are left out.StockType5 (Serial):SerialNumbers, the serial numbers that have been entered but not yet exited.- Any other
StockType(1, 2):LotsandSerialNumbersarenull; onlyQuantityis meaningful.
UnitCodeis the product’s main unit’s universal code if set, otherwise its name (Quantityand each lot’sQuantityare in this unit).
Error codes
Codes this endpoint can return. The general errors that apply to every endpoint (authentication, permissions, request headers, request limits) are not repeated here.| Code | HTTP | Meaning |
|---|---|---|
2000 | 404 | Product not found |
4200 | 400 | The warehouse given in warehouseName was not found |
Authorizations
Headers
Query Parameters
Response
OK