v1

latestOpenAPI 3.1.02026-08-06118124285.7 KB
Groups

Create group

Create a new group from a given DTO.

post/v2/organisation/groups

Request body

namestring
groupTypestring
parentGroupIdinteger required

Example request

{
  "name": "Stockholm Central",
  "groupType": "unit",
  "parentGroupId": 170300,
  "districtAttributesDto": {
    "districtId": 567,
    "managerId": 1234
  },
  "sectionAttributesDto": {
    "sectionId": 789,
    "managerGroupId": 170305,
    "costCentre": 1001,
    "managerId": 1234
  },
  "unitAttributesDto": {
    "unitId": 170305,
    "address": {
      "country": "SE",
      "address": "123 Main Street",
      "zipCode": "11120",
      "city": "Stockholm",
      "municipality": "Stockholm Municipality",
      "timeZone": "Europe/Stockholm"
    },
    "costCentre": 1001,
    "managerId": 1234,
    "currency": "SEK",
    "publishedTo": "2026-04-20",
    "shiftRules": {
      "maxHoursPerDay": 8,
      "maxHoursPerWeek": 40,
      "minRest": 11,
      "numberOfBreaks": 1
    },
    "shiftRulesDto": {
      "maxHoursPerDay": 8,
      "maxHoursPerWeek": 40,
      "minRest": 11,
      "numberOfBreaks": 1
    }
  }
}

Response

Group created.

idinteger
namestring
groupType'domain' | 'district' | 'unit' | 'section'
parentGroupIdinteger

Example response

{
  "id": 170305,
  "name": "Stockholm Central",
  "groupType": "unit",
  "parentGroupId": 170300,
  "districtAttributesDto": {
    "districtId": 567,
    "managerId": 1234
  },
  "sectionAttributesDto": {
    "sectionId": 789,
    "managerGroupId": 170305,
    "costCentre": 1001,
    "managerId": 1234
  },
  "unitAttributesDto": {
    "unitId": 170305,
    "address": {
      "country": "SE",
      "address": "123 Main Street",
      "zipCode": "11120",
      "city": "Stockholm",
      "municipality": "Stockholm Municipality",
      "timeZone": "Europe/Stockholm"
    },
    "costCentre": 1001,
    "managerId": 1234,
    "currency": "SEK",
    "publishedTo": "2026-04-20",
    "shiftRules": {
      "maxHoursPerDay": 8,
      "maxHoursPerWeek": 40,
      "minRest": 11,
      "numberOfBreaks": 1
    },
    "shiftRulesDto": {
      "maxHoursPerDay": 8,
      "maxHoursPerWeek": 40,
      "minRest": 11,
      "numberOfBreaks": 1
    }
  }
}