Postman collection
Direct-Fulfillment Read

pixiDFGetChanges

Returns the latest not yet notified fulfilment status changes of `FUT` order lines for a Direct Fulfillment supplier, with address, item and order data.

API call for Direct Fulfillment (DF) suppliers that fetches the order line changes they still have to process.

Authentication

  • The supplier is looked up in Suppliers by SupplNr. Secret must match the supplier's CustNr. The supplier must not be disabled and must have CanDoDirectFulfillment = 1.
  • If no supplier matches and the setting DFAPIAllowFullAccessWithoutSecret is 0 (or missing), a single row with Error = 403 is returned.
  • If no supplier matches but the setting is not 0, the call continues without a supplier filter and returns changes of all suppliers.

Selection

For every order line, only the newest OrderHistory entry (highest OrderHistKey) is considered, and only if all of these conditions apply:

  • the order line has status FUT;
  • the history status is an OrderStates state with FulfilmentStatus = 'Y';
  • the order line's SupplInfo equals the authenticated supplier (if one was found);
  • the shipping address (ASlocked) and the customer (SLocked) are not locked, unless LockedCustomers = 1;
  • OrderNrExternal matches OrderNRExternal, if that parameter is given;
  • the order header was created more than 5 minutes ago.

In addition, the history entry must have ClientNotified = 'N'. Order lines whose status is contained in ExcludeStatuses are skipped.

Output

  • If any order line appears more than once in the result, a single message row is returned instead of the data and the call stops.
  • Otherwise all rows are returned, sorted by StatusChangeDate. In databases whose name starts with pixi_PSP, they are sorted by ordernr, then StatusChangeDate.

Notes

  • The call is read-only. It does not set ClientNotified, so the same changes are returned again until they are marked as notified by another process. That process is not part of this code.
  • All tables are read WITH (NOLOCK), so uncommitted data may appear.
  • ExcludeStatuses is checked with CHARINDEX (substring match), so any separator works, e.g. STO,AUS. The inner selection already only returns FUT lines, so the parameter only matters if it contains FUT, which would suppress all rows.
  • If ExcludeStatuses is empty and the database name starts with pixi_PSP, it defaults to STO.
  • If SupplNr/Secret are wrong but DFAPIAllowFullAccessWithoutSecret is not 0, the data of all suppliers is returned.
  • Orders created less than 5 minutes ago are held back.
  • The temporary table is handled by util.TempTableDrop. That object is not attached.

Tables used

Suppliers · Read Settings · Read OrderHistory · Read Orderlines · Read Addresses · Read OrderHeader · Read Items · Read Customers · Read Currency · Read OrderStates · Read
SQL object:
dbo.pipiDFGetChanges
Updated at 2026-10-30