Skip to main content
GET
Get product stock status
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 productCode or eCommerceProductCode.
  • Quantity is 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:
    • StockType 3 (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.
    • StockType 5 (Serial): SerialNumbers, the serial numbers that have been entered but not yet exited.
    • Any other StockType (1, 2): Lots and SerialNumbers are null; only Quantity is meaningful.
  • UnitCode is the product’s main unit’s universal code if set, otherwise its name (Quantity and each lot’s Quantity are 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.

Authorizations

Authorization
string
header
required

Access token obtained from the Noyax auth service with your API key.

Headers

X-UserID
integer<int32>
required

ID of the Noyax user the request is made on behalf of. Written to the audit fields of created, updated and deleted records.

Required range: x >= 1
X-CompanyID
integer<int32>
required

ID of the company. The user must be assigned to this company. All reads and writes are limited to this company.

Required range: x >= 1
X-PeriodID
integer<int32>

ID of the accounting period. Optional; if sent, it is written to created records.

Required range: x >= 1

Path Parameters

productId
string<uuid>
required

Product ID.

Query Parameters

warehouseName
string

Only count movements in this warehouse (name from GET /api/v1/stock/warehouses). When empty, all warehouses are included.

Response

OK

Success
boolean
required

Whether the operation succeeded.

Example:

true

ResultCode
string
required

"0000" on success. On failure, the code of the first error; all errors are listed in Errors.

Example:

"0000"

Data
object
required

Response data. Null when Success is false.

Message
null | string

Error message when Success is false. Messages of all errors are joined into a single text.