Postman collection
Suppliers Write

pixiSupplierOrderChangeStatus

Changes the status of one or more supplier orders by calling the internal procedure pixi.SupplierOrderChangeStatus and returns a status row.

Sets a new status (ChangeStatusIdTo) on supplier orders.

  1. User resolution: if UserId is not given, the user ID is looked up from UserName in UCS_USERS. If the name does not exist, the ID of the user pixiAdministration is used.
  2. Order selection: the orders are identified by one of these parameters:
    • SupplierOrderId: a single supplier order ID. The value 0 is treated like NULL.
    • SupplierOrderIds: a list of supplier order IDs, passed on unchanged to the internal procedure.
    • SupplierOrderNR: used only if SupplierOrderId and SupplierOrderIds are both empty. The call looks up the supplier order with this InternalNumber. If several orders match, the one with the highest Id is used.
    • If none of the three is given, the call returns Invalid parameters.
  3. Status check: if ChangeStatusIdTo = 3 (confirmed, CON), the single order in SupplierOrderId must have status 2 (ordered, BES). Otherwise an error row is returned.
  4. Status change: the call runs pixi.SupplierOrderChangeStatus through sp_executesql. It passes the user ID, the target status, the single ID and the ID list.
  5. The call returns one row with ReturnCode = Success. If an error occurs, the row contains ERROR and the error message.

Notes

  • The actual status change is done by pixi.SupplierOrderChangeStatus, whose definition is not attached. Its exact logic, the tables it writes, the valid target status IDs, the expected format of SupplierOrderIds (probably comma-separated) and any result sets of its own are therefore unknown.
  • The CON/BES check only applies to SupplierOrderId, including the ID found via SupplierOrderNR. Orders passed only in SupplierOrderIds are not checked here.
  • If SupplierOrderNR matches no order, no error is returned. The call goes on with an empty ID.
  • The status check reads SupplierOrder with NOLOCK.
  • The call runs in its own transaction. If the caller already has an open transaction, a savepoint is used instead. On error the call rolls back to this point. A transaction that is no longer committable can cause a further error at this rollback.
  • AppName is declared but not used.
  • UserName has no default and must always be sent, even if UserId is given.

Tables used

SupplierOrder · Read UCS_USERS · Read
SQL object:
dbo.pipiSupplierOrderChangeStatus
Updated at 2026-10-30