Patch User Roles
1 min
PATCH
https://api.upstartcommerce.com/v1/users/user-roles
bodyobjectThe users to update and the role assignments to apply to them.
200All users' roles have been successfully updated.
400The request contained information that the server was unable to process. Appropriate errors are provided in the response body.
401The provided credentials were not valid for this endpoint. It may be that they are expired or that the user's roles are insufficient.
403<p>An update to this resource requires the if-match and if-unmodified-since headers to be sent in order to process the request.</p>
404The requested resource was not found in the NoChannel system.
409The request conflicts with the current state of the resource.
500Internal server error. The server encountered an unexpected condition that prevented it from fulfilling the request.
curl --request PATCH \
--url https://api.upstartcommerce.com/v1/users/user-roles \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"userIds": [],
"userRoles": "{\"tenant-name-1\":{\"roleIds\":[\"catalog.mgmt\"],\"sites\":{\"example-site-name-1\":{\"roleIds\":[\"order.mgmt\"]},\"example-site-name-2\":{\"roleIds\":[\"order.mgmt\"]}}},\"tenant-name-2\":{\"roleIds\":[\"user.mgmt\"],\"sites\":{\"example-site-name-1\":{\"roleIds\":[]},\"example-site-name-2\":{\"roleIds\":[\"inventory.mgmt\"]}}}}"
}'