pixiGetDelivery
Returns supplier delivery headers (goods receipts), filtered by supplier, delivery number, item, location, status, dates and Picco lock, with key-based paging.
Returns rows from the supplier delivery header table (SDelHeader) together with the supplier name from Suppliers (left join on SDelHSupplNr).
Parameter handling
- Empty strings are treated as
NULLfor all text filters. ForSDelHKeyandDeliveryNumber, the value0is treated as "no filter". RowCountdefaults to 100.NULLand0also mean 100.Offsetis not a row offset. It is a key cursor: only deliveries withSDelHKey>Offsetare returned.0orNULLmeans no cursor.
Filters (all combined with AND)
SDelHKey,SupplNr,DeliveryNumber(SDelHNr),LocID(SDelHLocationID) andExternalReceiptNr: exact match.- Status: by default, closed deliveries (
SDelHStatus=CLS) and invoiced deliveries (SDelHStatus=INV) are excluded. SetClosed= 1 and/orInvoice= 1 to include them. - Creation date:
SDelHCreateDatebetweenCreateDateFromandCreateDateTo. IfCreateDateTohas the time 00:00:00, it is moved to the end of that day. - Update date:
SDelHUpdateDatebetweenUpdateDateFromandUpdateDateTo, with the same end-of-day rule. - Item filter: if at least one of
ItemNrInt,ItemNrSuppl,EANUPCorItemNameis set, only deliveries that contain at least one delivery line (SDelDetail) for a matching item are returned. All given item values must match exactly on the same item. - Picco user: if
PiccoUseris set, deliveries locked by Picco (LockedByPicco=Y) for a different Picco user are excluded. Unlocked deliveries and deliveries locked by the given user are returned.
Sorting and paging
The result is sorted by SDelHKey ascending, and at most RowCount rows are returned. To read the next page, pass the last SDelHKey received as Offset.
Notes
- All tables are read
WITH (NOLOCK). Results can contain uncommitted data. - Date ranges need both bounds. If only
CreateDateFromor onlyCreateDateTois set, the comparison usesBETWEENwithNULLand no rows are returned. The same applies to the update date pair. - The end-of-day adjustment uses
fPixi_GetDateEndOfDay. Its definition is not attached, so the exact end-of-day time is not known.CreateDateFrom/UpdateDateFromare used as passed; they are not moved to the start of the day. - Deliveries locked by Picco with an empty
PiccoUservalue are also excluded whenPiccoUseris passed. - A negative
RowCountcauses a SQL error fromTOP. - The item filter uses exact equality;
ItemNamedoes not support wildcards.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
SDelHKey
|
int | NULL |
Internal key of a supplier delivery. Example: |
SupplNr
|
varchar(200) string |
NULL |
Supplier number ( Example: |
DeliveryNumber
|
int | NULL |
Delivery number ( Example: |
ItemNrInt
|
varchar(200) string |
NULL |
Internal item number. Returns only deliveries with a line for this item. Example: |
ItemNrSuppl
|
varchar(200) string |
NULL |
Supplier item number. Returns only deliveries with a line for a matching item. Example: |
EANUPC
|
varchar(200) string |
NULL |
EAN/UPC of the item. Returns only deliveries with a line for a matching item. Example: |
ItemName
|
varchar(200) string |
NULL |
Item name, exact match. Returns only deliveries with a line for a matching item. Example: |
RowCount
|
int | NULL |
Maximum number of rows. NULL or Example: |
Offset
|
int | NULL |
Key cursor for paging: only deliveries with Example: |
Closed
|
bit boolean |
0 |
Include closed deliveries (status Allowed values
Example: |
Invoice
|
bit boolean |
0 |
Include invoiced deliveries (status Allowed values
Example: |
LocID
|
varchar(3) string |
NULL |
Location ID ( Example: |
PiccoUser
|
varchar(50) string |
NULL |
Picco user. If set, deliveries locked by Picco for another user are excluded. Example: |
CreateDateFrom
|
datetime dateTime |
NULL |
Start of the creation date range. Must be used together with Example: |
CreateDateTo
|
datetime dateTime |
NULL |
End of the creation date range. If the time is 00:00:00, it is moved to the end of that day. Example: |
UpdateDateFrom
|
datetime dateTime |
NULL |
Start of the update date range. Must be used together with Example: |
UpdateDateTo
|
datetime dateTime |
NULL |
End of the update date range. If the time is 00:00:00, it is moved to the end of that day. Example: |
ExternalReceiptNr
|
varchar(50) string |
NULL |
External receipt number, exact match. Example: |
Result set 1 · Always (may be empty)
Supplier delivery headers matching the filters, sorted by SDelHKey ascending, at most RowCount rows.
| Column | Type | Description |
|---|---|---|
SDelHKey
|
int |
Internal key of the supplier delivery. |
SDelHSupplNr
Nullable |
string |
Supplier number. |
SDelHDate
Nullable |
dateTime |
Delivery date. |
SDelHLocationID
Nullable |
string |
Location ID of the delivery. |
SDelHNr
Nullable |
int |
Delivery number. |
SDelHNote
Nullable |
string |
Note on the delivery. |
SDelHStatus
Nullable |
string |
Delivery status, e.g. |
SDelHCreateDate
Nullable |
datetime dateTime |
Creation date. |
SDelHCreateEmp
Nullable |
string |
Employee who created the delivery. |
SDelHUpdateDate
Nullable |
datetime dateTime |
Date of the last change. |
SDelHUpdateEmp
Nullable |
string |
Employee who last changed the delivery. |
SDelHextInvoiceNr
Nullable |
string |
External (supplier) invoice number. |
SDelHextOrderNr
Nullable |
string |
External order number. |
SDelHfinalDicsount
Nullable |
decimal |
Final discount of the delivery (column name as spelled in the database). |
PiccoUser
Nullable |
string |
Picco user who holds the lock. |
LockedByPicco
Nullable |
string |
|
SupplName
Nullable |
string |
Supplier name from |
ExternalReceiptNr
Nullable |
string |
External receipt number. |
Response example
<SqlRowSet1>
<row>
<SDelHKey>15234</SDelHKey>
<SDelHSupplNr>L1001</SDelHSupplNr>
<SDelHDate>2024-03-12T00:00:00</SDelHDate>
<SDelHLocationID>001</SDelHLocationID>
<SDelHNr>4711</SDelHNr>
<SDelHNote>Teillieferung</SDelHNote>
<SDelHStatus>OPN</SDelHStatus>
<SDelHCreateDate>2024-03-12T08:15:22</SDelHCreateDate>
<SDelHCreateEmp>MM</SDelHCreateEmp>
<SDelHUpdateDate>2024-03-12T09:40:03</SDelHUpdateDate>
<SDelHUpdateEmp>MM</SDelHUpdateEmp>
<SDelHextInvoiceNr>RE-88231</SDelHextInvoiceNr>
<SDelHextOrderNr>B-2024-118</SDelHextOrderNr>
<SDelHfinalDicsount>0</SDelHfinalDicsount>
<PiccoUser>lager01</PiccoUser>
<LockedByPicco>N</LockedByPicco>
<SupplName>Muster Bürobedarf GmbH</SupplName>
<ExternalReceiptNr>WE-2024-00315</ExternalReceiptNr>
</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:pixiGetDelivery>
<!-- <SDelHKey>15234</SDelHKey> -->
<!-- <SupplNr>L1001</SupplNr> -->
<!-- <DeliveryNumber>4711</DeliveryNumber> -->
<!-- <ItemNrInt>ART-10045</ItemNrInt> -->
<!-- <ItemNrSuppl>SUP-998877</ItemNrSuppl> -->
<!-- <EANUPC>4006381333931</EANUPC> -->
<!-- <ItemName>Kugelschreiber blau</ItemName> -->
<!-- <RowCount>100</RowCount> -->
<!-- <Offset>15200</Offset> -->
<!-- <Closed>0</Closed> -->
<!-- <Invoice>0</Invoice> -->
<!-- <LocID>001</LocID> -->
<!-- <PiccoUser>lager01</PiccoUser> -->
<!-- <CreateDateFrom>2024-03-01T00:00:00</CreateDateFrom> -->
<!-- <CreateDateTo>2024-03-31T00:00:00</CreateDateTo> -->
<!-- <UpdateDateFrom>2024-03-01T00:00:00</UpdateDateFrom> -->
<!-- <UpdateDateTo>2024-03-31T00:00:00</UpdateDateTo> -->
<!-- <ExternalReceiptNr>WE-2024-00315</ExternalReceiptNr> -->
</ns1:pixiGetDelivery>
</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:pixiGetDelivery>
<!-- <SDelHKey>15234</SDelHKey> -->
<!-- <SupplNr>L1001</SupplNr> -->
<!-- <DeliveryNumber>4711</DeliveryNumber> -->
<!-- <ItemNrInt>ART-10045</ItemNrInt> -->
<!-- <ItemNrSuppl>SUP-998877</ItemNrSuppl> -->
<!-- <EANUPC>4006381333931</EANUPC> -->
<!-- <ItemName>Kugelschreiber blau</ItemName> -->
<!-- <RowCount>100</RowCount> -->
<!-- <Offset>15200</Offset> -->
<!-- <Closed>0</Closed> -->
<!-- <Invoice>0</Invoice> -->
<!-- <LocID>001</LocID> -->
<!-- <PiccoUser>lager01</PiccoUser> -->
<!-- <CreateDateFrom>2024-03-01T00:00:00</CreateDateFrom> -->
<!-- <CreateDateTo>2024-03-31T00:00:00</CreateDateTo> -->
<!-- <UpdateDateFrom>2024-03-01T00:00:00</UpdateDateFrom> -->
<!-- <UpdateDateTo>2024-03-31T00:00:00</UpdateDateTo> -->
<!-- <ExternalReceiptNr>WE-2024-00315</ExternalReceiptNr> -->
</ns1:pixiGetDelivery>
</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' => '15234',
// 'SupplNr' => 'L1001',
// 'DeliveryNumber' => '4711',
// 'ItemNrInt' => 'ART-10045',
// 'ItemNrSuppl' => 'SUP-998877',
// 'EANUPC' => '4006381333931',
// 'ItemName' => 'Kugelschreiber blau',
// 'RowCount' => '100',
// 'Offset' => '15200',
// 'Closed' => '0',
// 'Invoice' => '0',
// 'LocID' => '001',
// 'PiccoUser' => 'lager01',
// 'CreateDateFrom' => '2024-03-01T00:00:00',
// 'CreateDateTo' => '2024-03-31T00:00:00',
// 'UpdateDateFrom' => '2024-03-01T00:00:00',
// 'UpdateDateTo' => '2024-03-31T00:00:00',
// 'ExternalReceiptNr' => 'WE-2024-00315',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiGetDelivery', $soapArguments);
- SQL object:
- dbo.pipiGetDelivery