pixiReadBundleItems
Returns bundle item records (bundle components) from BundleItems, filtered by key, creation date and/or update date, with optional key-based paging.
Reads rows from the table BundleItems. Each row links an item (ItemRef) with a bundled item (BundleItemRef) and a quantity (Qty).
If RowCount is set to a value other than 0, the number of returned rows is limited to that value. If BundleItemKey is not passed, it is treated as 0.
The call checks the filter parameters in a fixed order. Only the first matching filter group is used:
- Combined date filter:
CreateAndUpdateDateFromorCreateAndUpdateDateTois set. A row matches the lower bound ifCreateDateorUpdateDateis on or afterCreateAndUpdateDateFrom. It matches the upper bound ifCreateDateorUpdateDateis beforeCreateAndUpdateDateTo. Only rows withBundleItemKey>BundleItemKeyare returned. - Creation date filter:
CreateDateFromorCreateDateTois set. The filter isCreateDate>= from andCreateDate< to, together withBundleItemKey>BundleItemKey. - Update date filter:
UpdateDateFromorUpdateDateTois set. The filter isUpdateDate>= from andUpdateDate< to, together withBundleItemKey>BundleItemKey. - Key range / paging: no date filter is set, but
RowCountis passed. Returns all rows withBundleItemKey>BundleItemKey. - Single record: neither a date filter nor
RowCountis passed. Returns the row with exactlyBundleItemKey=BundleItemKey.
The lower bounds include the given value, the upper bounds exclude it. Branches 1 to 4 are sorted by BundleItemKey ascending.
For paging, pass RowCount and set BundleItemKey to the last BundleItemKey of the previous page.
Notes
- All reads use
WITH (NOLOCK). Results may contain uncommitted data. - The row limit uses
SET ROWCOUNT. - Passing
RowCount=0still selects branch 4 (key range), because the value is not NULL. No row limit applies in that case, so all rows above the key are returned. - Calling without any parameters returns the row with
BundleItemKey= 0. This normally yields an empty result. - The final "no data" branch in the code can never be reached, because
BundleItemKeyis never NULL at that point. - The exact meaning of
ItemRefandBundleItemRefis not defined in the code. PresumablyItemRefis the bundle (parent) item andBundleItemRefthe component item. - The column data types of
ItemRef,BundleItemRefandQtyare not visible in the code.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
BundleItemKey
|
int | NULL |
With date filters or Example: |
CreateDateFrom
|
datetime dateTime |
NULL |
Lower bound (inclusive) for Example: |
CreateDateTo
|
datetime dateTime |
NULL |
Upper bound (exclusive) for Example: |
UpdateDateFrom
|
datetime dateTime |
NULL |
Lower bound (inclusive) for Example: |
UpdateDateTo
|
datetime dateTime |
NULL |
Upper bound (exclusive) for Example: |
CreateAndUpdateDateFrom
|
datetime dateTime |
NULL |
Lower bound (inclusive) that Example: |
CreateAndUpdateDateTo
|
datetime dateTime |
NULL |
Upper bound (exclusive): Example: |
RowCount
|
int | NULL |
Maximum number of rows to return (0 or NULL = no limit). If set and no date filter is given, the call returns rows with a key greater than Example: |
Result set 1 · Always (exactly one of the filter branches is executed); may be empty.
Bundle item records from BundleItems. Sorted by BundleItemKey ascending, except in single-record mode.
| Column | Type | Description |
|---|---|---|
BundleItemKey
|
int |
Primary key of the bundle item record. |
ItemRef
Nullable |
int |
Reference to the item the record belongs to (presumably the bundle item). |
BundleItemRef
Nullable |
int |
Reference to the item contained in the bundle (component). |
Qty
Nullable |
decimal |
Quantity of the component in the bundle. |
CreateDate
Nullable |
datetime dateTime |
Creation date of the record. |
UpdateDate
Nullable |
datetime dateTime |
Date of the last change to the record. |
Response example
<SqlRowSet1>
<row>
<BundleItemKey>101</BundleItemKey>
<ItemRef>5012</ItemRef>
<BundleItemRef>4870</BundleItemRef>
<Qty>2</Qty>
<CreateDate>2024-01-15T10:22:31</CreateDate>
<UpdateDate>2024-01-20T08:05:12</UpdateDate>
</row>
<row>
<BundleItemKey>102</BundleItemKey>
<ItemRef>5012</ItemRef>
<BundleItemRef>4871</BundleItemRef>
<Qty>1</Qty>
<CreateDate>2024-01-15T10:22:31</CreateDate>
<UpdateDate>2024-01-15T10:22:31</UpdateDate>
</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:pixiReadBundleItems>
<!-- <BundleItemKey>0</BundleItemKey> -->
<!-- <CreateDateFrom>2024-01-01T00:00:00</CreateDateFrom> -->
<!-- <CreateDateTo>2024-02-01T00:00:00</CreateDateTo> -->
<!-- <UpdateDateFrom>2024-01-01T00:00:00</UpdateDateFrom> -->
<!-- <UpdateDateTo>2024-02-01T00:00:00</UpdateDateTo> -->
<!-- <CreateAndUpdateDateFrom>2024-01-01T00:00:00</CreateAndUpdateDateFrom> -->
<!-- <CreateAndUpdateDateTo>2024-02-01T00:00:00</CreateAndUpdateDateTo> -->
<!-- <RowCount>500</RowCount> -->
</ns1:pixiReadBundleItems>
</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:pixiReadBundleItems>
<!-- <BundleItemKey>0</BundleItemKey> -->
<!-- <CreateDateFrom>2024-01-01T00:00:00</CreateDateFrom> -->
<!-- <CreateDateTo>2024-02-01T00:00:00</CreateDateTo> -->
<!-- <UpdateDateFrom>2024-01-01T00:00:00</UpdateDateFrom> -->
<!-- <UpdateDateTo>2024-02-01T00:00:00</UpdateDateTo> -->
<!-- <CreateAndUpdateDateFrom>2024-01-01T00:00:00</CreateAndUpdateDateFrom> -->
<!-- <CreateAndUpdateDateTo>2024-02-01T00:00:00</CreateAndUpdateDateTo> -->
<!-- <RowCount>500</RowCount> -->
</ns1:pixiReadBundleItems>
</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 = [
// 'BundleItemKey' => '0',
// 'CreateDateFrom' => '2024-01-01T00:00:00',
// 'CreateDateTo' => '2024-02-01T00:00:00',
// 'UpdateDateFrom' => '2024-01-01T00:00:00',
// 'UpdateDateTo' => '2024-02-01T00:00:00',
// 'CreateAndUpdateDateFrom' => '2024-01-01T00:00:00',
// 'CreateAndUpdateDateTo' => '2024-02-01T00:00:00',
// 'RowCount' => '500',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiReadBundleItems', $soapArguments);
- SQL object:
- dbo.pipiReadBundleItems