pixiItemsBySupplier
Returns a paged list of the items supplied by a given supplier, with EAN, item name and total stock quantity across all bin locations.
Returns all items that are linked to the supplier SupplNr.
- The procedure looks up all
IntLinkNr1values inAddItemsthat have the givenSupplNr. It then selects every record inItemswith one of theseIntLinkNr1values. - For each item,
StockQtyis calculated as the sum ofBinItemQTYinInvBinItemfor the item (BinItemRef=ItemKey). This covers all bin locations and is0if the item has no stock records. - The rows are numbered consecutively (
RowNr, starting at 1) in a temporary table. - The call returns only the rows with
RowNrbetweenFromRowandFromRow + Rows - 1.
Every row also carries paging information:
RecordsTotal: number of all matching items.RecordsFrom: the value passed inFromRow.RecordsRequested: the value passed inRows.
To page through the list, increase FromRow by Rows until FromRow is greater than RecordsTotal.
Notes
- The row numbering has no
ORDER BY. The order of the items, and therefore the content of each page, is not guaranteed. It can differ between calls, so paging may return items twice or skip items. - If
RowsisNULL, all rows fromFromRowonwards are returned. IfFromRowisNULL, the complete list is returned, regardless ofRows. RecordsFromandRecordsRequestedecho the parameter values unchanged, includingNULL.- All tables are read
WITH (NOLOCK). The results can contain uncommitted data. StockQtyis the sum over all bin locations and warehouses. Reservations and stock locks are not taken into account.- If no item matches the supplier, an empty result set is returned. There is no error row.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
SupplNr
Required
|
char(4) string |
– |
Supplier number. Matched against Example: |
FromRow
|
int | 1 |
Number of the first row to return (1-based). Example: |
Rows
|
int | 50 |
Maximum number of rows to return. Example: |
Result set 1 · Always (may be empty)
The requested page of items of the supplier, with paging information.
| Column | Type | Description |
|---|---|---|
RowNr
|
int |
Consecutive row number within the full result. |
ItemKey
|
int |
Internal item key from |
EANUPC
Nullable |
string |
EAN/UPC of the item. |
ItemName
Nullable |
string |
Item name. |
StockQty
|
decimal |
Sum of |
RecordsTotal
|
int |
Total number of matching items. |
RecordsFrom
Nullable |
int |
Value of the |
RecordsRequested
Nullable |
int |
Value of the |
Response example
<SqlRowSet1>
<row>
<RowNr>1</RowNr>
<ItemKey>1024</ItemKey>
<EANUPC>4006381333931</EANUPC>
<ItemName>Ballpoint pen blue</ItemName>
<StockQty>120</StockQty>
<RecordsTotal>2</RecordsTotal>
<RecordsFrom>1</RecordsFrom>
<RecordsRequested>50</RecordsRequested>
</row>
<row>
<RowNr>2</RowNr>
<ItemKey>1025</ItemKey>
<EANUPC>4006381333948</EANUPC>
<ItemName>Ballpoint pen red</ItemName>
<StockQty>0</StockQty>
<RecordsTotal>2</RecordsTotal>
<RecordsFrom>1</RecordsFrom>
<RecordsRequested>50</RecordsRequested>
</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:pixiItemsBySupplier>
<SupplNr>L001</SupplNr>
<!-- <FromRow>1</FromRow> -->
<!-- <Rows>50</Rows> -->
</ns1:pixiItemsBySupplier>
</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:pixiItemsBySupplier>
<SupplNr>L001</SupplNr>
<!-- <FromRow>1</FromRow> -->
<!-- <Rows>50</Rows> -->
</ns1:pixiItemsBySupplier>
</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 = [
'SupplNr' => 'L001',
// 'FromRow' => '1',
// 'Rows' => '50',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiItemsBySupplier', $soapArguments);
- SQL object:
- dbo.pipiItemsBySupplier