Skip to main content

Getting Started with Item Identifiers

This guide walks you through creating and managing Item Identifiers on the Hii Retail platform. By the end of this guide, you will understand how to add barcodes and other identifiers to your Items for scanning at POS terminals, mobile apps, and other touchpoints.

Overview

What is an Item Identifier?

An Item Identifier is an identification code associated with an Item. While GS1 standards typically use GTINs (8-14 digit barcodes), Hii Retail supports various identifier types including PLU codes, QR codes, SKUs, and more.

Item Identifiers enable:

  • Barcode scanning at POS terminals
  • Product lookup in mobile apps
  • Inventory management
  • Supply chain tracking
┌─────────────────┐
│ Item │
│ "Fanta Orange" │
└────────┬────────┘

│ has many

┌─────────────────────────────────────────────────┐
│ Item Identifiers │
├─────────────────┬─────────────────┬─────────────┤
│ GTIN13 │ SKU │ PLU │
│ 5449000051578 │ FANTA-ORG-500 │ 4011 │
│ (primary) │ │ │
└─────────────────┴─────────────────┴─────────────┘

Identifier Types

TypeDescriptionExample
GTIN88-digit Global Trade Item Number96385074
GTIN1212-digit Global Trade Item Number (UPC-A)049000051578
GTIN1313-digit Global Trade Item Number (EAN-13)5449000051578
GTIN1414-digit Global Trade Item Number15449000051575
GTINGeneric GTIN (auto-mapped to correct type)5449000051578
PLUPrice Look-Up code (for produce)4011
SKUStock Keeping Unit (not for barcodes)FANTA-ORG-500
QRQR code (matrix barcode)URL or identifier string
ECC200DataMatrix-200 (2D barcode)Up to 2,335 characters
ECC140DataMatrix-140 (legacy 2D barcode)Up to 1,556 bytes
ISBNInternational Standard Book Number9780201379624
ISSNInternational Standard Serial Number03785955
RFIDRadio-frequency identification tagTag identifier
UUIDUniversally Unique Identifiera935d02c-cc65-4bdd-b566-d09c546567cf
NONSTANDARDFor unsupported identifier typesCustom codes
GTIN Validation

All GTIN types are validated for correct length and check digit. Duplicate GTINs within your tenant are rejected (except for variable measure ranges with prefixes 02, 20-29). Invalid GTINs trigger a Customer Notification event.

The Generic GTIN Type

If your source system doesn't specify the exact GTIN length, use the GTIN type. Hii Retail will automatically map it to the correct type based on the value:

  • A 13-digit value with leading zero → GTIN13
  • A 12-digit value without leading zero → GTIN12
  • And so on for other lengths

Identifier Statuses

StatusDescription
ACTIVEIdentifier is active and available for use
DELETEDIdentifier is deleted and should not be used

Prerequisites

Before you begin, ensure you have:

  1. Items created: At least one Item to associate identifiers with (see Items guide)
  2. Business Units created: At least one Business Unit or Business Unit Group (see Business Units guide)
  3. Authentication Token: A valid JWT bearer token with the pnp.item-identifier.create permission
Authentication

For details on obtaining an access token, see the OAuth2 Authentication documentation.

API Base URL

All Item Identifier Input API requests should be sent to:

https://item-identifier-input.retailsvc.com/api/v2

Step 1: Create a GTIN Identifier

Create a standard GTIN-13 barcode identifier for an Item at the Business Unit Group level.

Required Fields

FieldTypeDescription
idstringUnique identifier (max 250 characters)
valuestringThe barcode value
typestringIdentifier type (e.g., GTIN13)
itemIdstringThe Item this identifier belongs to
statusstringACTIVE or DELETED
isPrimarybooleanWhether this is the primary identifier for the Item
businessUnitGroupIdstringThe Business Unit Group where this identifier applies

Code Examples

curl -X POST 'https://item-identifier-input.retailsvc.com/api/v2/bu-g-item-identifiers' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "5449000051578",
"value": "5449000051578",
"type": "GTIN13",
"itemId": "fanta-orange-500ml",
"status": "ACTIVE",
"isPrimary": true,
"businessUnitGroupId": "acme-retail-group"
}'

Response

A successful request returns 202 Accepted.

Asynchronous Processing

The Item Identifier Input API processes requests asynchronously. A 202 Accepted response means your request has been queued for processing, not that the identifier has been created yet.

Step 2: Add Multiple Identifiers to an Item

