Item Use Cases
This guide covers common use cases for managing Items in Hii Retail. Before starting, review the mandatory Item requirements and ensure your service has a valid token as described here.
Add Item
Add Mandatory Item
A mandatory Item is included in the assortment for all relevant Business Units by default. Assigning an Item to a Business Unit Group sets it as IN_ASSORTMENT
for all underlying Business Units.
Exception: If a specific Assortment Policy or Item assignment exists on a lower-level Business Unit Group, it takes precedence.
How to
- Ensure your service has the required API access rights (role with
Create
verb). - Create the JSON payload as per mandatory requirements:
- Set
type
toSTOCK
- Set
assortmentType
toIN-ASSORTMENT
- Set the correct
businessUnitGroupId
orbusinessUnitId
- Add any additional required information
- See API examples
- Set
- Set headers:
Authorization
header with a valid token- Optional:
Correlation-Id
header
- Set
Content-Type
toapplication/json
- Use the
POST
endpoint to send data. - On success, you receive
202 - Accepted
. - Create one or more Item Identifiers (GTIN/EAN barcode)
- Create Price Specifications
Add Non-Mandatory Item
A non-mandatory Item is not in the active assortment by default but is available for inclusion.
How to
- Ensure your service has the required API access rights (role with
Create
verb). - Create the JSON payload as per mandatory requirements:
- Set
itemType
toSTOCK
- Set
assortmentType
toAVAILABLE_ASSORTMENT
- Set the correct
businessUnitGroupId
orbusinessUnitId
- Add any additional required information
- See API examples
- Set
- Set headers as above.
- Use the
POST
endpoint. - On success, you receive
202 - Accepted
. - Create one or more Item Identifiers (GTIN/EAN barcode)
- Create Price Specifications
Replace Item
Replacing an Item overwrites the previous version. All previous data is replaced.
How to
- Ensure your service has the required API access rights (role with
Replace
verb). - Create the complete JSON payload as per mandatory requirements.
- Set headers as above.
- Use the
PUT
endpoint. - On success, you receive
202 - Accepted
.
Update Item
Updating an Item uses JSON Patch to modify specific properties, preserving other data.
How to
- Ensure your service has the required API access rights (role with
Update
verb). - Create a JSON Patch payload for the properties to modify. See JSON Patch format.
- Set headers as above.
- Use the
PATCH
endpoint. - On success, you receive
202 - Accepted
.
Example JSON Patch payload
[
{ "op": "replace", "path": "/name", "value": "New Name" },
{ "op": "add", "path": "/additionalProperties/-", "value": {"Code": "G-22", "DataType": "STRING", "Name": "New Additional Property", "UniqueId": "Acme.CustomProperty10", "Value": "G-22" } },
{ "op": "replace", "path": "/additionalProperties/4", "value": {"DataType": "INT", "Name": "Existing Additional Property", "UniqueId": "Acme.CustomProperty4", "Value": "246" } },
{ "op": "remove", "path": "/description" }
]
Create Deposit Item
A Deposit Item adds a reverse vending deposit amount to the sales receipt. Usually, only one such Item is needed.
How to
- Ensure your service has the required API access rights (role with
Create
verb). - Create the JSON payload as per mandatory requirements:
- Set
type
toDEPOSIT
- Set the correct
businessUnitGroupId
orbusinessUnitId
- Add a reverse vending Item Identifier
- Add any additional required information
- See API examples
- Set
- Set headers as above.
- Use the
POST
endpoint. - On success, you receive
202 - Accepted
. - Create a reverse vending Additional Item Id
Move Item into Assortment
To move an Item into assortment for a Business Unit, update its assortmentType
.
Update assortment for an individual Item
- The Item must already exist.
- Ensure your service has the required API access rights (role with
Update
orReplace
verb). - Replace or update the Item:
- Set
assortmentType
toIN-ASSORTMENT
- Set the correct
businessUnitGroupId
orbusinessUnitId
- See API examples for PUT and PATCH
- Set
- Set headers as above.
- Use the
PUT
orPATCH
endpoint. - On success, you receive
202 - Accepted
.
Update assortment for several Items at once
Use the Assortment Profile input API to update multiple Items.
- Items must already exist.
- Ensure your service has the required API access rights (role with
Create
,Update
, orReplace
verb). - Create the Assortment Policy payload, including all Items to update.
- Set
assortmentType
toIN-ASSORTMENT
- Set the correct
businessUnitGroupId
orbusinessUnitId
- See API examples
- Set
- Set headers as above.
- Use the API endpoint.
- On success, you receive
202 - Accepted
.
Set Age Restriction
How to
Define Replacement Item
A replacement Item takes over for an existing Item (e.g., when an Item is discontinued).
How to
- Update the old Item's
Status
as needed. - Create the new Item as described above.
- Create an Item Link between the two Items:
- Ensure your service has the required API access rights (role with
Create
verb). - Create the Item Link payload:
- Set
linkType
toREPLACEMENT
- Set the correct
businessUnitGroupId
orbusinessUnitId
- See API examples
- Set
- Set headers as above.
- Use the
CREATE
endpoint. - On success, you receive
202 - Accepted
.
- Ensure your service has the required API access rights (role with