pixiCanConvertBundle
Checks whether an item can be converted to or from a bundle and returns its key data together with a `CanConvert` flag.
Identifies an item and checks whether it is already in use, which would prevent converting it (changing its bundle status).
Identifying the item (empty strings are treated as NULL):
- If
ItemKeyis passed,ItemNrIntandEANare ignored. - Otherwise, if
ItemNrIntis passed, the item is looked up in the item codes (code type 2 = internal item number);EANis then ignored. - Otherwise, if
EANis passed, the item is looked up in the item codes (code type 1 = EAN).
If several items match a code, the first match found is used.
Check: CanConvert is 0 if the item is referenced in at least one of the following, otherwise 1:
- order lines (
Orderlines) - bundle order lines (
BundleOrderlines) - bin location stock records (
InvBinItem)
Result: one row with the item's key, internal item number, EAN, bundle flag and the CanConvert flag. If no item is found, the result set is empty.
Notes
- The call only checks; it does not convert anything.
- All reads use
NOLOCK, so the result may reflect uncommitted data. - If the item was found via
EAN, theEANcolumn returns the passed EAN (which may be an additional EAN code) instead of the item's mainEANUPC. - An unknown
ItemNrIntdoes not fall back toEAN; the result is then empty. - There is no error row: an empty result means the item was not found.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
ItemKey
|
int | NULL |
Internal key of the item. Takes precedence over Example: |
ItemNrInt
|
varchar(50) string |
NULL |
Internal item number, looked up in the item codes (code type 2). Used only if Example: |
EAN
|
varchar(13) string |
NULL |
EAN of the item, looked up in the item codes (code type 1). Used only if neither Example: |
Result set 1 · Always; empty if no item was found.
The item with its bundle status and the result of the conversion check.
| Column | Type | Description |
|---|---|---|
ItemKey
|
int |
Internal key of the item. |
ItemNrInt
Nullable |
varchar(50) string |
Internal item number. |
EAN
Nullable |
varchar(13) string |
The passed EAN if the item was found by EAN, otherwise the item's |
IsBundle
Nullable |
bit boolean |
Indicates whether the item is currently a bundle. |
CanConvert
|
bit boolean |
|
Response example
<SqlRowSet1>
<row>
<ItemKey>4711</ItemKey>
<ItemNrInt>ART-10023</ItemNrInt>
<EAN>4006381333931</EAN>
<IsBundle>false</IsBundle>
<CanConvert>true</CanConvert>
</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:pixiCanConvertBundle>
<!-- <ItemKey>4711</ItemKey> -->
<!-- <ItemNrInt>ART-10023</ItemNrInt> -->
<!-- <EAN>4006381333931</EAN> -->
</ns1:pixiCanConvertBundle>
</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:pixiCanConvertBundle>
<!-- <ItemKey>4711</ItemKey> -->
<!-- <ItemNrInt>ART-10023</ItemNrInt> -->
<!-- <EAN>4006381333931</EAN> -->
</ns1:pixiCanConvertBundle>
</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' => 'ART-10023',
// 'EAN' => '4006381333931',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiCanConvertBundle', $soapArguments);
- SQL object:
- dbo.pipiCanConvertBundle