pixiDFGetOrders
Returns the order headers with shipping address data of orders that have open direct fulfillment order lines (status FUT) for a supplier.
Part of the Direct Fulfillment (DF) API: a supplier retrieves the orders it has to ship directly to the customer.
Authentication
- The setting
DFAPIAllowFullAccessWithoutSecretis read. If it is not1, the supplier is identified bySupplNrtogether withSecret, which must match the supplier'sCustNr(the customer number at the supplier). - The supplier must exist, must not be disabled and must have
CanDoDirectFulfillment = 1. - If the supplier cannot be identified and the setting is not
1, a single error row withError = 403is returned. - If the setting is
1, the secret is not checked. A givenSupplNrmust still match an active DF supplier, otherwise an error row is returned. IfSupplNris left out (or0), orders of all suppliers are returned.
Order selection
An order is returned if it has at least one order line that
- has the status
FUT, - is assigned to the supplier (
SupplInfo), unless no supplier is set (full access), and - has
ClientNotified = 'N'(not yet transferred), unlessAllOrders = 1.
Orders whose shipping address or customer is locked are excluded. Only orders with an existing customer, billing address, shipping address, country and currency are returned (inner joins).
The result contains one row per order, sorted by OrderNr. AddrShopID and APayment come from the billing address, all other address fields from the shipping address.
Notes
- All reads use
NOLOCK, so uncommitted data may be returned. - The call does not mark the orders as transferred;
ClientNotifiedis not changed here. WithoutAllOrders = 1the same orders are returned again until another process updates the order lines. - On an authentication error the procedure returns only the error row (return code 1) and no order data.
- If
DFAPIAllowFullAccessWithoutSecret = 1and noSupplNris given, the orders of all suppliers are exposed; this setting should be used with care. - The order history is joined in the line check, but the history filter is commented out and has no effect on the result.
- A temporary table is created and dropped via
util.TempTableDrop(definition not attached).
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
SupplNr
|
varchar(4) string |
NULL |
Supplier number of the direct fulfillment supplier. Required unless the setting Example: |
Secret
|
varchar(20) string |
NULL |
Secret of the supplier; must equal the supplier's Example: |
AllOrders
|
bit boolean |
0 |
Controls whether already notified order lines are included. NULL is treated as 0. Allowed values
Example: |
Result set 1 · If the supplier cannot be authenticated or SupplNr is invalid
Single error row; no further result set follows.
| Column | Type | Description |
|---|---|---|
Error
|
varchar(3) string |
Always |
ErrorMsg
|
varchar(34) string |
Error text. |
Result set 2 · On successful authentication
One row per order with open DF order lines, sorted by OrderNR.
| Column | Type | Description |
|---|---|---|
OrderNR
|
string |
Order number ( |
Anrede
Nullable |
string |
Salutation of the shipping address. |
CareOf
Nullable |
string |
Care-of line of the shipping address. |
FirstName
Nullable |
string |
First name of the shipping address. |
LastName
Nullable |
string |
Last name of the shipping address. |
Street
Nullable |
string |
Street of the shipping address. |
ZIP
Nullable |
string |
Postal code of the shipping address. |
HouseNr
Nullable |
string |
House number of the shipping address. |
City
Nullable |
string |
City of the shipping address. |
Country
|
string |
Pixi country code of the shipping address. |
Email
Nullable |
string |
E-mail of the shipping address. |
Phone
Nullable |
string |
Phone number of the shipping address. |
Address_remarks
Nullable |
string |
Address remarks of the order. |
ShipInstruct
Nullable |
string |
Shipping instructions of the order. |
Shipdate
Nullable |
dateTime |
Planned shipping date of the order. |
ShipVendorCode
Nullable |
string |
Shipping vendor code of the order. |
AddrShopID
Nullable |
string |
Shop ID of the billing address. |
APayment
Nullable |
string |
Payment type of the billing address. |
AddrNoChargeVAT
Nullable |
string |
VAT exemption flag of the shipping address. |
discount
Nullable |
decimal |
Discount of the order. |
CntCodeISO2
Nullable |
string |
ISO 3166 alpha-2 code of the shipping country. |
CntCodeISO3
Nullable |
string |
ISO 3166 alpha-3 code of the shipping country. |
ShipCost
Nullable |
decimal |
Shipping cost of the order. |
PartialDeliveryActive
|
boolean |
Partial delivery allowed ( |
PartialDeliveryForceCancelAfterShipout
|
boolean |
Cancel remaining lines after forced shipout ( |
PartialDeliveryMultiple
|
boolean |
Multiple partial deliveries allowed ( |
OrderCurrencyCode
|
string |
Currency code of the order ( |
Fax
Nullable |
string |
Fax number of the shipping address. |
Referrer
Nullable |
string |
Referrer of the order. |
SubShopName
Nullable |
string |
Sub-shop name of the order. |
Response example
<SqlRowSet1>
<row>
<OrderNR>100234</OrderNR>
<Anrede>Herr</Anrede>
<FirstName>Max</FirstName>
<LastName>Mustermann</LastName>
<Street>Hauptstraße</Street>
<ZIP>80331</ZIP>
<HouseNr>12</HouseNr>
<City>München</City>
<Country>D</Country>
<Email>max@example.com</Email>
<Phone>089123456</Phone>
<Shipdate>2024-05-14T00:00:00</Shipdate>
<ShipVendorCode>DHL</ShipVendorCode>
<AddrShopID>SH1</AddrShopID>
<APayment>RE</APayment>
<AddrNoChargeVAT>N</AddrNoChargeVAT>
<discount>0.00</discount>
<CntCodeISO2>DE</CntCodeISO2>
<CntCodeISO3>DEU</CntCodeISO3>
<ShipCost>4.90</ShipCost>
<PartialDeliveryActive>0</PartialDeliveryActive>
<PartialDeliveryForceCancelAfterShipout>0</PartialDeliveryForceCancelAfterShipout>
<PartialDeliveryMultiple>0</PartialDeliveryMultiple>
<OrderCurrencyCode>EUR</OrderCurrencyCode>
<SubShopName>Webshop</SubShopName>
</row>
</SqlRowSet1>
| Status | Message | Cause |
|---|---|---|
| 403 | Not Authorized. Secret or SupplNr is incorrect. | The secret check is active and no active DF supplier matches `SupplNr` and `Secret` (wrong values, supplier disabled or `CanDoDirectFulfillment` not set). |
| 403 | SupplNr is incorrect. | `DFAPIAllowFullAccessWithoutSecret` is 1, but the given `SupplNr` does not belong to an active supplier with direct fulfillment enabled. |
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:pixiDFGetOrders>
<!-- <SupplNr>L001</SupplNr> -->
<!-- <Secret>K123456</Secret> -->
<!-- <AllOrders>0</AllOrders> -->
</ns1:pixiDFGetOrders>
</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:pixiDFGetOrders>
<!-- <SupplNr>L001</SupplNr> -->
<!-- <Secret>K123456</Secret> -->
<!-- <AllOrders>0</AllOrders> -->
</ns1:pixiDFGetOrders>
</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 = [
// 'SupplNr' => 'L001',
// 'Secret' => 'K123456',
// 'AllOrders' => '0',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiDFGetOrders', $soapArguments);
- SQL object:
- dbo.pipiDFGetOrders