question

Bryanne Vega avatar image
Bryanne Vega asked Bryanne Vega commented

Modifier Group De/Association

What's the proper way to update an item's modifier group association?

Is it by calling the modifier_group end or the item end and adding/removing the modifier group from it?

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

Jeffrey Blattman avatar image
Jeffrey Blattman answered Bryanne Vega commented

Can you log in to the web dashboard and perform the same operation and inspect the network requests? What I see is it calling this,

https://www.clover.com/api_docs#!/inv...

Unfortunately it looks like that's completely undocumented, but here's the full URL it posted,

https://www.clover.com/v3/merchants/ZDN4FHWE5K3W4/item_modifier_groups?delete=true

and the payload,

{"elements":[{"item":{"id":"R95R9NWQ1YGF0"},"modifierGroup":{"id":"4XQRN870CJ2F4"}}]}

To do the re-add, it does exactly the same call without the delete=true flag.

Sorry I'm learning too here.

7 comments
10 |2000

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

Bryanne Vega avatar image Bryanne Vega commented ·

You left me at point A.

Do i remove the modifier group from the item and then update the item?

Do I find the modifier group, remove the item ID from the associated items and then update the modifier group?

Or is there a definite end I should call?

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

"Is it by calling the modifier_group end or the item end and adding/removing the modifier group from it?"

Your words, choice #2.

I'd suggest removing the modifier, https://www.clover.com/api_docs#!/ord...

and re-adding the modifier you want, https://www.clover.com/api_docs#!/ord...

Does that work?

0 Likes 0 ·
Bryanne Vega avatar image Bryanne Vega commented ·

Hmm... it would have been nice but I'm not working on the orders directly, rather, I'm working with the inventory itself.

POST /v3/merchants/{mId}/modifier_groups/{modGroupId}/modifiers/{modId}

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

My mistake. You said "item" not "line item". I looked at our code and unfortunately we are using internal APIs to do this with a TODO to use the public SDK. I'll get someone that knows more about this to answer.

0 Likes 0 ·
Bryanne Vega avatar image Bryanne Vega commented ·

Thanks Jeff, awaiting for your reply.

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community