pixiGetOrderComments
Returns the comments of orders created after a given date, optionally filtered by Pixi order number or shop order number.
Returns the comments stored for orders, together with the order numbers they belong to.
Parameter handling
OrderNr=0is treated as not set (NULL).- An empty
OrderNrShopis treated as not set (NULL). RowCountis limited to the range 1 to 1000. A value that isNULL, smaller than 1 or greater than 1000 is replaced by1000.Sincedefaults to2000-01-01if it isNULL.
Filter
- Only comments whose
CreateDateis strictly later thanSinceare returned. - If neither
OrderNrnorOrderNrShopis set, comments of all orders are returned. - If
OrderNris set, comments of the order with this Pixi order number are returned. - If
OrderNrShopis set, comments of orders whose external (shop) order numberOrderNrExternalmatches are returned. - If both are set, they are combined with OR: comments of either order are returned.
Sorting and limit
The rows are sorted by CreateDate ascending, and at most RowCount rows are returned. This allows incremental retrieval: pass the CreateDate of the last row received as Since in the next call.
Notes
- Both tables are read with
NOLOCK, so uncommitted data may be returned or rows may be missed during concurrent changes. - The sort order has no tie-breaker beyond
CreateDate. When paging withSince= lastCreateDate, comments with exactly the sameCreateDateas the last returned row are skipped because the filter is strictly greater (>). If a page ends in the middle of rows sharing one timestamp, those remaining rows are lost. - The maximum page size is 1000 rows; larger values for
RowCountdo not raise an error but are silently reset to 1000. - Only comments whose order exists in
OrderHeaderare returned (inner join). - A
Sincevalue of1900-01-01(the value of an empty datetime) is also replaced by2000-01-01.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
OrderNr
|
int | NULL |
Pixi order number. Example: |
OrderNrShop
|
varchar(50) string |
NULL |
External (shop) order number, compared with Example: |
Since
|
datetime dateTime |
2000-01-01 |
Only comments created strictly after this point in time are returned. Example: |
RowCount
|
int | 1000 |
Maximum number of rows to return (1 to 1000). Values outside this range or Example: |
Result set 1 · Always (may be empty).
Order comments matching the filters, sorted by CreateDate ascending, at most RowCount rows.
| Column | Type | Description |
|---|---|---|
Comment
Nullable |
string |
Text of the comment. |
CreateEmp
Nullable |
string |
Employee who created the comment. |
CreateDate
|
datetime dateTime |
Creation date and time of the comment; use the value of the last row as |
OrderNrExternal
Nullable |
string |
External (shop) order number of the order. |
OrderNr
|
int |
Pixi order number the comment belongs to. |
Response example
<SqlRowSet1>
<row>
<Comment>Customer asked for delivery after 2 pm.</Comment>
<CreateEmp>MK</CreateEmp>
<CreateDate>2024-05-02T09:15:32.000</CreateDate>
<OrderNrExternal>SHOP-100023</OrderNrExternal>
<OrderNr>123456</OrderNr>
</row>
<row>
<Comment>Address corrected by phone.</Comment>
<CreateEmp>AS</CreateEmp>
<CreateDate>2024-05-02T11:48:07.000</CreateDate>
<OrderNrExternal>SHOP-100031</OrderNrExternal>
<OrderNr>123470</OrderNr>
</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:pixiGetOrderComments>
<!-- <OrderNr>123456</OrderNr> -->
<!-- <OrderNrShop>SHOP-100023</OrderNrShop> -->
<!-- <Since>2024-05-01T00:00:00</Since> -->
<!-- <RowCount>500</RowCount> -->
</ns1:pixiGetOrderComments>
</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:pixiGetOrderComments>
<!-- <OrderNr>123456</OrderNr> -->
<!-- <OrderNrShop>SHOP-100023</OrderNrShop> -->
<!-- <Since>2024-05-01T00:00:00</Since> -->
<!-- <RowCount>500</RowCount> -->
</ns1:pixiGetOrderComments>
</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 = [
// 'OrderNr' => '123456',
// 'OrderNrShop' => 'SHOP-100023',
// 'Since' => '2024-05-01T00:00:00',
// 'RowCount' => '500',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiGetOrderComments', $soapArguments);
- SQL object:
- dbo.pipiGetOrderComments