pixiGetStockMovementForOrderline
Returns all stock movements (bin item log entries) booked for a given order line, together with the bin they refer to.
Reads the stock movement log InvBinItemLog and returns every entry whose ForOrderline equals OrderlineKey.
- Each log entry is joined to the bin table
InvBinon the bin reference (BinKey = BinRef). The join is an inner join, so log entries whose bin no longer exists inInvBinare not returned. - For each movement the call returns the quantity, the item reference, the employee and date of the booking, the reason and the bin data (
BinKey,LocID,BinName). - No sort order is defined; the rows come back in the order SQL Server delivers them.
- There is no paging; all matching rows are returned.
Notes
- If no movement exists for the order line (or the key does not exist), an empty result set is returned; no error is raised.
- The header comment of the procedure is a generic template text and does not describe this call.
- The query uses no
NOLOCKhints. The column types are not declared in the code and depend on the table definitions ofInvBinItemLogandInvBin. - The sign convention of
Qty(e.g. negative for outgoing stock) is not visible in the code.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
OrderlineKey
Required
|
int | – |
Key of the order line whose stock movements are returned. Compared with Example: |
Result set 1 · Always (may be empty)
One row per stock movement log entry booked for the order line.
| Column | Type | Description |
|---|---|---|
Qty
Nullable |
int |
Quantity of the stock movement. |
ItemRef
Nullable |
int |
Reference to the item that was moved. |
UpdateEmp
Nullable |
string |
Employee who booked the movement (from |
UpdateDate
Nullable |
dateTime |
Date and time of the movement entry (from |
ForOrderline
Nullable |
int |
Order line the movement was booked for; always equals |
Reason
Nullable |
string |
Reason of the stock movement as stored in the log. |
BinKey
|
int |
Key of the bin (Lagerplatz) the movement refers to. |
LocID
Nullable |
string |
Location (warehouse) ID of the bin. |
BinName
Nullable |
string |
Name of the bin. |
Response example
<SqlRowSet1>
<row>
<Qty>-2</Qty>
<ItemRef>4711</ItemRef>
<UpdateEmp>JD</UpdateEmp>
<UpdateDate>2024-03-12T10:15:32.000</UpdateDate>
<ForOrderline>123456</ForOrderline>
<Reason>PICK</Reason>
<BinKey>812</BinKey>
<LocID>001</LocID>
<BinName>A-01-03</BinName>
</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:pixiGetStockMovementForOrderline>
<OrderlineKey>123456</OrderlineKey>
</ns1:pixiGetStockMovementForOrderline>
</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:pixiGetStockMovementForOrderline>
<OrderlineKey>123456</OrderlineKey>
</ns1:pixiGetStockMovementForOrderline>
</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('pixiGetStockMovementForOrderline', $soapArguments);
- SQL object:
- dbo.pipiGetStockMovementForOrderline