Skip to main content

Getting Started with Items

This guide walks you through creating Items on the Hii Retail platform. By the end of this guide, you will understand how to create items, associate them with Item Categories, and make them available to Business Units through assortments.

Overview

What is an Item?

An Item is the core entity for master data management in Hii Retail. It represents any product or service that may be priced, ordered, or sold in your retail operations.

Items connect to several other entities in the system:

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│ Item Category │────▶│ Item │◀────│ Business Unit │
└─────────────────┘ └────────┬────────┘ └─────────────────┘

┌──────────────────┼──────────────────┐
▼ ▼ ▼
┌────────────┐ ┌────────────┐ ┌────────────┐
│ Identifier │ │ Price │ │ Deposit │
│ (barcode) │ │ │ │ (optional) │
└────────────┘ └────────────┘ └────────────┘

Item Types

TypeDescriptionExample
STOCKStandard retail item tracked for sales and inventoryBottled water, shoes, electronics
SERVICENon-stock item provided as a serviceGift wrapping, alterations
MODELGrouping for fashion/sport items; not directly sold"Air Jordan 1" (parent of size variants)
DEPOSITUsed for deposit receipts from reverse vending machinesBottle deposit return
SERIALIZEDOne-off items with unique codesGift cards, lottery tickets

Item Statuses

StatusDescription
ACTIVEItem is active and available for normal use
DISCONTINUEDItem is deprecated but may still be sold to clear stock
DELETEDItem is deleted and should not be used
STOPPEDItem is recalled and must not be sold

Assortment Types

Assortment determines where an item is available for sale:

TypeDescription
IN_ASSORTMENTItem is in the active assortment and propagates to all Business Units under the group
AVAILABLE_ASSORTMENTItem is available to add to assortment, but not automatically propagated
IN_LOCAL_ASSORTMENTItem is specific to a single Business Unit (locally managed)
EXPIRING_ASSORTMENTItem will be removed from assortment after a sell-out grace period
REMOVE_FROM_ASSORTMENTItem is removed from all assortments

Prerequisites

Before you begin, ensure you have:

  1. Business Units created: At least one Business Unit or Business Unit Group (see Business Units guide)
  2. Item Categories created: At least one Item Category to assign to your items (see Item Categories guide)
  3. Authentication Token: A valid JWT bearer token with the pnp.item.create permission
Authentication

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

API Base URL

All Item Input API requests should be sent to:

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

Step 1: Create a Simple Item

Create a basic stock item and assign it to an Item Category and Business Unit Group.

Required Fields

FieldTypeDescription
idstringUnique identifier (max 250 characters)
namestringDisplay name (2-256 characters)
statusstringACTIVE, DISCONTINUED, DELETED, or STOPPED
typestringSTOCK, SERVICE, MODEL, DEPOSIT, or SERIALIZED
itemCategoryIdstringReference to an existing Item Category
salesUnitOfMeasurementstringUnit of measure (e.g., EA, KGM, LTR)
assortmentTypestringDetermines availability (see Assortment Types above)
businessUnitGroupIdstringThe Business Unit Group where the item is available

Code Examples

curl -X POST 'https://item-input.retailsvc.com/api/v2/bu-g-items' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "5449000051578",
"name": "Fanta Orange 500ml",
"status": "ACTIVE",
"type": "STOCK",
"itemCategoryId": "beverages-soft-drinks",
"salesUnitOfMeasurement": "EA",
"assortmentType": "IN_ASSORTMENT",
"businessUnitGroupId": "acme-retail-group"
}'

Response

A successful request returns 202 Accepted.

Asynchronous Processing

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

To verify your item was created successfully, query the Item API (read endpoint) after a short delay.

Step 2: Add Item Identifiers (Barcodes)

Items typically need one or more identifiers (barcodes) for scanning at POS. You can include identifiers when creating the item.

Identifier Types

TypeDescriptionExample
GTIN1313-digit Global Trade Item Number (EAN-13)5449000051578
GTIN1212-digit Global Trade Item Number (UPC-A)049000051578
GTIN88-digit Global Trade Item Number (EAN-8)96385074
GTIN1414-digit Global Trade Item Number15449000051575
PLUPrice Look-Up code (for produce)4011
SKUStock Keeping UnitFANTA-ORG-500

Code Examples

curl -X POST 'https://item-input.retailsvc.com/api/v2/bu-g-items' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "5449000051578",
"name": "Fanta Orange 500ml",
"status": "ACTIVE",
"type": "STOCK",
"itemCategoryId": "beverages-soft-drinks",
"salesUnitOfMeasurement": "EA",
"assortmentType": "IN_ASSORTMENT",
"businessUnitGroupId": "acme-retail-group",
"identifiers": [
{
"id": "5449000051578",
"value": "5449000051578",
"type": "GTIN13",
"status": "ACTIVE",
"isPrimary": true
},
{
"id": "FANTA-ORG-500",
"value": "FANTA-ORG-500",
"type": "SKU",
"status": "ACTIVE",
"isPrimary": false
}
]
}'

