pixiGetItemsOnStockBin
Returns the items stored on a stock bin or a bin group, with stock level, batch number and best-before date.
Lists the bin stock (InvBinItem) of one stock bin or of all bins of a bin group, joined with item master data.
- Empty strings in
BinName,LocIDandBinGroupare treated asNULL. - At least one of
BinNameorBinGroupmust be set. If both are empty, the call returns an empty result set. BinNamefilters on the exact bin name,BinGroupon the exact bin group, andLocIDrestricts the bins to one location. All filters that are set are combined with AND.- The internal item number in
InternalItemNumbercomes from the item codes with code type3. It is empty if the item has no such code.
The parameter GroupItems controls how rows are grouped:
0(default): one row per item, bin, batch number, best-before date and update date of the bin stock entry. Rows are sorted byUpdateDatein ascending order.1: one row per item, bin, batch number and best-before date. The quantities are summed up andUpdateDateholds the latest update date. Rows are sorted by this latest date in ascending order.
StockLevel is the sum of the bin quantities within each group.
Notes
- All tables are read with
NOLOCK, so the result can contain uncommitted data. - With
GroupItems = 0the same item can appear several times on the same bin if its bin stock entries have different update dates. UseGroupItems = 1for one row per item, bin, batch and best-before date. - If an item has more than one item code of type
3, it appears once per code. - When only
BinNameis given withoutLocID, bins with the same name in different locations are all returned. The location is not part of the output, so passLocIDif bin names are not unique across locations. - Any non-zero value of
GroupItemsbehaves like1.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
BinName
|
varchar(50) string |
NULL |
Exact name of the stock bin. Empty string is treated as NULL. Either this or Example: |
LocID
|
varchar(3) string |
NULL |
Location ID; restricts the bins to this location. Empty or NULL means all locations. Example: |
GroupItems
|
bit boolean |
0 |
Controls whether bin stock entries with different update dates are combined into one row. Allowed values
Example: |
BinGroup
|
varchar(20) string |
NULL |
Exact bin group; returns the items of all bins in this group. Empty string is treated as NULL. Either this or Example: |
Result set 1 · Always; empty if neither BinName nor BinGroup is set or nothing matches.
Items with their stock on the selected bins, sorted ascending by update date.
| Column | Type | Description |
|---|---|---|
ItemKey
|
int |
Internal key of the item. |
EANUPC
Nullable |
string |
EAN/UPC of the item. |
ItemNRInt
Nullable |
string |
Internal item number from the item master. |
ItemNrSuppl
Nullable |
string |
Supplier item number. |
StockLevel
Nullable |
int |
Sum of the bin quantities in this group of rows. |
UpdateDate
Nullable |
datetime dateTime |
Update date of the bin stock entry; with |
ItemName
Nullable |
string |
Name of the item. |
InternalItemNumber
Nullable |
string |
Item code of code type 3; NULL if none exists. |
BinGroup
Nullable |
varchar(20) string |
Bin group of the stock bin. |
BinName
Nullable |
varchar(50) string |
Name of the stock bin. |
BatchNumber
Nullable |
string |
Batch number of the bin stock. |
BestBeforeDate
Nullable |
datetime dateTime |
Best-before date of the bin stock. |
Response example
<SqlRowSet1>
<row>
<ItemKey>10452</ItemKey>
<EANUPC>4006381333931</EANUPC>
<ItemNRInt>ART-10452</ItemNRInt>
<ItemNrSuppl>SUP-7781</ItemNrSuppl>
<StockLevel>24</StockLevel>
<UpdateDate>2024-03-12T09:41:00</UpdateDate>
<ItemName>Kugelschreiber blau</ItemName>
<InternalItemNumber>INT-10452</InternalItemNumber>
<BinGroup>PICK</BinGroup>
<BinName>A-01-03</BinName>
<BatchNumber>CH2024-03</BatchNumber>
<BestBeforeDate>2026-03-31T00:00:00</BestBeforeDate>
</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:pixiGetItemsOnStockBin>
<!-- <BinName>A-01-03</BinName> -->
<!-- <LocID>001</LocID> -->
<!-- <GroupItems>1</GroupItems> -->
<!-- <BinGroup>PICK</BinGroup> -->
</ns1:pixiGetItemsOnStockBin>
</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:pixiGetItemsOnStockBin>
<!-- <BinName>A-01-03</BinName> -->
<!-- <LocID>001</LocID> -->
<!-- <GroupItems>1</GroupItems> -->
<!-- <BinGroup>PICK</BinGroup> -->
</ns1:pixiGetItemsOnStockBin>
</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 = [
// 'BinName' => 'A-01-03',
// 'LocID' => '001',
// 'GroupItems' => '1',
// 'BinGroup' => 'PICK',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiGetItemsOnStockBin', $soapArguments);
- SQL object:
- dbo.pipiGetItemsOnStockBin