The Usergroups API allows you to manage user groups in your store. This guide provides examples for each endpoint with sample requests and responses.
https://www.venddor.com.br/api
Retrieves a list of all user groups.
curl -X GET 'https://www.venddor.com.br/api/usergroups'
Retrieves details of a specific user group by its ID.
Parameter | Type | Description |
---|---|---|
id* | integer | The unique identifier of the user group |
curl -X GET 'https://www.venddor.com.br/api/usergroups/3'
usergroup_id=3
.
Creates a new user group in the system.
Required fields: type
, status
Available fields: status
, type
, usergroup
Status Code | Description |
---|---|
201 Created |
User group created successfully |
400 Bad Request |
Invalid request parameters |
curl --header 'Content-type: text/plain' -X POST 'https://www.venddor.com.br/api/usergroups' --data-binary 'type=A&status=D&usergroup=Managers'
This example creates a new administrator group
called Managers
. The status of the user group is set to Disabled
.
{ "usergroup_id": 5 }
Updates an existing user group with new properties.
Parameter | Type | Description |
---|---|---|
id* | integer | The unique identifier of the user group to update |
type
, status
status
, type
, usergroup
curl --header 'Content-type: text/plain' -X PUT 'https://www.venddor.com.br/api/usergroups/5' --data-binary 'type=A&status=A'
This example updates the status
of the user group with usergroup_id=5
(the "Managers" group in our case) to Active
.
{ "usergroup_id": 5 }
Deletes a specific user group from the system.
Parameter | Type | Description |
---|---|---|
id* | integer | The unique identifier of the user group to delete |
Status Code | Description |
---|---|
204 No Content |
User group deleted successfully |
400 Bad Request |
User group couldn't be deleted |
404 Not Found |
User group doesn't exist |
curl -X DELETE 'https://www.venddor.com.br/api/usergroups/5'
This example deletes the user group with usergroup_id=5
.