---
title: "Replace a unit group"
method: PUT
path: "/inventory/v1/unit-groups/{id}"
tags: ["UnitGroup"]
---

# Replace a unit group

`PUT /inventory/v1/unit-groups/{id}`

Use this call to modify a unit group.<br>You must have at least one of these scopes: 'unitgroups.manage, setup.manage'.

## Path parameters

- `id` string, required

## Request body

- ReplaceUnitGroupModel
  - `name` object, required — The name for the unit group
  - `description` object, required — The description for the unit group
  - `maxPersons` integer — Maximum number of persons for the unit group. If this value is increased, the surcharges for the related rate plans must be specified in order for the rate plans to be sellable for the new possible occupancies.
  - `rank` integer, nullable — The unit group rank Restrictions: - Should be greater or equal to one
  - `connectedUnitGroups` ReplaceConnectedUnitGroupModel[], nullable — The list of connected unit groups this unit group is composed of
    - `unitGroupId` string, required — The connected unit group id
    - `memberCount` integer, required — The number of units for this connected unit group

## Response `204`

Replace of the unit group was successful.

## Other responses

- `400` — Bad request.
- `401` — You are unauthorized.
- `403` — Forbidden.
- `404` — The Request-URI could not be found.
- `415` — Unsupported media type.
- `422` — Validation errors in the request body or query params.
- `499` — Client closed request.
- `500` — An unexpected error occurred.
- `503` — The server is currently unavailable. Please try later.

---

[API](https://skmtc.dev/apaleo/apis/apaleo-inventory-api.md) · [All operations](https://skmtc.dev/apaleo/apis/apaleo-inventory-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/apaleo/apaleo-inventory-api/revisions/a2846f52cdfb/schema)
