Sample Groups and Users management

These samples show how to manage the creation of groups and users for your sub-accounts.

When you are administrator of a multi store group or association, you can create groups and deactivate them if needed, as well as create users for these groups.

Creation of a new independent sub account

More information about the Group object: Group


PUT
{
 Group:{
  "codeGroup":"TESTAPI2",
  "descrGroup":"Test API creation",
  "idExternal":"my_account_ref",
  "type":"M",
  "managementType":"INDEPENDENT"
 }
}
				

Deactivation of a sub account

In order to deactivate a Group, you must set its dateValidUntil to a date in the past (yesterday is perfect)


PUT
{
 Group:{
  "id":id_of_the_group,
  "dateValidUntil":"2015-12-15 14:00:00"
 }
}
				

Creation of a new user

More information about the User object: User


PUT
{
	User:{
		"gender":"M",
		"name":"Test",
		"firstname":"User",
		"login":"ANewUniqueLogin",
		"password":"NewPassword",
		"role":"BADGER",
		"email":"support@youremail.com",
		"actif":"1",
		"group":{
		  "id":yourGroupId
		}
	}
}
				

Deactivation of a user


PUT
{
	User:{
		"id":id_of_the_user,
		"actif":"0"
	}
}