pixiGetOrderNrExternalByBoxNr
Returns the Pixi order numbers and external order numbers of all orders that have order lines packed in a given box.
Looks up a box by its number and returns the orders whose order lines are contained in that box.
- The box is identified by
BoxNrfrom theboxestable. - The box items (
boxitems) are linked to their order lines (Orderlines) and the order lines to the order header (OrderHeader). - If
LocIdis given, only boxes of that location (LocationID) are considered. An empty string is treated likeNULL, so all locations are searched. - The result is
DISTINCT: each order appears only once, even if several of its lines are in the box. A box can contain lines of several orders, so more than one row can be returned. - No explicit sort order is applied.
Notes
- All tables are read with
NOLOCK, so uncommitted data may be returned. - If no box with the given number exists (or it belongs to a different location), or the box contains no order lines, an empty result set is returned; there is no error row.
OrderNrExternalis returned as an empty string if the order has no external order number. TheISNULLonOrderNrhas no practical effect because of the inner joins.- Without
LocId, boxes with the same number at different locations are all included.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
BoxNr
Required
|
int | – |
Number of the box ( Example: |
LocId
|
varchar(3) string |
NULL |
Optional location ID to restrict the box search to one location ( Example: |
Result set 1 · Always; empty if no matching box with order lines is found.
One row per distinct order contained in the box.
| Column | Type | Description |
|---|---|---|
OrderNr
|
int |
Pixi order number ( |
OrderNrExternal
|
string |
External order number of the order ( |
Response example
<SqlRowSet1>
<row>
<OrderNr>458712</OrderNr>
<OrderNrExternal>SHOP-2024-00981</OrderNrExternal>
</row>
<row>
<OrderNr>458730</OrderNr>
<OrderNrExternal>SHOP-2024-01002</OrderNrExternal>
</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:pixiGetOrderNrExternalByBoxNr>
<BoxNr>100245</BoxNr>
<!-- <LocId>001</LocId> -->
</ns1:pixiGetOrderNrExternalByBoxNr>
</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:pixiGetOrderNrExternalByBoxNr>
<BoxNr>100245</BoxNr>
<!-- <LocId>001</LocId> -->
</ns1:pixiGetOrderNrExternalByBoxNr>
</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 = [
'BoxNr' => '100245',
// 'LocId' => '001',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiGetOrderNrExternalByBoxNr', $soapArguments);
- SQL object:
- dbo.pipiGetOrderNrExternalByBoxNr