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
Createverb). - Create the JSON payload as per mandatory requirements:
- Set
typetoSTOCK - Set
assortmentTypetoIN-ASSORTMENT - Set the correct
businessUnitGroupIdorbusinessUnitId - Add any additional required information
- See API examples
- Set
- Set headers:
Authorizationheader with a valid token- Optional:
Correlation-Idheader
- Set
Content-Typetoapplication/json - Use the
POSTendpoint 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
Createverb). - Create the JSON payload as per mandatory requirements:
- Set
itemTypetoSTOCK - Set
assortmentTypetoAVAILABLE_ASSORTMENT - Set the correct
businessUnitGroupIdorbusinessUnitId - Add any additional required information
- See API examples
- Set
- Set headers as above.
- Use the
POSTendpoint. - 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
Replaceverb). - Create the complete JSON payload as per mandatory requirements.
- Set headers as above.
- Use the
PUTendpoint. - 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
Updateverb). - Create a JSON Patch payload for the properties to modify. See JSON Patch format.
- Set headers as above.
- Use the
PATCHendpoint. - 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
Createverb). - Create the JSON payload as per mandatory requirements:
- Set
typetoDEPOSIT - Set the correct
businessUnitGroupIdorbusinessUnitId - Add a reverse vending Item Identifier
- Add any additional required information
- See API examples
- Set
- Set headers as above.
- Use the
POSTendpoint. - 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
UpdateorReplaceverb). - Replace or update the Item:
- Set
assortmentTypetoIN-ASSORTMENT - Set the correct
businessUnitGroupIdorbusinessUnitId - See API examples for PUT and PATCH
- Set
- Set headers as above.
- Use the
PUTorPATCHendpoint. - 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, orReplaceverb). - Create the Assortment Policy payload, including all Items to update.
- Set
assortmentTypetoIN-ASSORTMENT - Set the correct
businessUnitGroupIdorbusinessUnitId - 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
Statusas 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
Createverb). - Create the Item Link payload:
- Set
linkTypetoREPLACEMENT - Set the correct
businessUnitGroupIdorbusinessUnitId - See API examples
- Set
- Set headers as above.
- Use the
CREATEendpoint. - On success, you receive
202 - Accepted.
- Ensure your service has the required API access rights (role with