Postman collection
General Write

pixiTagUpdate

Renames a user-defined tag and optionally updates its description, returning a Status/Message row.

Updates an existing record in the Tag table, the tags that can be assigned to items or orders.

Steps:

  1. Reads IsSystemTag and TypeId of the tag with the given TagId.
  2. Checks whether another tag with the same Name and the same TypeId already exists. Tags of other types may share the name.
  3. Validates the input in this order and stops at the first failure:
    • TagId must not be empty.
    • Name must not be NULL or an empty string.
    • The tag must not be a system tag (IsSystemTag = 1).
    • The tag must exist.
    • No other tag of the same type may already use the new name.
  4. If all checks pass, the tag is updated:
    • Name is set to Name.
    • Description is set to Description. If Description is NULL or left out, the current description is kept.
    • RecordModifiedOn is set to the current time.
    • RecordModifiedByUserId is set to the user API, or to pixiAdministration if no API user exists.
    • RowVersion is increased by 1.

The call always returns one row with Status (Success or Error) and Message.

Notes

  • Validation errors are not raised as SQL errors. They are returned as a row with Status = 'Error', so check the Status column.
  • The update runs in its own transaction. If a transaction is already open, a savepoint is used instead. On an unexpected error the work is rolled back and the error is logged via log.InsertError. That object is not attached, so what it writes is not documented here.
  • The lookups for the existing tag and for duplicate names use NOLOCK. The update itself uses ROWLOCK.
  • Name is not trimmed. A name consisting only of spaces passes the empty check, because SQL Server ignores trailing spaces when comparing strings.
  • Passing an empty string as Description clears the description. Passing NULL or leaving the parameter out keeps the current description.
  • In unexpected error messages, the original SQL error text is cut to 80 characters.

Tables used

Tag · Write UCS_USERS · Read
SQL object:
dbo.pipiTagUpdate
Updated at 2026-10-30