Postman collection
Items Write

pixiSetItemCategory

Assigns a category (from the TontrArten category table) to an Artikel, identified by item key or internal item number.

Sets the category of a single Artikel.

  1. Identify the item: If ItemKEy is given, it is used directly. If it is NULL, the item is looked up by ItemNRInt (internal item number) in items. If several items match, an arbitrary one is taken (TOP (1) without sort order).
  2. If no item key can be determined, a row with Error = Item not found. is returned and nothing is changed.
  3. Look up the category: The category is searched in TontrArten by its text (TontrText = Category). The fields TontrArt (config type) and TontrArtKey (category ID) of the first match are read.
  4. If no category is found, or the matching row has no TontrArt, a row with Error = Category is not existing. is returned and nothing is changed.
  5. Otherwise the columns ConfigType and CategoryId of the item are updated and a row with Error = OK is returned.

The call always returns exactly one row with one column Error that holds the status text.

Notes

  • If ItemKEy is passed, its existence is not checked. For a non-existing key the update affects no row, but the call still returns OK.
  • If both ItemKEy and ItemNRInt are passed, ItemNRInt is ignored.
  • The category is matched by its display text, not by key. If several categories share the same text, an arbitrary one is used.
  • Lookups use NOLOCK (dirty reads possible); the update uses ROWLOCK. No explicit transaction is used.
  • The status column is named Error even on success (OK).

Tables used

items · Write TontrArten · Read
SQL object:
dbo.pipiSetItemCategory
Updated at 2026-10-30