Postman collection
Items Write

pixiSetItemStatus

Enables or disables an item, or activates or deactivates its supplier assignment, and queues the item for export to the shop.

Sets the status of an item.

  1. Find the item. The item is searched in Items by ItemKey (only if ItemKey is passed) or by ItemNrInt. If no item matches, status 404 is returned. If more than one item matches, status 409 is returned. This can also happen when both ItemKey and ItemNrInt are passed and they point to different items.
  2. Update the status.
    • Without SupplierID (or with an empty string): the Enabled flag of the item in Items is set to the value of Enabled.
    • With SupplierID: the item's supplier record in AddItems (matched by item and SupplNr = SupplierID) is searched. If none or more than one is found, status 404 or 409 is returned. If exactly one is found, its Active flag is set to Enabled. In this case the item's own Enabled flag is not changed.
    • If the update fails, status 500 with the SQL error message is returned.
  3. On success the item is queued for recalculation and forced export to the shop. Then the item is returned with ItemKey, ItemNrInt, Enabled, the passed SupplNr and, if a supplier was passed, the supplier record's Active flag.

In case of an error, a single row with Status and ErrorMsg is returned instead.

Notes

  • Empty error message: if ItemKey is not passed and the item is not found, the 404 message evaluates to NULL. The reason is that the message concatenates ItemKey without NULL handling, so ErrorMsg may be empty. Rely on Status.
  • Empty result on success: the success result joins Items with AddItems. An item without any supplier record (AddItems) therefore returns no rows, even though the update succeeded.
  • Side effect on success: Pixi_ExportItemChangesToShop inserts the item into pixi.ItemRecalculateStockQueue with ForceToExport = 1. No export is queued when an error occurs.
  • Transactions and locking: no explicit transaction is used. Reads use NOLOCK and updates use ROWLOCK.
  • Temporary tables: they are dropped via util.TempTableDrop, whose definition is not attached.

Tables used

Items · Write AddItems · Write ItemRecalculateStockQueue · Write
SQL object:
dbo.pipiSetItemStatus
Updated at 2026-10-30