Skip to main content
POST
/
customer
/
{customerId}
/
group
Add Group
curl --request POST \
  --url https://api.masternautconnect.com/connect-webservices/services/public/v1/customer/{customerId}/group \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json;charset=UTF-8' \
  --data '
{
  "name": "Group Name",
  "parentId": "parentGroupId"
}
'
{
  "id": "groupID",
  "name": "group-name",
  "parentId": "rootGroupId",
  "path": "rootGroupId.groupID",
  "vehicleIds": [
    "vehicleID1",
    "vehicleID2"
  ],
  "personIds": [
    "personID1",
    "personID2"
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json;charset=UTF-8
name
string
required

The name for the group - name must not contain any of the characters <>?"/|%{}*[]

Example:

"Group Name"

parentId
string

Unique, unchangeable system generated identifier (alphanumeric) for the parent of this group.
this value is mandatory, a new top root node for the hierarchy cannot be created.

Example:

"parentGroupId"

Response

Newly created group

id
string
required

Unique, unchangeable system generated identifier (alphanumeric) of the group.

Example:

"groupID"

name
string

Name of the group.

Example:

"group-name"

parentId
string

Unique, unchangeable system generated identifier (alphanumeric) for the parent of this group.
Not included for the root group in the hierarchy.

Example:

"rootGroupId"

path
string

List of the unique, unchangeable system generated identifiers (alphanumeric) for all the parent groups (starting from the root node) of this group, separated by full stops.
The list includes the identifier for this group.

Example:

"rootGroupId.groupID"

vehicleIds
string[]

Array of unique, unchangeable system generated identifiers (alphanumeric) for the vehicles assigned to this group.
Wil be an empty array for a newly created group.

Example:
["vehicleID1", "vehicleID2"]
personIds
string[]

Array of unique, unchangeable system generated identifiers (alphanumeric) for the drivers and web users assigned to this group.
Wil be an empty array for a newly created group.

Example:
["personID1", "personID2"]