Step 3: Create a Weight-Based Item

For items sold by weight (like produce), use the appropriate unit of measure and configure identifiers for scales.

Common Units of Measurement

CodeDescription
EAEach (single unit)
KGMKilogram
GRMGram
LTRLiter
MLTMilliliter
MTRMeter

Code Examples

curl -X POST 'https://item-input.retailsvc.com/api/v2/bu-g-items' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "PLU-4011",
"name": "Bananas",
"status": "ACTIVE",
"type": "STOCK",
"itemCategoryId": "produce-fruit",
"salesUnitOfMeasurement": "KGM",
"referencePriceUnitOfMeasurement": "KGM",
"referencePriceConversionFactor": 1.0,
"netContent": 1.0,
"assortmentType": "IN_ASSORTMENT",
"businessUnitGroupId": "acme-retail-group",
"identifiers": [
{
"id": "4011",
"value": "4011",
"type": "PLU",
"status": "ACTIVE",
"isPrimary": true,
"description": "PLU code for cashier keyboard"
},
{
"id": "2004011000002",
"value": "2004011000002",
"type": "GTIN13",
"status": "ACTIVE",
"isPrimary": false,
"description": "Variable weight barcode for scales"
}
]
}'

Step 4: Create an Item for a Specific Business Unit

To create an item available only at a specific Business Unit (not inherited from a group), use the Business Unit endpoint.

curl -X POST 'https://item-input.retailsvc.com/api/v2/bu-items' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "LOCAL-SPECIAL-001",
"name": "Store Special - Fresh Baked Bread",
"status": "ACTIVE",
"type": "STOCK",
"itemCategoryId": "bakery-bread",
"salesUnitOfMeasurement": "EA",
"assortmentType": "IN_LOCAL_ASSORTMENT",
"businessUnitId": "store-123",
"identifiers": [
{
"id": "LOCAL-SPECIAL-001",
"value": "2099999000001",
"type": "GTIN13",
"status": "ACTIVE",
"isPrimary": true
}
]
}'
Business Unit Group vs Business Unit
  • Use POST /api/v2/bu-g-items with businessUnitGroupId to create items that inherit to all Business Units in the group
  • Use POST /api/v2/bu-items with businessUnitId to create items specific to a single Business Unit

Step 5: Update an Item

Use PUT to fully replace an item or PATCH for partial updates.

Partial Update (PATCH)

curl -X PATCH 'https://item-input.retailsvc.com/api/v2/bu-g-items/5449000051578?businessUnitGroupId=acme-retail-group' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json-patch+json' \
-d '[
{"op": "replace", "path": "/name", "value": "Fanta Orange 500ml (New Recipe)"},
{"op": "replace", "path": "/description", "value": "Refreshed with a new recipe!"}
]'
Immutable Properties

The id, businessUnitGroupId, revision, and identifiers properties cannot be updated via PATCH.

Step 6: Remove an Item from Assortment

To remove an item from sale, you can either change its assortment type or delete it.

Change Assortment Type

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

Delete an Item

curl -X DELETE 'https://item-input.retailsvc.com/api/v2/bu-g-items/5449000051578?businessUnitGroupId=acme-retail-group' \
-H 'Authorization: Bearer <your-access-token>'

Understanding Inheritance

When you create an item at the Business Unit Group level with assortmentType: "IN_ASSORTMENT":

  1. The item definition is stored at the group level
  2. The item automatically propagates to all Business Units within that group
  3. Each Business Unit receives its own copy that can be locally modified if needed
┌─────────────────────────────────────────────────────────┐
│ Business Unit Group │
│ "acme-retail-group" │
│ │
│ Item: Fanta Orange (assortmentType: IN_ASSORTMENT) │
└────────────────────────┬────────────────────────────────┘

┌───────────────┼───────────────┐
▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌─────────┐
│ Store A │ │ Store B │ │ Store C │
│ (BU) │ │ (BU) │ │ (BU) │
│ │ │ │ │ │
│ ✓ Fanta │ │ ✓ Fanta │ │ ✓ Fanta │
└─────────┘ └─────────┘ └─────────┘

Next Steps

Now that you can create items, you can:

  1. Add prices: Configure pricing for your items using the Price Input API
  2. Configure taxes: Set up tax rates for your items
  3. Add deposits: Configure deposit rules for returnable items

Next: Item Identifiers - Learn how to create barcodes and other identifiers for your items.