Postman collection
Orders Read

pixiGetOrderChanges

Returns orders that were created, changed, invoiced or scanned out within a time window, with one row per detected change.

Collects change events for orders in the time window from DateFrom (inclusive) to DateTo (exclusive) and returns them as a flat list. It is meant for polling clients that synchronise orders into an external system.

If DateFrom is not given, it defaults to the current time minus one day. If DateTo is not given, it defaults to the current time.

Depending on ChangeType, one or all of these checks run:

  • CORDER: order headers whose CreateDate is in the window. Param1 is empty.
  • UORDER: order headers whose UpdateDate is in the window. Param1 is empty.
  • CORDERL: order lines whose CreateDate is in the window. One row per order line; Param1 holds the OrderlineKey.
  • UORDERL: order lines whose UpdateDate is in the window. One row per order line; Param1 holds the OrderlineKey.
  • IORDER: invoices whose InvDate is in the window. One row per order and invoice; Param1 holds the InvoiceNr.
  • SORDER: invoices whose ScanOutDate is in the window. One row per order and invoice; Param1 holds the InvoiceNr.

ALL (default) runs all six checks.

Optional filters:

  • ShopID: for header events, the shop of the order address (AddrShopId). For line events, the shop of the order line (OrdShopID). For invoice events, the shop of the invoice (InvShopID).
  • PaymentType: for header and line events, the payment type of the address (APayment). For invoice events, the payment type of the invoice (Payment).

Only rows with OrderNr > 0 are returned. Rows are sorted by OrderNr, then ChangeType, then Param1, all ascending.

Notes

  • All reads use NOLOCK, so uncommitted changes can appear and rows can be missed or duplicated under concurrent load.
  • The window is half-open (>= DateFrom, < DateTo). Use the previous DateTo as the next DateFrom to poll without gaps or overlaps.
  • Results are not de-duplicated. The same order can appear several times: with several change types, with several order lines or with several invoices.
  • CORDER/UORDER use an inner join on the order address. Order headers without a matching address are not reported.
  • Param1 is a varchar, so it sorts as text: OrderlineKey and InvoiceNr values sort alphabetically, not numerically.
  • An unknown ChangeType value raises no error; it simply returns an empty result.
  • No error rows are produced.

Tables used

OrderHeader · Read Addresses · Read Orderlines · Read Invoices · Read Invlines · Read
SQL object:
dbo.pipiGetOrderChanges
Updated at 2026-10-30