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.
  • Quantity is the sum of every warehouse movement for the product (despatches, plus transfers, stock counts and any other warehouse-slip type outside this API’s scope) — not just despatches created via POST /api/v1/despatches, but every movement recorded 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, daily limit) 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 for customer endpoints; 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.