pixiDFGetOrderlines_new
Returns the direct-fulfillment (FUT) orderlines of one order for an authorized drop-shipping supplier, including item, status history and currency data.
Interface call for direct-fulfillment (drop-shipping) suppliers to fetch the orderlines of a single order that they have to fulfil.
Authorization
- Empty strings in
SupplNrandSecretare treated asNULL. - A supplier is searched in
SupplierswhoseSupplNrequalsSupplNr, whoseCustNrequalsSecret, that is not disabled and hasCanDoDirectFulfillment = 1. - If no such supplier is found and the setting
DFAPIAllowFullAccessWithoutSecretis0(or not present), a single error row withError = 403is returned and nothing else. - Otherwise the orderlines are returned.
Selection of orderlines
- Only lines of the order
OrderNRwith orderline statusFUT. - Each line is joined to its most recent
OrderHistoryentry with statusFUT; that status must be a fulfilment state inOrderStates(FulfilmentStatus = 'Y'). - By default only lines whose history entry is not yet confirmed (
ClientNotified = 'N') are returned; withAllOrderlines = 1confirmed lines are included as well. - If
SupplNris given, only lines whoseSupplInfoequalsSupplNrand whose supplier is a direct-fulfillment supplier are returned. IfSupplNris empty (only possible when full access without secret is allowed), lines of all suppliers are returned. - Lines are excluded if the shipping address is locked (
ASLocked = 'Y') or the customer is locked (SLocked = 'Y'). - Lines without a matching billing address, customer, order header or currency are not returned (inner joins).
Item data
For each line the item is read from Items; the supplier-specific additional item record in AddItems (matching the line's supplier, newest by UpdateDate) provides ItemNrSuppl with priority, while EANUPC is taken from the item first and from AddItems only as fallback.
The result is DISTINCT and has no defined sort order.
Notes
- All tables are read with
NOLOCK; uncommitted data may be returned. - The
Secretis compared with the supplier'sCustNrfield (the customer number Pixi has at the supplier). - If the setting
DFAPIAllowFullAccessWithoutSecretis not0, the secret check is effectively disabled: any caller gets data, and with an emptySupplNreven the lines of all suppliers of the order. - The call is read-only: it does not set
ClientNotified. Confirming lines must be done with a separate call; the returned columnOrderlineConfirmedonly shows the current flag. - The error row has different columns (
Error,ErrorMsg) than the data rows, so clients must check which columns are present.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
OrderNR
Required
|
int | – |
Pixi order number whose orderlines are returned. Example: |
SupplNr
|
varchar(4) string |
NULL |
Supplier number of the direct-fulfillment supplier. Used for authorization and to restrict the lines to this supplier. Empty string is treated as NULL. Example: |
Secret
|
varchar(20) string |
NULL |
Secret of the supplier; must match the Example: |
AllOrderlines
|
bit boolean |
0 |
Controls whether already confirmed lines are included. Allowed values
Example: |
Response
Result set 1 · If the supplier/secret check fails and DFAPIAllowFullAccessWithoutSecret is 0.
Single error row.
| Column | Type | Description |
|---|---|---|
Error
|
varchar(3) string |
Error code, always |
ErrorMsg
|
varchar(47) string |
Error text. |
Result set 2 · If authorization succeeds or full access without secret is allowed.
One row per matching direct-fulfillment orderline of the order.
| Column | Type | Description |
|---|---|---|
OrderLineRef
|
int |
Key of the orderline ( |
OrderNr
|
int |
Pixi order number. |
ArtName
Nullable |
string |
Item name on the orderline. |
EANUPC
Nullable |
string |
EAN/UPC of the item; from |
ItemNrSuppl
Nullable |
string |
Supplier item number; from the supplier-specific |
itemNrExternal
Nullable |
string |
External item number stored on the orderline. |
Qty
Nullable |
int |
Ordered quantity. |
Price
Nullable |
decimal |
Price of the orderline. |
Status
|
string |
Orderline status, always |
OrderHistKey
|
int |
Key of the latest FUT history entry of the line. |
StatusChangeDate
Nullable |
datetime dateTime |
Date of the FUT status change. |
OrderDate
Nullable |
datetime dateTime |
Order date. |
OrderNrExternal
Nullable |
string |
External (shop) order number. |
oItemSpecialNote
Nullable |
string |
Special note on the orderline. |
SupplInfo
Nullable |
string |
Supplier number assigned to the line. |
InvoiceNrExternal
Nullable |
string |
External invoice number. |
DF_Type
Nullable |
string |
Direct-fulfillment type of the line. |
ItemRef
|
int |
Item key ( |
OrderlineConfirmed
Nullable |
string |
|
OrderCurrencyCode
Nullable |
string |
Currency code of the order ( |
BundleOrderlineRef
Nullable |
int |
Reference to the bundle parent orderline, if any. |
ItemNrInt
Nullable |
string |
Internal Pixi item number. |
Response example
<SqlRowSet1>
<row>
<OrderLineRef>587341</OrderLineRef>
<OrderNr>104523</OrderNr>
<ArtName>Gartenstuhl Teak natur</ArtName>
<EANUPC>4012345678901</EANUPC>
<ItemNrSuppl>GS-TK-100</ItemNrSuppl>
<itemNrExternal>SHOP-55821</itemNrExternal>
<Qty>2</Qty>
<Price>89.90</Price>
<Status>FUT</Status>
<OrderHistKey>2210457</OrderHistKey>
<StatusChangeDate>2024-05-14T09:12:33</StatusChangeDate>
<OrderDate>2024-05-13T18:47:02</OrderDate>
<OrderNrExternal>400017722</OrderNrExternal>
<oItemSpecialNote/>
<SupplInfo>DF01</SupplInfo>
<InvoiceNrExternal/>
<DF_Type>1</DF_Type>
<ItemRef>33012</ItemRef>
<OrderlineConfirmed>N</OrderlineConfirmed>
<OrderCurrencyCode>EUR</OrderCurrencyCode>
<BundleOrderlineRef/>
<ItemNrInt>GS100</ItemNrInt>
</row>
</SqlRowSet1>
Error messages
| Status | Message | Cause |
|---|---|---|
| 403 | Not Authorized. Secret or SupplNr is incorrect. | No enabled direct-fulfillment supplier matches `SupplNr` and `Secret` (`CustNr`), and the setting `DFAPIAllowFullAccessWithoutSecret` is `0`. Send the correct supplier number and secret. |
Examples
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:pixiDFGetOrderlines_new>
<OrderNR>104523</OrderNR>
<!-- <SupplNr>DF01</SupplNr> -->
<!-- <Secret>K-778812</Secret> -->
<!-- <AllOrderlines>0</AllOrderlines> -->
</ns1:pixiDFGetOrderlines_new>
</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:pixiDFGetOrderlines_new>
<OrderNR>104523</OrderNR>
<!-- <SupplNr>DF01</SupplNr> -->
<!-- <Secret>K-778812</Secret> -->
<!-- <AllOrderlines>0</AllOrderlines> -->
</ns1:pixiDFGetOrderlines_new>
</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' => '104523',
// 'SupplNr' => 'DF01',
// 'Secret' => 'K-778812',
// 'AllOrderlines' => '0',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiDFGetOrderlines_new', $soapArguments);
Tables used
- SQL object:
- dbo.pipiDFGetOrderlines_new