pixiGetItemStatus
Returns the active/inactive status (`Enabled`) of one item, identified by item key or internal item number.
Looks up a single item and returns its enabled status.
- The item is resolved from table
Items. A row matches if itsItemKeyequalsItemKey(only whenItemKeyis passed) or itsItemNrIntequalsItemNrInt. The first matching row (TOP 1, no sort order) provides the item key. - The procedure then returns
ItemKey,ItemNrIntandEnabledof that item.
If neither parameter matches an item, or both parameters are left out, the result set is empty.
Notes
- Both parameters are combined with OR. If both are passed and refer to different items, it is not defined which item is returned (
TOP 1withoutORDER BY). Pass only one of them. - If
ItemKeyis passed but does not exist andItemNrIntdoes not match either, the result set is simply empty; no error is returned. - If
ItemKeydoes not exist butItemNrIntmatches, the item found byItemNrIntis returned. - Reads with
NOLOCK, so uncommitted changes may be visible. - The data type and meaning of the values of
Enabledare not visible in the code.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
ItemNrInt
|
varchar(50) string |
NULL |
Internal item number of the item. Used if Example: |
ItemKey
|
int | NULL |
Internal key of the item in table Example: |
Result set 1 · Always; contains one row if an item was found, otherwise no rows.
Status of the resolved item.
| Column | Type | Description |
|---|---|---|
ItemKey
|
int |
Internal key of the item. |
ItemNrInt
Nullable |
varchar(50) string |
Internal item number. |
Enabled
Nullable |
string |
Active/inactive flag of the item as stored in |
Response example
<SqlRowSet1>
<row>
<ItemKey>4711</ItemKey>
<ItemNrInt>ART-100234</ItemNrInt>
<Enabled>1</Enabled>
</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:pixiGetItemStatus>
<!-- <ItemNrInt>ART-100234</ItemNrInt> -->
<!-- <ItemKey>4711</ItemKey> -->
</ns1:pixiGetItemStatus>
</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:pixiGetItemStatus>
<!-- <ItemNrInt>ART-100234</ItemNrInt> -->
<!-- <ItemKey>4711</ItemKey> -->
</ns1:pixiGetItemStatus>
</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 = [
// 'ItemNrInt' => 'ART-100234',
// 'ItemKey' => '4711',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiGetItemStatus', $soapArguments);
- SQL object:
- dbo.pipiGetItemStatus