POST/ groups

This API is used to create new employee groups. Employee groups represent individual nodes within the organization’s hierarchical structure and are used to categorize a collection of employees. The hierarchy is comprised of between one and five levels as defined by the organization. The organization may create levels for the following types of data stored in Guardian: locations, legal entities, and custom fields.

Values and relationships of attributes are represented in a hierarchical fashion within Guardian such that an employee group at a higher level in the hierarchy represents a larger set of employees than a group appearing lower in the structure (i.e. an employee group defined by more attributes).

Group creation assumes the attributes used to define the new employee group already exist (i.e. a specific location, legal entity, and/or custom field choice). The POST must include all parent attributes that define the employee group, provided in hierarchical order from highest (i.e. “level 1”) to lowest.

 

Method

POST

 

Resource Information

Requires authentication? YES
Request formats JSON
Response formats JSON

 

Parameters

Parameter Label Description Type Max Length Required
id Guardian system generated unique key int N/A
name Name This field is returned in the response and represents name of the existing system attribute for which an employee group was created string N/A N/A
value Value The value of the employee group attribute. Depending on the type of data, the value is either a string or a system generated integer:
Custom field: attribute’s string value
Location: attribute’s Guardian integer value (ID)
Legal Entity: attribute’s Guardian integer value (ID)
string/int Yes
parent Parent List of parent attributes that relate to the new employee group node. List is provided in hierarchical order separated by comma and attributes are identified by string or integer depending on the type of data the parent attribute represents:
Custom field: attribute’s string value
Location: attribute’s Guardian integer value (ID)
Legal Entity: attribute’s Guardian integer value (ID)
string/int Yes

 

Example

Request Example

POST https://<server>/v1/groups

{
"value": "358860",
"parent":[
"2664"
]
}

 

Response Example

{
 ""id"": 12345,
 ""name"": ""Los Angeles""
}