pixiReadDeliveryHeaders
Returns supplier delivery headers from `SDelHeader`, paged by key and optionally filtered by creation and/or update date.
Reads delivery header records (supplier deliveries / goods receipts) from the table SDelHeader.
Preparation
- If
SDelHKeyis not passed, it is set to0. - If
RowCountis NULL, it is set to1000.
Filter selection – exactly one filter mode is applied, in this priority:
CreateAndUpdateDateFrom/CreateAndUpdateDateTo: a record matches the lower bound if its creation date or its update date is>=the From value, and the upper bound if its creation date or its update date is<the To value.CreateDateFrom/CreateDateTo: filter onSDelHCreateDate(From inclusive, To exclusive).UpdateDateFrom/UpdateDateTo: filter onSDelHUpdateDate(From inclusive, To exclusive).- No date parameter: all records.
Parameters of a lower-priority mode are ignored as soon as a higher-priority mode is used (e.g. CreateDateFrom is ignored if CreateAndUpdateDateFrom is set).
Paging
In every mode only records with SDelHKey greater than SDelHKey are returned, at most RowCount rows, sorted by SDelHKey ascending. To read the next page, pass the highest SDelHKey of the previous page.
Notes
SDelHKeyis not an exact-match filter: passing a key returns the records after that key. The code contains a branch for an exact key lookup and an empty-result branch, but both are unreachable becauseSDelHKeyandRowCountare never NULL after the initial defaults. To read one specific header, passSDelHKey= key − 1 andRowCount= 1 and check the returned key.- The combined create/update filter uses OR on both bounds, so it is wider than a strict range: e.g. a record created before From but updated after To can still match both bounds.
- The table is read with
NOLOCK; uncommitted data may be returned. - A negative
RowCountcauses a SQL error inTOP;0returns no rows. - Column
SDelHfinalDicsountis spelled this way in the database.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
SDelHKey
|
int | NULL |
Paging cursor: only delivery headers with a key greater than this value are returned. NULL is treated as 0. Example: |
CreateDateFrom
|
datetime dateTime |
NULL |
Lower bound (inclusive) for Example: |
CreateDateTo
|
datetime dateTime |
NULL |
Upper bound (exclusive) for Example: |
UpdateDateFrom
|
datetime dateTime |
NULL |
Lower bound (inclusive) for Example: |
UpdateDateTo
|
datetime dateTime |
NULL |
Upper bound (exclusive) for Example: |
CreateAndUpdateDateFrom
|
datetime dateTime |
NULL |
Lower bound (inclusive): matches if creation date or update date is on or after this value. Has the highest priority among the date filters. Example: |
CreateAndUpdateDateTo
|
datetime dateTime |
NULL |
Upper bound (exclusive): matches if creation date or update date is before this value. Has the highest priority among the date filters. Example: |
RowCount
|
int | 1000 |
Maximum number of rows returned. NULL is treated as 1000. Example: |
Result set 1 · Always (possibly empty).
Delivery headers matching the active filter, at most RowCount rows, sorted by SDelHKey ascending.
| Column | Type | Description |
|---|---|---|
SDelHKey
|
int |
Internal key of the delivery header; use as paging cursor. |
SDelHDate
Nullable |
dateTime |
Delivery date. |
SDelHLocationID
Nullable |
string |
Location (warehouse) of the delivery. |
SDelHSupplNr
Nullable |
string |
Supplier number. |
SDelHNr
Nullable |
string |
Delivery number (e.g. delivery note number). |
SDelHNote
Nullable |
string |
Note on the delivery. |
SDelHStatus
Nullable |
string |
Status of the delivery. |
SDelHCreateDate
Nullable |
dateTime |
Creation date of the record. |
SDelHCreateEmp
Nullable |
string |
Employee who created the record. |
SDelHUpdateDate
Nullable |
dateTime |
Date of the last change. |
SDelHUpdateEmp
Nullable |
string |
Employee who made the last change. |
SDelHextInvoiceNr
Nullable |
string |
External (supplier) invoice number. |
SDelHextOrderNr
Nullable |
string |
External order number. |
SDelHfinalDicsount
Nullable |
decimal |
Final discount of the delivery (column name spelled this way in the database). |
PiccoUser
Nullable |
string |
Picco (mobile device) user associated with the delivery. |
LockedByPicco
Nullable |
boolean |
Indicates whether the delivery is locked by Picco. |
WasReopened
Nullable |
boolean |
Indicates whether the delivery was reopened. |
Response example
<SqlRowSet1>
<row>
<SDelHKey>1201</SDelHKey>
<SDelHDate>2024-01-15T00:00:00</SDelHDate>
<SDelHLocationID>001</SDelHLocationID>
<SDelHSupplNr>70012</SDelHSupplNr>
<SDelHNr>LS-458812</SDelHNr>
<SDelHNote>Teillieferung</SDelHNote>
<SDelHStatus>OK</SDelHStatus>
<SDelHCreateDate>2024-01-15T09:12:44</SDelHCreateDate>
<SDelHCreateEmp>MM</SDelHCreateEmp>
<SDelHUpdateDate>2024-01-15T10:03:10</SDelHUpdateDate>
<SDelHUpdateEmp>MM</SDelHUpdateEmp>
<SDelHextInvoiceNr>RE-2024-0099</SDelHextInvoiceNr>
<SDelHextOrderNr>B-10234</SDelHextOrderNr>
<SDelHfinalDicsount>0.00</SDelHfinalDicsount>
<PiccoUser/>
<LockedByPicco>0</LockedByPicco>
<WasReopened>0</WasReopened>
</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:pixiReadDeliveryHeaders>
<!-- <SDelHKey>0</SDelHKey> -->
<!-- <CreateDateFrom>2024-01-01T00:00:00</CreateDateFrom> -->
<!-- <CreateDateTo>2024-02-01T00:00:00</CreateDateTo> -->
<!-- <UpdateDateFrom>2024-01-15T00:00:00</UpdateDateFrom> -->
<!-- <UpdateDateTo>2024-01-16T00:00:00</UpdateDateTo> -->
<!-- <CreateAndUpdateDateFrom>2024-01-15T00:00:00</CreateAndUpdateDateFrom> -->
<!-- <CreateAndUpdateDateTo>2024-01-16T00:00:00</CreateAndUpdateDateTo> -->
<!-- <RowCount>500</RowCount> -->
</ns1:pixiReadDeliveryHeaders>
</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:pixiReadDeliveryHeaders>
<!-- <SDelHKey>0</SDelHKey> -->
<!-- <CreateDateFrom>2024-01-01T00:00:00</CreateDateFrom> -->
<!-- <CreateDateTo>2024-02-01T00:00:00</CreateDateTo> -->
<!-- <UpdateDateFrom>2024-01-15T00:00:00</UpdateDateFrom> -->
<!-- <UpdateDateTo>2024-01-16T00:00:00</UpdateDateTo> -->
<!-- <CreateAndUpdateDateFrom>2024-01-15T00:00:00</CreateAndUpdateDateFrom> -->
<!-- <CreateAndUpdateDateTo>2024-01-16T00:00:00</CreateAndUpdateDateTo> -->
<!-- <RowCount>500</RowCount> -->
</ns1:pixiReadDeliveryHeaders>
</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 = [
// 'SDelHKey' => '0',
// 'CreateDateFrom' => '2024-01-01T00:00:00',
// 'CreateDateTo' => '2024-02-01T00:00:00',
// 'UpdateDateFrom' => '2024-01-15T00:00:00',
// 'UpdateDateTo' => '2024-01-16T00:00:00',
// 'CreateAndUpdateDateFrom' => '2024-01-15T00:00:00',
// 'CreateAndUpdateDateTo' => '2024-01-16T00:00:00',
// 'RowCount' => '500',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiReadDeliveryHeaders', $soapArguments);
- SQL object:
- dbo.pipiReadDeliveryHeaders