question

Sean avatar image
Sean asked Sean commented

Updating items of an item group

I'm trying to update an item of an item group. I tried to retrieve that item group with it's items and attributes (GET), changed the price value of one of the items, and re-posted it (POST). But it seems that it didn't work.

I'm wondering whether it's possible or not to do this.

Or do I have to update them separately by using:/v3/merchants/{mId}/items/{itemId} ?

GET /v3/merchants/{mId}/item_groups/{itemGroupId}/?expand=items,attributes

POST /v3/merchants/{mId}/item_groups/{itemGroupId}/?expand=items

return string(783) "{"id": "DWJ1X0KAEBDA0", "name": "Bandana", "items": {"elements": [ {"id": "Q5H3BT6DG42PG", "hidden": false, "itemGroup": {"id": "DWJ1X0KAEBDA0"}, "name": "Bandana black", "alternateName": "", "code": "", "price": 20, "priceType": "PER_UNIT", "defaultTaxRates": true, "unitName": "item", "cost": 15, "isRevenue": true, "stockCount": 100, "modifiedTime": 1478159579000}, {"id": "QTGWX2RKKZPWY", "hidden": false, "itemGroup": {"id": "DWJ1X0KAEBDA0"}, "name": "Bandana white", "alternateName": "", "code": "", "price"...

10 |2000

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

1 Answer

Mark Mullan avatar image
Mark Mullan Deactivated answered Sean commented

Hi Sean,

In Clover's ecosystem, once an item is part of an item group, it can never be moved to another item group, altered, etc., it can only be deleted. You're correct, in that you'll want to update the item via /v3/merchants/{mId}/items/{itemId} and then update its itemGroup accordingly. Hope this helps--

1 comment
10 |2000

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

Sean avatar image Sean commented ·

Hi Mark,

Thank you for the answer. This does help me to understand the item group update a bit. However, I'm still confused on what are considered the best way to update an item group.

Let's say that I have a local web environment that pulls inventory data from Clover by an import function and push it by export function. Some of my Clover inventory are variable products, and I would like to be able to update its options via Clover API. Take its price for example.

How do you suggest I should do it ? What are the steps required to do this ?

Thank you.

0 Likes 0 ·

Welcome to the
Clover Developer Community