Postman collection
Items Write

pixiSetItemEan

Sets a new EAN/UPC code for exactly one item identified by item key, internal item number, supplier item number or current EAN.

Replaces the EAN/UPC code of a single item.

  1. At least one identifier must be passed: ItemKey, ItemNrInt, OldEan or ItemNrSuppl. Otherwise the result is 401 No item ID provided.

  2. The procedure counts the items that match any of the passed identifiers. The identifiers are combined with OR, not with AND.

    • No match: 402 Item not found.
    • More than one match: 403 More than one item is found. This also happens when several identifiers are passed that point to different items.
  3. If exactly one item matches, the setting BMECatImport_Update_EANUPC is checked. If it is 0 or missing, nothing is changed and the result is 405 ....

  4. Otherwise, inside a transaction, EANUPC is set to NewEan:

    • in Items for the item,
    • in AddItems for all records whose ItemRef points to the item.

    On success the result is 200 Item updated. On an SQL error the transaction is rolled back and the result is 404 Unexpected error: ....

The result text is always written to the output parameter ResultMessage. It is also returned as a one-row result set unless SupressDataset = 1.

Notes

  • Errors are not raised. They are returned as text whose first three characters are a status code (200, 401–405). Callers should evaluate this prefix.
  • The setting BMECatImport_Update_EANUPC is read via fpixi_GetSetting. A missing setting counts as 0, so the setting must exist with a value other than 0.
  • NewEan is not validated:
    • no check digit or format check,
    • no uniqueness check against other items,
    • NULL is not rejected and would clear the EAN.
  • Because ItemKey is compared with '', an ItemKey of 0 is treated as "not provided".
  • Item lookups use NOLOCK.
  • The text of a 404 message is truncated to 256 characters.

Tables used

Items · Write AddItems · Write Settings · Read
SQL object:
dbo.pipiSetItemEan
Updated at 2026-10-30