๐Stock takings
This page provides a description of the available API routes for managing stock takings.
Last updated
This page provides a description of the available API routes for managing stock takings.
Last updated
Stock taking (represented by StockTaking
class) is a method to adjust stock quantities for various stock items (Plu
of type StockItem
). These adjustments can be made multiple times until the stock taking is marked as closed by providing values for the ClosedBy
and ClosedAt
fields. Once a stock taking is closed, it becomes read-only and cannot be reopened. To close a stock taking, ActualQuantity
must be provided for each item element (represented by StockTakingItem
class).
After a stock taking is closed, the API server automatically generates a new stock transfer (represented by StockTransfer
class) with the type correction
. This stock transfer is used to execute the necessary stock quantity corrections for the items involved in the stock taking process.
GET
http://{server-address}/stocktakings
Returns all stocks that matches query parameters. Result is of type QueryResult<StockTaking>
.
Name | Type | Description |
---|---|---|
GET
http://{server-address}/stocktakings/{id}
Result is of type StockTaking.
POST
http://{server-address}/stocktakings
Creates new stock taking. Result is of type StockTaking.
Required rights
Authorized user must have StockTakingCreate
right assigned. If stock taking is marked as closed, StockTakingClose
right is required as well.
PUT
http://{server-address}/stocktakings/{id}
Updates existing or creates new stock taking. Result is of type StockTaking.
Required rights
Authorized user must have assigned StockTakingCreate
or StockTakingUpdate
right. If stock taking is marked as closed, StockTakingClose
right is required as well.
Only stock takings not marked as closed can be updated.
DELETE
http://{server-address}/stocktakings/{id}
Required rights
Authorized user must have StockTakingDelete
right assigned.
Only stock takings not marked as closed can be deleted.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
id
string
Supports NData syntax.
$skip
int
Pagination property. Describing number of records to skip from beginning of result collection.
$take
int
Pagination property. Maximum count of items to be returned.
$sort
string[]
Comma separated list of property names. Please see NData syntax.
$count
bool
If set to true
, response will not contain items
collection. Use to get resource count, not the resources themselves.
createdAt
DateTime
Supports NData syntax.
createdByUserName
string
Only stock takings containing item with matching StockTaking.CreatedBy.UserName property are returned. Supports NData syntax.
closedAt
DateTime
Supports NData syntax.
closedByUserName
string
Only stock takings containing item with matching StockTaking.ClosedBy.UserName property are returned. Supports NData syntax.
currencyLabel
string
Supports NData syntax.
itemPluStockName
string
Only stock takings containing item with matching StockTakingItem.Plu.StockName property are returned. Supports NData syntax.
itemPluCode
int
Only stock takings containing item with matching StockTakingItem.Plu.Code property are returned. Supports NData syntax.
Authorization*
string
Authorization header with authorization token.
id*
string
Unique identifier.
Authorization*
string
Authorization header with authorization token.
Authorization*
string
Authorization header with authorization token.
(body)*
StockTaking
Model to create
id*
string
Unique identifier.
Authorization*
string
Authorization header with authorization token.
(body)*
StockTaking
Model to create or update.
id*
string
Unique identifier.
Authorization*
string
Authorization header with authorization token.