pixiGetStockBins
Returns the stock bins (Lagerplätze), optionally filtered by location and bin group, with the total quantity stored on each bin and optional paging.
Reads the stock bins from InvBin and calculates for each bin the sum of BinItemQTY of all entries in InvBinItem on this bin (NrOfItemOnBin, 0 if the bin is empty).
Filters:
LocID: only bins of this location (BinLocID). Empty string or NULL means all locations.BinGroup: only bins of this bin group. Empty string or NULL means all groups.
Paging:
- If
RowCountis 0 or NULL, all matching bins are returned without aRowNrcolumn. - If
RowCountis greater than 0, the rows are numbered byBinSortNum(RowNr), and at mostRowCountrows withRowNrgreater thanStartare returned.Startis therefore the number of rows to skip.
The result is always sorted by BinSortNum, then BinKey.
Notes
- All reads use
NOLOCK, so the result can contain uncommitted data. - The row numbering for paging orders only by
BinSortNum, while the output is ordered byBinSortNum, BinKey. If several bins share the sameBinSortNum, the assignment ofRowNramong them is not deterministic, so pages can overlap or skip bins. Use unique sort numbers or fetch without paging when this matters. - The column set differs between the two modes:
RowNris only present whenRowCount> 0. - A negative
RowCountis not handled and makesTOPfail with a SQL error. NrOfItemOnBinis the total quantity on the bin, not the number of distinct items.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
LocID
|
varchar(3) string |
NULL |
Location ID (Lager) to filter by. NULL or empty string returns bins of all locations. Example: |
RowCount
|
int | 0 |
Maximum number of rows per page. 0 or NULL disables paging and returns all rows. Allowed values
Example: |
Start
|
int | 0 |
Number of rows to skip when paging is active; rows with Example: |
BinGroup
|
varchar(20) string |
NULL |
Bin group to filter by. NULL or empty string returns bins of all groups. Example: |
Result set 1 · If RowCount is 0 or NULL (no paging)
All matching bins, sorted by BinSortNum, BinKey.
| Column | Type | Description |
|---|---|---|
BinKey
|
int |
Internal key of the bin. |
BinName
Nullable |
string |
Name of the bin. |
BinLocID
Nullable |
string |
Location ID the bin belongs to. |
BinSortNum
Nullable |
int |
Sort number of the bin. |
BinGroup
Nullable |
string |
Bin group. |
NrOfItemOnBin
|
int |
Sum of |
Result set 2 · If RowCount > 0 (paging)
One page of matching bins: at most RowCount rows with RowNr > Start, sorted by BinSortNum, BinKey.
| Column | Type | Description |
|---|---|---|
RowNr
|
bigint long |
Row number within the filtered result, ordered by |
BinKey
|
int |
Internal key of the bin. |
BinName
Nullable |
string |
Name of the bin. |
BinLocID
Nullable |
string |
Location ID the bin belongs to. |
BinSortNum
Nullable |
int |
Sort number of the bin. |
BinGroup
Nullable |
string |
Bin group. |
NrOfItemOnBin
|
int |
Sum of |
Response example
<SqlRowSet1>
<row>
<BinKey>1201</BinKey>
<BinName>A-01-01</BinName>
<BinLocID>001</BinLocID>
<BinSortNum>10</BinSortNum>
<BinGroup>HAUPTLAGER</BinGroup>
<NrOfItemOnBin>42</NrOfItemOnBin>
</row>
<row>
<BinKey>1202</BinKey>
<BinName>A-01-02</BinName>
<BinLocID>001</BinLocID>
<BinSortNum>20</BinSortNum>
<BinGroup>HAUPTLAGER</BinGroup>
<NrOfItemOnBin>0</NrOfItemOnBin>
</row>
</SqlRowSet1>
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
Authorization: Basic BASE64(USERNAME:PASSWORD)
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiGetStockBins>
<!-- <LocID>001</LocID> -->
<!-- <RowCount>100</RowCount> -->
<!-- <Start>0</Start> -->
<!-- <BinGroup>HAUPTLAGER</BinGroup> -->
</ns1:pixiGetStockBins>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
curl -X POST 'https://apigateway.descartes.com/tms/pixi/' \
--user 'USERNAME:PASSWORD' \
--header 'Content-Type: text/xml; charset=utf-8' \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiGetStockBins>
<!-- <LocID>001</LocID> -->
<!-- <RowCount>100</RowCount> -->
<!-- <Start>0</Start> -->
<!-- <BinGroup>HAUPTLAGER</BinGroup> -->
</ns1:pixiGetStockBins>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
<?php
$soapClient = new SoapClient(null, [
'login' => 'USERNAME',
'password' => 'PASSWORD',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
]);
$arguments = [
// 'LocID' => '001',
// 'RowCount' => '100',
// 'Start' => '0',
// 'BinGroup' => 'HAUPTLAGER',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiGetStockBins', $soapArguments);
- SQL object:
- dbo.pipiGetStockBins