Postman collection
Orders Write

pixiOrderSetGdprPollingExportFlag

Sets or clears the GDPR polling export flag (`ExportGdprDataForPolling`) of an order identified by order number or external order number.

Updates the column ExportGdprDataForPolling of one order in OrderHeader.

  1. OrderNr = 0 and an empty OrderNrExternal are treated as not supplied.
  2. The order is looked up by OrderNr first. If no order is found that way, it is looked up by OrderNrExternal. If both are given and OrderNr matches, OrderNrExternal is ignored.
  3. Validation, in this order:
    • neither OrderNr nor OrderNrExternal supplied → error,
    • no order found → error,
    • ExportGdprDataForPolling is NULL → error.
  4. If the order already has the requested flag value, nothing is changed and a Warning row is returned.
  5. Otherwise the flag is updated, UpdateEmp is set to User (default API user), and a Success row is returned.

The call always returns exactly one row with Status and Message.

Notes

  • Runs in its own transaction, or in a savepoint if a transaction is already open. With XACT_ABORT ON, unexpected errors roll back the change and are logged via log.InsertError (not attached); the error text is truncated to 80 characters in Message.
  • The lookups and the existence check read OrderHeader with NOLOCK; the update uses ROWLOCK.
  • If several orders share the same OrderNrExternal, only one of them (the first row read) is updated.
  • ExportGdprDataForPolling has no default value; omitting it makes SQL Server reject the call before the procedure runs. Only an explicit NULL produces the status row "Mandatory parameter ExportGdprDataForPolling is missing".
  • Validation errors are returned as a normal row with Status = Error, not as a SQL error.

Tables used

OrderHeader · Write
SQL object:
dbo.pipiOrderSetGdprPollingExportFlag
Updated at 2026-10-30