pixiCanUpdateOrderline
Returns the status of an order line and whether it can still be changed or cancelled.
Looks up the order line given by OrderlineKey in Orderlines and joins its status code to OrderStates to get the status text.
The column CanCancel is 1 only if all of these conditions are met:
- the status is not a final state (
FinalStateof the status isNor not set), - the status is not
EIN, - the order line is not referenced in any box item (
boxitems.OrderLineRef), i.e. it has not been packed, - the order line is not referenced in any invoice line (
Invlines.OrderLineRef), i.e. it has not been invoiced.
Otherwise CanCancel is 0.
If the order line does not exist, or its status has no entry in OrderStates (inner join), no row is returned.
Notes
All tables are read with NOLOCK, so the result can reflect uncommitted data. The call only checks; it does not change the order line. An empty result means the order line key is unknown (or its status is missing in OrderStates), not that it cannot be cancelled.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
OrderlineKey
Required
|
int | – |
Key of the order line to check ( Example: |
Result set 1 · If the order line exists and its status is defined in OrderStates
One row with the order line status and the cancel/update flag.
| Column | Type | Description |
|---|---|---|
OrderlineKey
|
int |
Key of the order line. |
Status
Nullable |
string |
Current status code of the order line (e.g. |
StateText
Nullable |
string |
Description of the status from |
CanCancel
|
int |
|
Response example
<SqlRowSet1>
<row>
<OrderlineKey>123456</OrderlineKey>
<Status>AUF</Status>
<StateText>Offen</StateText>
<CanCancel>1</CanCancel>
</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:pixiCanUpdateOrderline>
<OrderlineKey>123456</OrderlineKey>
</ns1:pixiCanUpdateOrderline>
</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:pixiCanUpdateOrderline>
<OrderlineKey>123456</OrderlineKey>
</ns1:pixiCanUpdateOrderline>
</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 = [
'OrderlineKey' => '123456',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiCanUpdateOrderline', $soapArguments);
- SQL object:
- dbo.pipiCanUpdateOrderline