question

jeff-davies avatar image
jeff-davies asked chanel Deactivated commented

My REST call to get all employees is not returning data

Hi all, I'm making a call to get all employees for my merchant id:

https://api.clover.com:443/v3/merchants/{merchant id}/employees

I definitely have employees defined in Clover. When I makes the call in the Clover REST API page, the response body returns "no content" and the response code is zero. I am not specifying any filters. I have the same problem when getting shifts.

Oddly enough, when testing the Order under the Employee section of that API page, that call works fine:

https://api.clover.com:443/v3/merchants/{merchant id}/employees/{employee id}/orders

Any ideas what I can be doing wrong? Is anyone else seeing this behavior?

Employees
6 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.

Miguel avatar image Miguel commented ·

Is your merchant on sandbox or production US or EU? If sandbox, make sure you are using https://apisandbox.dev.clover.com

0 Likes 0 ·
jeff-davies avatar image jeff-davies commented ·

Its US and production. The second URI that I posted does work. If I give it an employee ID, it will return a list of orders for the employee. Its only the first URI that doesn't work for me, getting the list of employees. Thanks!

0 Likes 0 ·
Miguel avatar image Miguel commented ·

Hi Jeff, are you using our REST API docs to use the query? If so, you might want to try to use another application like Postman to query our REST API. It should provide a more detailed response.

0 Likes 0 ·
jeff-davies avatar image jeff-davies commented ·

POSTMAN shows the response as being 401: Unauthorized. Here is the URL:

https://api.clover.com:443/v3/merchants/{mid}/employees?access_token={accessToken}

My app has access to the employees. That same access token is used to successfully get orders and payments for the same merchant id. Is there another setting that I'm unaware of? Thanks for your help with this!

0 Likes 0 ·
Miguel avatar image Miguel commented ·

Hi Jeff, can you email dev@clover.com with your merchant ID, and we can investigate further. Also, I removed your access token from your comment above. They shouldn't be shared publicly.

0 Likes 0 ·
Show more comments
davecutts avatar image
davecutts answered

Have you tried cURL? what is the response if you use a cURL request?

10 |2000

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

knikhil avatar image
knikhil answered chanel Deactivated commented
https://api.clover.com:443/v3/merchants/RCTST00000...
Im using this url to get the full employee but its showing {"message":"401 Unauthorized"}
10 |2000

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