question

bandrebandre avatar image
bandrebandre asked bandrebandre commented

How do you find the "Device ID"?

Pretty simple. How do you find the Device ID? As mentioned here: https://www.clover.com/api_docs#!/cas...

Can it be found by accessing the physical device? Can it be found in the Clover account UI? What about by API call?

Thank you.

10 |2000

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

hj02 avatar image
hj02 answered bandrebandre commented

The Device ID can be located through the web dashboard of the desired merchant. Go to the setup app and then click devices (third item on the left sidebar). All available devices for that merchant should be listed. I don't know about the API or the physical device.

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.

bandrebandre avatar image bandrebandre commented ·

Though you are correct that going to setup --> devices gives a list of "device IDs," this value is actually NOT the device ID as required by the clover API doc link that I posted. I did initially try the value that was on the page that you refer to, but the Clover API returned Unauthorized. I later did a query for all the device IDs associated with the merchant account, and it returned a value that was formatted completely differently. There were hyphens in it and it was longer.

Is there any way to get the actual, useful device ID? (Also, why the heck are there two device Ids?)

0 Likes 0 ·
bandrebandre avatar image
bandrebandre answered

Thanks for your answer.

Isn't there some way to check on the actual device? The problem with this method is that if you have multiple clovers of the same type, you have no way of knowing which device has which ID. Setup --> Devices is just a list of the device type with the ID next to it. If you're dealing with 10+ clovers per merchant (which I am) then you can imagine the problem.

10 |2000

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

Mike M avatar image
Mike M answered bandrebandre commented

So Clover devices have 2 types of ID: Serial Number (starts with a C) and ID (hash).

In order to get the Serial Number (the one that shows up when you use adb devices) programmatically, just pull from android.os.Build.SERIAL.

In order to get the device ID for Clover's device-specific API calls, they can use the API method GET /v3/merchants/{mId}/devices to get a list of all devices for a merchant, then iterate through the list to filter by the Serial Number found using the method above.

8 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.

bandrebandre avatar image bandrebandre commented ·

Thanks for the answer.

It would alleviate some confusion if the web forms referred to the serial number as the serial number instead of as the device ID.

Screenshot: http://imgur.com/wVgEmyr

0 Likes 0 ·
Mike M avatar image Mike M commented ·

Haha yeah I see what you are saying; I've opened up a jira ticket per your feedback.

0 Likes 0 ·
meerchant avatar image meerchant commented ·

Build.SERIAL does match the ID in parenthesis under Device Info: in the Help app of the device. I do also see that same value under the Serial Number column of the Manage Devices section of the web dashboard. (at least in the developer sandbox)

0 Likes 0 ·
bandrebandre avatar image bandrebandre commented ·

@mike, I have a followup to this.

The API method that you referred to in your answer is not included in the API documentation. It should be added. https://www.clover.com/api_docs#!/mer...

0 Likes 0 ·
Mike M avatar image Mike M commented ·

Good point! I'll make a ticket to get that fixed. Thanks for the feedback @bandrebandre

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community