Items often need multiple identifiers. For example, a product might have both a GTIN barcode and an internal SKU.

# Add primary GTIN-13 barcode
curl -X POST 'https://item-identifier-input.retailsvc.com/api/v2/bu-g-item-identifiers' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "5449000051578",
"value": "5449000051578",
"type": "GTIN13",
"itemId": "fanta-orange-500ml",
"status": "ACTIVE",
"isPrimary": true,
"businessUnitGroupId": "acme-retail-group"
}'

# Add secondary SKU identifier
curl -X POST 'https://item-identifier-input.retailsvc.com/api/v2/bu-g-item-identifiers' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "SKU-FANTA-ORG-500",
"value": "FANTA-ORG-500",
"type": "SKU",
"itemId": "fanta-orange-500ml",
"status": "ACTIVE",
"isPrimary": false,
"businessUnitGroupId": "acme-retail-group"
}'
Primary Identifier

Each Item should have exactly one primary identifier (isPrimary: true). The primary identifier is used as the default barcode for the Item.

Step 3: Create a PLU Identifier for Produce

Price Look-Up (PLU) codes are commonly used for produce items sold by weight.

curl -X POST 'https://item-identifier-input.retailsvc.com/api/v2/bu-g-item-identifiers' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "PLU-4011",
"value": "4011",
"type": "PLU",
"itemId": "bananas",
"status": "ACTIVE",
"isPrimary": true,
"businessUnitGroupId": "acme-retail-group",
"description": "PLU code for bananas - used at cashier keyboard"
}'

Step 4: Create a Store-Specific Identifier

To create an identifier that only applies to a specific Business Unit (not inherited from a group), use the Business Unit endpoint.

curl -X POST 'https://item-identifier-input.retailsvc.com/api/v2/bu-item-identifiers' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "LOCAL-BREAD-001",
"value": "2099999000001",
"type": "GTIN13",
"itemId": "store-baked-bread",
"status": "ACTIVE",
"isPrimary": true,
"businessUnitId": "store-123"
}'
Business Unit Group vs Business Unit
  • Use POST /api/v2/bu-g-item-identifiers with businessUnitGroupId to create identifiers that inherit to all Business Units in the group
  • Use POST /api/v2/bu-item-identifiers with businessUnitId to create identifiers specific to a single Business Unit

Step 5: Update an Identifier

Use PATCH for partial updates to an identifier. Note that id, value, itemId, and businessUnitGroupId are immutable.

curl -X PATCH 'https://item-identifier-input.retailsvc.com/api/v2/bu-g-item-identifiers/5449000051578?businessUnitGroupId=acme-retail-group' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json-patch+json' \
-d '[
{"op": "replace", "path": "/description", "value": "Updated barcode description"},
{"op": "replace", "path": "/isPrimary", "value": false}
]'
Immutable Properties

The id, businessUnitGroupId, revision, itemId, and value properties cannot be updated via PATCH. To change these, delete the identifier and create a new one.

Step 6: Delete an Identifier

Delete an identifier when it's no longer needed. By default, this performs a soft-delete (sets status to DELETED).

# Soft delete (default)
curl -X DELETE 'https://item-identifier-input.retailsvc.com/api/v2/bu-g-item-identifiers/5449000051578?businessUnitGroupId=acme-retail-group' \
-H 'Authorization: Bearer <your-access-token>'

# Hard delete (permanent)
curl -X DELETE 'https://item-identifier-input.retailsvc.com/api/v2/bu-g-item-identifiers/5449000051578?businessUnitGroupId=acme-retail-group&permanent=true' \
-H 'Authorization: Bearer <your-access-token>'

Working with 2D Barcodes

For QR codes and DataMatrix barcodes, the value can be longer than traditional barcodes. When the value exceeds 250 characters, you must use a different id (not the value itself).

curl -X POST 'https://item-identifier-input.retailsvc.com/api/v2/bu-g-item-identifiers' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "QR-PRODUCT-12345",
"value": "https://example.com/products/12345?utm_source=qr&data=extended",
"type": "QR",
"itemId": "product-12345",
"status": "ACTIVE",
"isPrimary": false,
"businessUnitGroupId": "acme-retail-group"
}'

Next Steps

Now that you can create Item Identifiers, you can:

  1. Add prices: Configure pricing for your items using the Price Input API
  2. Set up scanning: Configure your POS terminals to recognize the identifiers
  3. Monitor duplicates: Subscribe to External Events for duplicate GTIN notifications

Next: Prices - Learn how to create and manage price specifications for your items.