pixiGetOrdersReadyForPickup
Returns the orders with reserved order lines that customers can pick up at a given POS location, together with the customer reference.
Lists orders that are ready for pickup by the customer at a point-of-sale location.
An order is returned if it has at least one order line that meets all of these conditions:
- the order line's
LocationIDequalsLocationId; - the line's location exists in
Locationand has a reservation location (ResLocID) that also exists inLocation; - the line's
CustRefrefers to an existing customer inCustomers; - a reservation exists for the line in
Reservation(ResOrderlineRef= order line key); - the line status is
ANGorHAL; - the order date is not older than the reservation expiry in days:
ResExpDaysof the reservation location, or, if that is NULL, the value of the settingReservationExpiry.
In addition, the whole order is excluded if any of its order lines refers to an item that has no ItemLocationSpecific record for the reservation location. Only the existence of that record is checked, not stock quantities.
The result is distinct per order number and customer and is sorted by order number in ascending order.
Notes
- If
LocationIdis omitted (NULL), the comparison withLocationIDnever matches and the result is always empty. Always pass a location. - Pitfall with the expiry fallback: the code falls back to 14 days only if the setting
ReservationExpiryreturns an empty string.fPIXI_GetSettingreturns'0'when the setting does not exist, so without the setting and withoutResExpDayson the reservation location only orders dated today are returned. - The expiry is measured in calendar days between the order date and the current server date (
DATEDIFFin days). - All tables are read with
NOLOCK, so uncommitted data may appear. - Read only; no data is changed.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
LocationId
|
varchar(50) string |
NULL |
ID of the POS location ( Example: |
Result set 1 · Always (may be empty)
One row per order ready for pickup, sorted by order number ascending.
| Column | Type | Description |
|---|---|---|
ordernr
|
int |
Order number ( |
CustRef
|
int |
Customer key of the order line ( |
Response example
<SqlRowSet1>
<row>
<ordernr>100245</ordernr>
<CustRef>5821</CustRef>
</row>
<row>
<ordernr>100251</ordernr>
<CustRef>6034</CustRef>
</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:pixiGetOrdersReadyForPickup>
<!-- <LocationId>POS</LocationId> -->
</ns1:pixiGetOrdersReadyForPickup>
</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:pixiGetOrdersReadyForPickup>
<!-- <LocationId>POS</LocationId> -->
</ns1:pixiGetOrdersReadyForPickup>
</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 = [
// 'LocationId' => 'POS',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiGetOrdersReadyForPickup', $soapArguments);
- SQL object:
- dbo.pipiGetOrdersReadyForPickup