pixiGetItemSuppliers
Returns the supplier assignments of items (supplier item number, EAN, purchase price, minimum order quantity, delivery times), filtered by item or supplier.
Reads the item/supplier assignments from AddItems joined with the master data in Suppliers. Only assignments whose supplier exists in Suppliers are returned.
Parameter normalisation
ItemKey=0and empty strings forEAN,ItemNrSuppl,ItemNrIntandSupplNrcount as not set.
Validation
- At least one of
ItemKey,EAN,ItemNrSuppl,ItemNrIntorSupplNrmust be set.OnlyActiveSuppliersalone is not enough. Otherwise an error row is returned. - If
SupplNris set, the supplier must exist. Otherwise an error row is returned.
Filter logic
- The item filters
ItemKey,EAN,ItemNrSupplandItemNrIntare combined with OR. A row matches if any of the given values matches. Each filter is compared with its column inAddItems:ItemRef,EANUPC,ItemNrSupplandItemNrInt. SupplNris combined with AND. It restricts the result to this one supplier.- If only
SupplNris given, all items assigned to that supplier are returned. - If
OnlyActiveSuppliers=1, only rows are returned where the supplier is not disabled and the item/supplier assignment is active (AddItems.Active=1).
No sort order is defined.
Notes
- All reads use
NOLOCK, so uncommitted data may be returned. EANis compared with the supplier-specific EANAddItems.EANUPC, not with any other EAN field of the item.- Errors are not raised as SQL errors. They come back as a normal row with the columns
ErrorandErrorMsg. Check for the columnErrorbefore you read the data columns. - If several item filters are given, the result is the union of all matches, not their intersection.
- Calling the procedure with only
SupplNrcan return a large result set for suppliers with many items. No paging is available.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
ItemKey
|
int | NULL |
Internal item key ( Example: |
EAN
|
varchar(13) string |
NULL |
EAN/UPC of the supplier assignment ( Example: |
ItemNrSuppl
|
varchar(50) string |
NULL |
Supplier's item number ( Example: |
ItemNrInt
|
varchar(50) string |
NULL |
Internal item number ( Example: |
OnlyActiveSuppliers
|
bit boolean |
0 |
If Allowed values
Example: |
SupplNr
|
varchar(4) string |
NULL |
Supplier number. Restricts the result to this supplier and must exist in Example: |
Result set 1 · If no filter parameter is set, or SupplNr does not exist
Error row; the procedure ends afterwards.
| Column | Type | Description |
|---|---|---|
Error
|
varchar(5) string |
Always |
ErrorMsg
|
varchar string |
Error text. |
Result set 2 · On successful validation (can be empty)
One row per matching item/supplier assignment.
| Column | Type | Description |
|---|---|---|
ItemKey
Nullable |
int |
Internal item key ( |
EANUPC
Nullable |
string |
EAN/UPC of the supplier assignment. |
ItemNrSuppl
Nullable |
string |
Supplier's item number. |
ItemNrInt
Nullable |
string |
Internal item number. |
SupplNr
|
string |
Supplier number. |
SupplPrice
Nullable |
decimal |
Purchase price at this supplier. |
SupplierDisabled
Nullable |
boolean |
Whether the supplier is disabled ( |
MinOrderQty
Nullable |
decimal |
Minimum order quantity at this supplier. |
OnlyPU
Nullable |
boolean |
Order only in package units ( |
ItemDeliveryTime
Nullable |
int |
Item-specific delivery time of the supplier ( |
DeliveryTime
Nullable |
int |
Default delivery days of the supplier ( |
Response example
<SqlRowSet1>
<row>
<ItemKey>12345</ItemKey>
<EANUPC>4006381333931</EANUPC>
<ItemNrSuppl>LF-98765</ItemNrSuppl>
<ItemNrInt>ART-1001</ItemNrInt>
<SupplNr>L001</SupplNr>
<SupplPrice>4.9500</SupplPrice>
<SupplierDisabled>false</SupplierDisabled>
<MinOrderQty>10</MinOrderQty>
<OnlyPU>false</OnlyPU>
<ItemDeliveryTime>5</ItemDeliveryTime>
<DeliveryTime>3</DeliveryTime>
</row>
</SqlRowSet1>
| Status | Message | Cause |
|---|---|---|
| Error | Please specify at least one parameter | None of `ItemKey`, `EAN`, `ItemNrSuppl`, `ItemNrInt`, `SupplNr` is set; `0` and empty strings count as not set. Provide at least one of these parameters. |
| Error | Supplier not found | The given `SupplNr` does not exist in `Suppliers`. Use a valid supplier number. |
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:pixiGetItemSuppliers>
<!-- <ItemKey>12345</ItemKey> -->
<!-- <EAN>4006381333931</EAN> -->
<!-- <ItemNrSuppl>LF-98765</ItemNrSuppl> -->
<!-- <ItemNrInt>ART-1001</ItemNrInt> -->
<!-- <OnlyActiveSuppliers>1</OnlyActiveSuppliers> -->
<!-- <SupplNr>L001</SupplNr> -->
</ns1:pixiGetItemSuppliers>
</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:pixiGetItemSuppliers>
<!-- <ItemKey>12345</ItemKey> -->
<!-- <EAN>4006381333931</EAN> -->
<!-- <ItemNrSuppl>LF-98765</ItemNrSuppl> -->
<!-- <ItemNrInt>ART-1001</ItemNrInt> -->
<!-- <OnlyActiveSuppliers>1</OnlyActiveSuppliers> -->
<!-- <SupplNr>L001</SupplNr> -->
</ns1:pixiGetItemSuppliers>
</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' => '12345',
// 'EAN' => '4006381333931',
// 'ItemNrSuppl' => 'LF-98765',
// 'ItemNrInt' => 'ART-1001',
// 'OnlyActiveSuppliers' => '1',
// 'SupplNr' => 'L001',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiGetItemSuppliers', $soapArguments);
- SQL object:
- dbo.pipiGetItemSuppliers