Skip to main content

assignProductUpc

Assigns an owned UPC from the company's GS1 blocks to a product.

Business Rules

  • Without upc, takes the lowest never-used code from the resolved block.
  • With upc, takes that code; released codes are allowed, codes on another product are not, and the code must belong to one of the company's blocks.
  • The code lands on the product's upc field via the usual product update.

Error Scenarios

  • **NOT_FOUND**: when the product does not exist.
  • **BAD_REQUEST**: when the block is exhausted, the prefix choice is ambiguous, the code is already assigned, or the code is not one the company owns.

Permissions Required

  • products:assign_upc permission
assignProductUpc(
input: AssignProductUpcInput!
): Product

Arguments

assignProductUpc.input ● AssignProductUpcInput! non-null input common

Parameters for AssignProductUpc

Type

Product object products

Represents a product in the catalog, including its specifications, pricing, inventory, supplier relationships, and composition details. Products can be base items, kits, components, or non-inventory items.