pixiGetItemBundleDefinition
Returns the component items and quantities of a bundle item, identified by item key, internal item number, EAN/UPC or supplier item number.
Looks up the bundle definition stored in BundleItems for a bundle item and returns one row per component item. Master data for each component comes from Items.
Only one identifier is used. They are checked in this order of priority:
ItemKey, if it is greater than 0.ItemNrInt, if it is not empty. The first item with this internal item number is used (TOP 1without a sort order).EANUPC, if it is not empty. The first item with this EAN/UPC is used (TOP 1without a sort order).ItemNrSuppl, if it is not empty. All items with this supplier item number are used. The components of all matching bundles are returned together in one result.
The other parameters are ignored as soon as one with higher priority is set.
The call returns no rows in these cases:
- no identifier is given
- the identifier does not match any item
- the item is not a bundle
In all cases the result set has the same columns. No sort order is applied.
Notes
- All reads use
NOLOCK, so uncommitted data may be returned. - If several items share the same
ItemNrIntorEANUPC, the item that is used is not deterministic. - With
ItemNrSupplthe components of different bundles cannot be told apart, because the result has no column for the parent bundle item. - The component item data is joined with
LEFT JOIN. If a component item no longer exists inItems, its item columns are empty (NULL), whileBundleItemKeyandQtyare still filled.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
ItemKey
|
int | 0 |
Internal key of the bundle item. Has the highest priority if greater than 0. Example: |
ItemNrInt
|
varchar(50) string |
– |
Internal item number of the bundle item. Used only if Example: |
EANUPC
|
varchar(13) string |
– |
EAN/UPC of the bundle item. Used only if Example: |
ItemNrSuppl
|
varchar(50) string |
– |
Supplier item number of the bundle item. Used only if no other identifier is set. All items with this number are taken into account. Example: |
Result set 1 · Always; empty if no identifier is given, no item matches or the item is not a bundle.
One row per component item of the bundle.
| Column | Type | Description |
|---|---|---|
BundleItemKey
|
int |
Item key of the component item ( |
Qty
Nullable |
decimal |
Quantity of the component item contained in one bundle. |
ItemNrInt
Nullable |
varchar(50) string |
Internal item number of the component item. |
ItemNrSuppl
Nullable |
varchar(50) string |
Supplier item number of the component item. |
EANUPC
Nullable |
varchar(13) string |
EAN/UPC of the component item. |
ItemName
Nullable |
string |
Name of the component item. |
Price
Nullable |
decimal |
Price of the component item from the item master data. |
Response example
<SqlRowSet1>
<row>
<BundleItemKey>1201</BundleItemKey>
<Qty>2</Qty>
<ItemNrInt>ART-1201</ItemNrInt>
<ItemNrSuppl>SUP-1201</ItemNrSuppl>
<EANUPC>4006381333948</EANUPC>
<ItemName>Kugelschreiber blau</ItemName>
<Price>1.99</Price>
</row>
<row>
<BundleItemKey>1305</BundleItemKey>
<Qty>1</Qty>
<ItemNrInt>ART-1305</ItemNrInt>
<ItemNrSuppl>SUP-1305</ItemNrSuppl>
<EANUPC>4006381333955</EANUPC>
<ItemName>Notizblock A5</ItemName>
<Price>3.49</Price>
</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:pixiGetItemBundleDefinition>
<!-- <ItemKey>4711</ItemKey> -->
<!-- <ItemNrInt>BUNDLE-1001</ItemNrInt> -->
<!-- <EANUPC>4006381333931</EANUPC> -->
<!-- <ItemNrSuppl>SUP-88231</ItemNrSuppl> -->
</ns1:pixiGetItemBundleDefinition>
</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:pixiGetItemBundleDefinition>
<!-- <ItemKey>4711</ItemKey> -->
<!-- <ItemNrInt>BUNDLE-1001</ItemNrInt> -->
<!-- <EANUPC>4006381333931</EANUPC> -->
<!-- <ItemNrSuppl>SUP-88231</ItemNrSuppl> -->
</ns1:pixiGetItemBundleDefinition>
</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 = [
// 'ItemKey' => '4711',
// 'ItemNrInt' => 'BUNDLE-1001',
// 'EANUPC' => '4006381333931',
// 'ItemNrSuppl' => 'SUP-88231',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiGetItemBundleDefinition', $soapArguments);
- SQL object:
- dbo.pipiGetItemBundleDefinition