question

spmolina avatar image
spmolina asked Mark Mullan Deactivated answered

Updating Employees via REST API

We are trying to update employees in Clover via the REST APIs and while we can update the nickname and pin fields, we cannot update the name or role fields.

We pass it this string: {"name":"Nikolas","nickname":"Nick","pin":"0001","role":"MANAGER"}

We also tried retrieving the specific role id and passing the string as: {"name":"Nikolas","nickname":"Nick","pin":"0001","roles":["id":"ABCDEFGHIJ"]}

And it does not reject it outright, but it is not updating the name or role fields either.

We can create an employee with that same string and everything go across, it is the updating that is failing.

Can you please let me know what is going on here?

Thanks.

Employees
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

Hi,

If you're looking to update an employee's role, please do so at https://clover.com/employees/m/{mId}/roles. Changing an employee's role is CSRF protected through this form, so you'll unable to update this employee's role by making a request to the Clover REST API.

Per https://help.clover.com/instruction/e..., you'll be unable to change an employee's Name and Email once that user has been created. Please make another Employee with the name you're looking to change to, and you can remove the deprecated Employee through the first link.

As you've already noticed, some Employee fields like the nickname and PIN can be changed directly through the REST API. Please let me know if there's anything else I can help you with!

Thanks,

Mark

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