question

manoj.pande@bnt-soft.com avatar image
manoj.pande@bnt-soft.com asked ·

​How to create itemGroup on clover web portal and on mini device on Sandbox account ?

Greetings

How to create itemGroup on clover web portal and on mini device on Sandbox account ?
Inventory
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

zgreathouse avatar image
zgreathouse answered ·
There is not a way of creating itemGroups through the Merchant Dashboard currently, however it is possible to create an itemGroup (also referred to as "Item with Variants") using the RestAPI or the Clover Inventory Application.

To create an itemGroup through the Inventory App, simply open the app on your Clover device and select "Add Item with Variants" and follow the app's flow. ( see Inventory Application docs)

The flow to accomplish this through the Rest API is to do the following:
Step 1: Create Item Group
POST /v3/merchants/{mId}/item_groups
//example request body
{ 
     "name": "Hoodie" 
}
Step 2: Create Attributes for Item Group
POST /v3/merchants/{mId}/attributes
//example request body
{ 
     "name": "Color", 
     "itemGroup": {"id": "*************"}
}
Step 3: Create Options for each Attribute
POST /v3/merchants/{mId}/attributes/{attributeId}/options
//example request body
{
     "name": "Gray"
     "attribute": {"id": "*************"}
}
Step 4: Create Item initialized with the ItemGroup created in Step 1(create enough for every option combination you wish to have)
POST /v3/merchants/{mId}/items
//example request body
{     
     "name": "hoodie",
     "price": 3999,
     "itemGroup": {"id": "*************"}
}
Step 5: Create associations between items and options.
POST /v3/merchants/{mId}/option_items
//example request body
{
     "elements" : [
          {
               "item": {"id": "*************"},               
               "option": {"id": "*************"}          
          }
     ]
}
Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community