Universal Product Code

May 27, 2025 ยท View on GitHub

The Universal Product Code of the item.

Structure

UniversalProductCode

Fields

NameTypeTagsDescriptionGetterSetter
TypeUpcTypeRequiredThe Universal Product Code type.

Constraints: Minimum Length: 1, Maximum Length: 5, Pattern: ^[0-9A-Z_-]+$
UpcType getType()setType(UpcType type)
CodeStringRequiredThe UPC product code of the item.

Constraints: Minimum Length: 6, Maximum Length: 17, Pattern: ^[0-9]{0,17}$
String getCode()setCode(String code)

Example (as JSON)

{
  "type": "UPC-E",
  "code": "code2"
}