Unit

Create a unit

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

post/inventory/v1/units

Headers

Idempotency-Keystring

Unique key for safely retrying requests without accidentally performing the same operation twice. We'll always send back the same response for requests made with the same key, and keys can't be reused with different request parameters. Keys expire after 24 hours.

Request body

propertyIdstring required

The id of the property where the unit will be created

namestring required

The name for the unit

descriptionobject required

The description for the unit

unitGroupIdstring nullable

The id of the unit group

maxPersonsinteger required

Maximum number of persons for the unit

condition'Clean' | 'CleanToBeInspected' | 'Dirty' nullable

Condition of the unit

Example request

{
  "propertyId": "MUC",
  "name": "S.102",
  "description": {
    "en": "Suite room",
    "de": "Suite Zimmer"
  },
  "unitGroupId": "MUC-SUI",
  "maxPersons": 3,
  "condition": "Clean",
  "attributes": [],
  "connectedUnits": [
    {
      "unitId": "MUC-MTA"
    },
    {
      "unitId": "MUC-JQI"
    }
  ]
}

Response

Creation of the new unit was successful.

idstring required

The unit id

Example response

{
  "id": "MUC-CFP"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.