question

dhanaraj avatar image
dhanaraj asked ramya commented

How to get tagitem from clover sdk v3 version.

I want to get the label values and return the tag items.
Inventory
10 |2000

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

Raymond Lee avatar image
Raymond Lee Deactivated answered dhanaraj commented
You can use the following GetTags endpoint to get the tags that a merchant has:
GET /v3/merchants/{mId}/tags

You can get a specific tag using the GetTag endpoint with the tag ID:
GET /v3/merchants/{mId}/tags/{tagId}

To get the items under a tag(s), you can expand the items field:
GET /v3/merchants/{mId}/tags?expand=items
GET /v3/merchants/{mId}/tags/{tagId}?expand=items

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.

dhanaraj avatar image dhanaraj commented ·

I need to get tags from offline, instead of getting from API.

0 Likes 0 ·
Raymond Lee avatar image
Raymond Lee Deactivated answered ramya commented
For getting tags from Android SDK, you can use the InventoryConnector:
https://clover.github.io/clover-android-sdk/com/cl...

You can then get the name from each tag using the getName() method from the Tag object:
https://clover.github.io/clover-android-sdk/com/cl...

Here is sample code:
for (Tag tag : mInventoryConnector.getTags()) {
                
Log.d("TAG", tag.getName()); }

For getting the items under each tag, it currently looks like the Tag's getItems() method has a bug and returns null, I will file a ticket to have that fixed.

A workaround for now would be to use the InventoryConnector's getItems() method to get each item to retrieve the tags for each item, and build a mapping of items to each tag.
5 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.

dhanaraj avatar image dhanaraj commented ·

@Raymond Lee Is there any updates regarding this issue.

0 Likes 0 ·
Raymond Lee avatar image Raymond Lee dhanaraj commented ·

@Dhanaraj Currently no updates, once the bug is fixed, it will be in our release notes.

0 Likes 0 ·
ramya avatar image ramya Raymond Lee commented ·

Hi Raymond,
Is there any update for above issue, I want to get Tag's getPrinters also but returning null.

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community