# Mutations

{% hint style="warning" %}
**Navixy Repository API is a work in progress.** This documentation is published for preview purposes only and doesn't reflect a stable release. Structure, field names, and behaviors are subject to change.
{% endhint %}

### deviceCreate

Creates a new device.

```graphql
deviceCreate(
    input: DeviceCreateInput!
  ): DevicePayload
```

**Arguments**

| Name    | Type                 | Description                               |
| ------- | -------------------- | ----------------------------------------- |
| `input` | `DeviceCreateInput!` | The input fields for creating the device. |

**Input types:**

<details>

<summary>DeviceCreateInput</summary>

Input for creating a new device.

| Field            | Type                                                                                                                     | Description                                                                                                                                                                                                                                                                                  |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `organizationId` | `ID!`                                                                                                                    | The organization that will own the device.                                                                                                                                                                                                                                                   |
| `typeId`         | `ID!`                                                                                                                    | The device type ID.                                                                                                                                                                                                                                                                          |
| `modelId`        | `ID!`                                                                                                                    | The device model ID.                                                                                                                                                                                                                                                                         |
| `statusId`       | `ID!`                                                                                                                    | The initial device status ID.                                                                                                                                                                                                                                                                |
| `title`          | `String`                                                                                                                 | The device display name. If omitted or blank, the server generates "\<vendor.title> \<model.title> \<identifier.value>" where the identifier is chosen by type priority: IMEI > SERIAL\_NUMBER > MAC\_ADDRESS, with fallback to identifiers\[0] when none of the priority types are present. |
| `identifiers`    | \[[DeviceIdentifierInput](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-deviceidentifierinput)!]! | The hardware identifiers. At least one entry is required.                                                                                                                                                                                                                                    |

</details>

<details>

<summary>DeviceIdentifierInput</summary>

Input for a device identifier.

| Field       | Type                                                                                               | Description                                                     |
| ----------- | -------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| `type`      | [DeviceIdType](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-deviceidtype)! | The type of identifier.                                         |
| `value`     | `String!`                                                                                          | The identifier value.                                           |
| `namespace` | `Code`                                                                                             | The namespace for uniqueness scope. Null means globally unique. |

</details>

**Output types:**

<details>

<summary>DevicePayload</summary>

The result of a device mutation.

| Field    | Type                                                                                   | Description                    |
| -------- | -------------------------------------------------------------------------------------- | ------------------------------ |
| `device` | [Device](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-device)! | The created or updated device. |

</details>

<details>

<summary>Device (entity)</summary>

A tracking device such as a GPS tracker, sensor, or beacon.

**Implements:** [Node](/docs/navixy-repository-api/core-api-reference/common.md#type-node), [Titled](/docs/navixy-repository-api/core-api-reference/common.md#type-titled), [Versioned](/docs/navixy-repository-api/core-api-reference/common.md#type-versioned), [InventoryItem](/docs/navixy-repository-api/core-api-reference/devices/inventory.md#type-inventoryitem)

| Field              | Type                                                                                                                                             | Description                                                                                                                                                                                               |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`               | `ID!`                                                                                                                                            | A globally unique identifier. This ID is opaque and should not be parsed by clients.                                                                                                                      |
| `version`          | `Int!`                                                                                                                                           | The version number for optimistic locking. Incremented on each update. Can be provided in update/delete mutations to prevent lost updates. If omitted, the update proceeds without stale-read protection. |
| `title`            | `String!`                                                                                                                                        | The human-readable display name.                                                                                                                                                                          |
| `organization`     | [Organization](/docs/navixy-repository-api/core-api-reference/organizations.md#type-organization)!                                               | The organization that owns this device.                                                                                                                                                                   |
| `type`             | [DeviceType](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-devicetype)!                                                   | The device type classification.                                                                                                                                                                           |
| `model`            | [DeviceModel](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-devicemodel)!                                                 | The specific device model.                                                                                                                                                                                |
| `status`           | [DeviceStatus](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-devicestatus)!                                               | The current operational status.                                                                                                                                                                           |
| `identifiers`      | \[[DeviceIdentifier](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-deviceidentifier)!]!                                   | The hardware identifiers for this device (IMEI, serial number, MAC address, etc.).                                                                                                                        |
| `asset`            | [Asset](/docs/navixy-repository-api/core-api-reference/assets/types.md#type-asset)                                                               | The asset this device is currently linked to.                                                                                                                                                             |
| `inventory`        | [Inventory](/docs/navixy-repository-api/core-api-reference/devices/inventory.md#type-inventory)                                                  | The inventory this device is currently assigned to.                                                                                                                                                       |
| `relationsFrom`    | \[[DeviceRelation](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-devicerelation)!]!                                       | The outgoing relationships from this device to other devices.                                                                                                                                             |
| `relationsTo`      | \[[DeviceRelation](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-devicerelation)!]!                                       | The incoming relationships from other devices to this device.                                                                                                                                             |
| `inventoryHistory` | [DeviceInventoryRelationConnection](/docs/navixy-repository-api/core-api-reference/devices/inventory.md#type-deviceinventoryrelationconnection)! | The history of inventory assignments for this device.                                                                                                                                                     |

</details>

***

### deviceUpdate

Updates an existing device.

```graphql
deviceUpdate(
    input: DeviceUpdateInput!
  ): DevicePayload
```

**Arguments**

| Name    | Type                 | Description                               |
| ------- | -------------------- | ----------------------------------------- |
| `input` | `DeviceUpdateInput!` | The input fields for updating the device. |

**Input types:**

<details>

<summary>DeviceUpdateInput</summary>

Input for updating an existing device.

| Field      | Type     | Description                                                                                     |
| ---------- | -------- | ----------------------------------------------------------------------------------------------- |
| `id`       | `ID!`    | The device ID to update.                                                                        |
| `version`  | `Int`    | The current version for optimistic locking. If omitted, auto-increments without conflict check. |
| `modelId`  | `ID`     | The new device model.                                                                           |
| `statusId` | `ID`     | The new device status.                                                                          |
| `title`    | `String` | The new display name.                                                                           |

</details>

**Output types:**

<details>

<summary>DevicePayload</summary>

The result of a device mutation.

| Field    | Type                                                                                   | Description                    |
| -------- | -------------------------------------------------------------------------------------- | ------------------------------ |
| `device` | [Device](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-device)! | The created or updated device. |

</details>

<details>

<summary>Device (entity)</summary>

A tracking device such as a GPS tracker, sensor, or beacon.

**Implements:** [Node](/docs/navixy-repository-api/core-api-reference/common.md#type-node), [Titled](/docs/navixy-repository-api/core-api-reference/common.md#type-titled), [Versioned](/docs/navixy-repository-api/core-api-reference/common.md#type-versioned), [InventoryItem](/docs/navixy-repository-api/core-api-reference/devices/inventory.md#type-inventoryitem)

| Field              | Type                                                                                                                                             | Description                                                                                                                                                                                               |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`               | `ID!`                                                                                                                                            | A globally unique identifier. This ID is opaque and should not be parsed by clients.                                                                                                                      |
| `version`          | `Int!`                                                                                                                                           | The version number for optimistic locking. Incremented on each update. Can be provided in update/delete mutations to prevent lost updates. If omitted, the update proceeds without stale-read protection. |
| `title`            | `String!`                                                                                                                                        | The human-readable display name.                                                                                                                                                                          |
| `organization`     | [Organization](/docs/navixy-repository-api/core-api-reference/organizations.md#type-organization)!                                               | The organization that owns this device.                                                                                                                                                                   |
| `type`             | [DeviceType](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-devicetype)!                                                   | The device type classification.                                                                                                                                                                           |
| `model`            | [DeviceModel](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-devicemodel)!                                                 | The specific device model.                                                                                                                                                                                |
| `status`           | [DeviceStatus](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-devicestatus)!                                               | The current operational status.                                                                                                                                                                           |
| `identifiers`      | \[[DeviceIdentifier](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-deviceidentifier)!]!                                   | The hardware identifiers for this device (IMEI, serial number, MAC address, etc.).                                                                                                                        |
| `asset`            | [Asset](/docs/navixy-repository-api/core-api-reference/assets/types.md#type-asset)                                                               | The asset this device is currently linked to.                                                                                                                                                             |
| `inventory`        | [Inventory](/docs/navixy-repository-api/core-api-reference/devices/inventory.md#type-inventory)                                                  | The inventory this device is currently assigned to.                                                                                                                                                       |
| `relationsFrom`    | \[[DeviceRelation](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-devicerelation)!]!                                       | The outgoing relationships from this device to other devices.                                                                                                                                             |
| `relationsTo`      | \[[DeviceRelation](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-devicerelation)!]!                                       | The incoming relationships from other devices to this device.                                                                                                                                             |
| `inventoryHistory` | [DeviceInventoryRelationConnection](/docs/navixy-repository-api/core-api-reference/devices/inventory.md#type-deviceinventoryrelationconnection)! | The history of inventory assignments for this device.                                                                                                                                                     |

</details>

***

### deviceDelete

Deletes a device.

```graphql
deviceDelete(
    input: DeviceDeleteInput!
  ): DeletePayload
```

**Arguments**

| Name    | Type                 | Description                               |
| ------- | -------------------- | ----------------------------------------- |
| `input` | `DeviceDeleteInput!` | The input fields for deleting the device. |

**Input types:**

<details>

<summary>DeviceDeleteInput</summary>

Input for deleting a device.

| Field     | Type  | Description                                                                                     |
| --------- | ----- | ----------------------------------------------------------------------------------------------- |
| `id`      | `ID!` | The device ID to delete.                                                                        |
| `version` | `Int` | The current version for optimistic locking. If omitted, auto-increments without conflict check. |

</details>

**Output types:**

<details>

<summary>DeletePayload</summary>

The result of a delete mutation.

| Field       | Type  | Description                   |
| ----------- | ----- | ----------------------------- |
| `deletedId` | `ID!` | The ID of the deleted entity. |

</details>

***

### deviceIdentifierAdd

Adds an identifier to a device.

```graphql
deviceIdentifierAdd(
    input: DeviceIdentifierAddInput!
  ): DeviceIdentifierPayload
```

**Arguments**

| Name    | Type                        | Description                                 |
| ------- | --------------------------- | ------------------------------------------- |
| `input` | `DeviceIdentifierAddInput!` | The input fields for adding the identifier. |

**Input types:**

<details>

<summary>DeviceIdentifierAddInput</summary>

Input for adding an identifier to a device.

| Field        | Type                                                                                                                 | Description             |
| ------------ | -------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| `deviceId`   | `ID!`                                                                                                                | The device ID.          |
| `identifier` | [DeviceIdentifierInput](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-deviceidentifierinput)! | The identifier details. |

</details>

<details>

<summary>DeviceIdentifierInput</summary>

Input for a device identifier.

| Field       | Type                                                                                               | Description                                                     |
| ----------- | -------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| `type`      | [DeviceIdType](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-deviceidtype)! | The type of identifier.                                         |
| `value`     | `String!`                                                                                          | The identifier value.                                           |
| `namespace` | `Code`                                                                                             | The namespace for uniqueness scope. Null means globally unique. |

</details>

**Output types:**

<details>

<summary>DeviceIdentifierPayload</summary>

The result of a device identifier mutation.

| Field              | Type                                                                                                       | Description                  |
| ------------------ | ---------------------------------------------------------------------------------------------------------- | ---------------------------- |
| `deviceIdentifier` | [DeviceIdentifier](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-deviceidentifier)! | The added device identifier. |

</details>

<details>

<summary>DeviceIdentifier (entity)</summary>

A hardware identifier for a device.

**Implements:** [Node](/docs/navixy-repository-api/core-api-reference/common.md#type-node)

| Field       | Type                                                                                               | Description                                                                          |
| ----------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| `id`        | `ID!`                                                                                              | A globally unique identifier. This ID is opaque and should not be parsed by clients. |
| `device`    | [Device](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-device)!             | The device this identifier belongs to.                                               |
| `type`      | [DeviceIdType](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-deviceidtype)! | The type of identifier.                                                              |
| `value`     | `String!`                                                                                          | The identifier value.                                                                |
| `namespace` | `Code`                                                                                             | The namespace for uniqueness scope. Null means the identifier is globally unique.    |

</details>

***

### deviceIdentifierRemove

Removes an identifier from a device.

```graphql
deviceIdentifierRemove(
    input: DeviceIdentifierRemoveInput!
  ): DeletePayload
```

**Arguments**

| Name    | Type                           | Description                                   |
| ------- | ------------------------------ | --------------------------------------------- |
| `input` | `DeviceIdentifierRemoveInput!` | The input fields for removing the identifier. |

**Input types:**

<details>

<summary>DeviceIdentifierRemoveInput</summary>

Input for removing an identifier from a device.

| Field          | Type  | Description                  |
| -------------- | ----- | ---------------------------- |
| `identifierId` | `ID!` | The identifier ID to remove. |

</details>

**Output types:**

<details>

<summary>DeletePayload</summary>

The result of a delete mutation.

| Field       | Type  | Description                   |
| ----------- | ----- | ----------------------------- |
| `deletedId` | `ID!` | The ID of the deleted entity. |

</details>

***

### deviceRelationCreate

Creates a relationship between devices.

```graphql
deviceRelationCreate(
    input: DeviceRelationCreateInput!
  ): DeviceRelationPayload
```

**Arguments**

| Name    | Type                         | Description                                     |
| ------- | ---------------------------- | ----------------------------------------------- |
| `input` | `DeviceRelationCreateInput!` | The input fields for creating the relationship. |

**Input types:**

<details>

<summary>DeviceRelationCreateInput</summary>

Input for creating a relationship between devices.

| Field      | Type  | Description               |
| ---------- | ----- | ------------------------- |
| `firstId`  | `ID!` | The first device ID.      |
| `secondId` | `ID!` | The second device ID.     |
| `typeId`   | `ID!` | The relationship type ID. |

</details>

**Output types:**

<details>

<summary>DeviceRelationPayload</summary>

The result of a device relation mutation.

| Field            | Type                                                                                                   | Description                      |
| ---------------- | ------------------------------------------------------------------------------------------------------ | -------------------------------- |
| `deviceRelation` | [DeviceRelation](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-devicerelation)! | The created device relationship. |

</details>

<details>

<summary>DeviceRelation (entity)</summary>

A relationship between two devices.

**Implements:** [Node](/docs/navixy-repository-api/core-api-reference/common.md#type-node)

| Field    | Type                                                                                                           | Description                                                                          |
| -------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| `id`     | `ID!`                                                                                                          | A globally unique identifier. This ID is opaque and should not be parsed by clients. |
| `first`  | [Device](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-device)!                         | The first device in the relationship.                                                |
| `second` | [Device](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-device)!                         | The second device in the relationship.                                               |
| `type`   | [DeviceRelationType](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-devicerelationtype)! | The type of relationship.                                                            |

</details>

***

### deviceRelationRemove

Removes a device relationship.

```graphql
deviceRelationRemove(
    input: DeviceRelationRemoveInput!
  ): DeletePayload
```

**Arguments**

| Name    | Type                         | Description                                     |
| ------- | ---------------------------- | ----------------------------------------------- |
| `input` | `DeviceRelationRemoveInput!` | The input fields for removing the relationship. |

**Input types:**

<details>

<summary>DeviceRelationRemoveInput</summary>

Input for removing a device relationship.

| Field | Type  | Description                    |
| ----- | ----- | ------------------------------ |
| `id`  | `ID!` | The relationship ID to remove. |

</details>

**Output types:**

<details>

<summary>DeletePayload</summary>

The result of a delete mutation.

| Field       | Type  | Description                   |
| ----------- | ----- | ----------------------------- |
| `deletedId` | `ID!` | The ID of the deleted entity. |

</details>

***

### deviceTypeCreate

Creates a new device type.

```graphql
deviceTypeCreate(
    input: DeviceTypeCreateInput!
  ): DeviceTypePayload
```

**Arguments**

| Name    | Type                     | Description                                    |
| ------- | ------------------------ | ---------------------------------------------- |
| `input` | `DeviceTypeCreateInput!` | The input fields for creating the device type. |

**Input types:**

<details>

<summary>DeviceTypeCreateInput</summary>

Input for creating a device type.

| Field            | Type                                                                                                                       | Description                                                      |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| `organizationId` | `ID!`                                                                                                                      | The organization that will own the item.                         |
| `code`           | `Code`                                                                                                                     | The machine-readable code. Auto-generated from title if omitted. |
| `title`          | `String!`                                                                                                                  | The display name.                                                |
| `order`          | `Int`                                                                                                                      | The display order. Auto-calculated as last position if omitted.  |
| `meta`           | [CatalogItemMetaInput](/docs/navixy-repository-api/core-api-reference/catalogs/catalog-items.md#type-catalogitemmetainput) | The display properties.                                          |

</details>

<details>

<summary>CatalogItemMetaInput</summary>

Display properties for catalog items.

| Field         | Type      | Description                                       |
| ------------- | --------- | ------------------------------------------------- |
| `description` | `String`  | The description.                                  |
| `hidden`      | `Boolean` | Whether the item is hidden from regular UI lists. |

</details>

**Output types:**

<details>

<summary>DeviceTypePayload</summary>

The result of a device type mutation.

| Field        | Type                                                                                           | Description                         |
| ------------ | ---------------------------------------------------------------------------------------------- | ----------------------------------- |
| `deviceType` | [DeviceType](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-devicetype)! | The created or updated device type. |

</details>

<details>

<summary>DeviceType (entity)</summary>

A classification type for devices.

**Implements:** [CatalogItem](/docs/navixy-repository-api/core-api-reference/catalogs/catalog-items.md#type-catalogitem), [Node](/docs/navixy-repository-api/core-api-reference/common.md#type-node), [Versioned](/docs/navixy-repository-api/core-api-reference/common.md#type-versioned), [Titled](/docs/navixy-repository-api/core-api-reference/common.md#type-titled)

| Field          | Type                                                                                                              | Description                                                                     |
| -------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `id`           | `ID!`                                                                                                             | A globally unique identifier.                                                   |
| `version`      | `Int!`                                                                                                            | The version number for optimistic locking.                                      |
| `title`        | `String!`                                                                                                         | The human-readable display name. Can be localized.                              |
| `code`         | `Code!`                                                                                                           | A machine-readable code, unique within the catalog scope.                       |
| `order`        | `Int!`                                                                                                            | The display order within the same level or category.                            |
| `catalog`      | [Catalog](/docs/navixy-repository-api/core-api-reference/catalogs/catalog-items.md#type-catalog)!                 | The catalog this item belongs to.                                               |
| `organization` | [Organization](/docs/navixy-repository-api/core-api-reference/organizations.md#type-organization)                 | The organization that owns this item. Null for system items.                    |
| `meta`         | [CatalogItemMeta](/docs/navixy-repository-api/core-api-reference/catalogs/catalog-items.md#type-catalogitemmeta)! | Metadata about this item including description, origin, and display properties. |

</details>

***

### deviceTypeUpdate

Updates a device type.

```graphql
deviceTypeUpdate(
    input: DeviceTypeUpdateInput!
  ): DeviceTypePayload
```

**Arguments**

| Name    | Type                     | Description                                    |
| ------- | ------------------------ | ---------------------------------------------- |
| `input` | `DeviceTypeUpdateInput!` | The input fields for updating the device type. |

**Input types:**

<details>

<summary>DeviceTypeUpdateInput</summary>

Input for updating a device type.

| Field     | Type                                                                                                                       | Description                                                                                     |
| --------- | -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `id`      | `ID!`                                                                                                                      | The item ID to update.                                                                          |
| `version` | `Int`                                                                                                                      | The current version for optimistic locking. If omitted, auto-increments without conflict check. |
| `title`   | `String`                                                                                                                   | The new display name.                                                                           |
| `order`   | `Int`                                                                                                                      | The new display order.                                                                          |
| `meta`    | [CatalogItemMetaInput](/docs/navixy-repository-api/core-api-reference/catalogs/catalog-items.md#type-catalogitemmetainput) | The display properties.                                                                         |

</details>

<details>

<summary>CatalogItemMetaInput</summary>

Display properties for catalog items.

| Field         | Type      | Description                                       |
| ------------- | --------- | ------------------------------------------------- |
| `description` | `String`  | The description.                                  |
| `hidden`      | `Boolean` | Whether the item is hidden from regular UI lists. |

</details>

**Output types:**

<details>

<summary>DeviceTypePayload</summary>

The result of a device type mutation.

| Field        | Type                                                                                           | Description                         |
| ------------ | ---------------------------------------------------------------------------------------------- | ----------------------------------- |
| `deviceType` | [DeviceType](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-devicetype)! | The created or updated device type. |

</details>

<details>

<summary>DeviceType (entity)</summary>

A classification type for devices.

**Implements:** [CatalogItem](/docs/navixy-repository-api/core-api-reference/catalogs/catalog-items.md#type-catalogitem), [Node](/docs/navixy-repository-api/core-api-reference/common.md#type-node), [Versioned](/docs/navixy-repository-api/core-api-reference/common.md#type-versioned), [Titled](/docs/navixy-repository-api/core-api-reference/common.md#type-titled)

| Field          | Type                                                                                                              | Description                                                                     |
| -------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `id`           | `ID!`                                                                                                             | A globally unique identifier.                                                   |
| `version`      | `Int!`                                                                                                            | The version number for optimistic locking.                                      |
| `title`        | `String!`                                                                                                         | The human-readable display name. Can be localized.                              |
| `code`         | `Code!`                                                                                                           | A machine-readable code, unique within the catalog scope.                       |
| `order`        | `Int!`                                                                                                            | The display order within the same level or category.                            |
| `catalog`      | [Catalog](/docs/navixy-repository-api/core-api-reference/catalogs/catalog-items.md#type-catalog)!                 | The catalog this item belongs to.                                               |
| `organization` | [Organization](/docs/navixy-repository-api/core-api-reference/organizations.md#type-organization)                 | The organization that owns this item. Null for system items.                    |
| `meta`         | [CatalogItemMeta](/docs/navixy-repository-api/core-api-reference/catalogs/catalog-items.md#type-catalogitemmeta)! | Metadata about this item including description, origin, and display properties. |

</details>

***

### deviceTypeDelete

Deletes a device type.

```graphql
deviceTypeDelete(
    input: CatalogItemDeleteInput!
  ): DeletePayload
```

**Arguments**

| Name    | Type                      | Description                                    |
| ------- | ------------------------- | ---------------------------------------------- |
| `input` | `CatalogItemDeleteInput!` | The input fields for deleting the device type. |

**Input types:**

<details>

<summary>CatalogItemDeleteInput</summary>

Input for deleting a catalog item.

| Field     | Type  | Description                                                                                     |
| --------- | ----- | ----------------------------------------------------------------------------------------------- |
| `id`      | `ID!` | The catalog item ID to delete.                                                                  |
| `version` | `Int` | The current version for optimistic locking. If omitted, auto-increments without conflict check. |

</details>

**Output types:**

<details>

<summary>DeletePayload</summary>

The result of a delete mutation.

| Field       | Type  | Description                   |
| ----------- | ----- | ----------------------------- |
| `deletedId` | `ID!` | The ID of the deleted entity. |

</details>

***

### deviceStatusCreate

Creates a new device status.

```graphql
deviceStatusCreate(
    input: DeviceStatusCreateInput!
  ): DeviceStatusPayload
```

**Arguments**

| Name    | Type                       | Description                                      |
| ------- | -------------------------- | ------------------------------------------------ |
| `input` | `DeviceStatusCreateInput!` | The input fields for creating the device status. |

**Input types:**

<details>

<summary>DeviceStatusCreateInput</summary>

Input for creating a device status.

| Field            | Type                                                                                                                       | Description                                                      |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| `organizationId` | `ID!`                                                                                                                      | The organization that will own the item.                         |
| `code`           | `Code`                                                                                                                     | The machine-readable code. Auto-generated from title if omitted. |
| `title`          | `String!`                                                                                                                  | The display name.                                                |
| `order`          | `Int`                                                                                                                      | The display order. Auto-calculated as last position if omitted.  |
| `meta`           | [CatalogItemMetaInput](/docs/navixy-repository-api/core-api-reference/catalogs/catalog-items.md#type-catalogitemmetainput) | The display properties.                                          |

</details>

<details>

<summary>CatalogItemMetaInput</summary>

Display properties for catalog items.

| Field         | Type      | Description                                       |
| ------------- | --------- | ------------------------------------------------- |
| `description` | `String`  | The description.                                  |
| `hidden`      | `Boolean` | Whether the item is hidden from regular UI lists. |

</details>

**Output types:**

<details>

<summary>DeviceStatusPayload</summary>

The result of a device status mutation.

| Field          | Type                                                                                               | Description                           |
| -------------- | -------------------------------------------------------------------------------------------------- | ------------------------------------- |
| `deviceStatus` | [DeviceStatus](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-devicestatus)! | The created or updated device status. |

</details>

<details>

<summary>DeviceStatus (entity)</summary>

An operational status for devices.

**Implements:** [CatalogItem](/docs/navixy-repository-api/core-api-reference/catalogs/catalog-items.md#type-catalogitem), [Node](/docs/navixy-repository-api/core-api-reference/common.md#type-node), [Versioned](/docs/navixy-repository-api/core-api-reference/common.md#type-versioned), [Titled](/docs/navixy-repository-api/core-api-reference/common.md#type-titled)

| Field          | Type                                                                                                              | Description                                                                     |
| -------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `id`           | `ID!`                                                                                                             | A globally unique identifier.                                                   |
| `version`      | `Int!`                                                                                                            | The version number for optimistic locking.                                      |
| `title`        | `String!`                                                                                                         | The human-readable display name. Can be localized.                              |
| `code`         | `Code!`                                                                                                           | A machine-readable code, unique within the catalog scope.                       |
| `order`        | `Int!`                                                                                                            | The display order within the same level or category.                            |
| `catalog`      | [Catalog](/docs/navixy-repository-api/core-api-reference/catalogs/catalog-items.md#type-catalog)!                 | The catalog this item belongs to.                                               |
| `organization` | [Organization](/docs/navixy-repository-api/core-api-reference/organizations.md#type-organization)                 | The organization that owns this item. Null for system items.                    |
| `meta`         | [CatalogItemMeta](/docs/navixy-repository-api/core-api-reference/catalogs/catalog-items.md#type-catalogitemmeta)! | Metadata about this item including description, origin, and display properties. |

</details>

***

### deviceStatusUpdate

Updates a device status.

```graphql
deviceStatusUpdate(
    input: DeviceStatusUpdateInput!
  ): DeviceStatusPayload
```

**Arguments**

| Name    | Type                       | Description                                      |
| ------- | -------------------------- | ------------------------------------------------ |
| `input` | `DeviceStatusUpdateInput!` | The input fields for updating the device status. |

**Input types:**

<details>

<summary>DeviceStatusUpdateInput</summary>

Input for updating a device status.

| Field     | Type                                                                                                                       | Description                                                                                     |
| --------- | -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `id`      | `ID!`                                                                                                                      | The item ID to update.                                                                          |
| `version` | `Int`                                                                                                                      | The current version for optimistic locking. If omitted, auto-increments without conflict check. |
| `title`   | `String`                                                                                                                   | The new display name.                                                                           |
| `order`   | `Int`                                                                                                                      | The new display order.                                                                          |
| `meta`    | [CatalogItemMetaInput](/docs/navixy-repository-api/core-api-reference/catalogs/catalog-items.md#type-catalogitemmetainput) | The display properties.                                                                         |

</details>

<details>

<summary>CatalogItemMetaInput</summary>

Display properties for catalog items.

| Field         | Type      | Description                                       |
| ------------- | --------- | ------------------------------------------------- |
| `description` | `String`  | The description.                                  |
| `hidden`      | `Boolean` | Whether the item is hidden from regular UI lists. |

</details>

**Output types:**

<details>

<summary>DeviceStatusPayload</summary>

The result of a device status mutation.

| Field          | Type                                                                                               | Description                           |
| -------------- | -------------------------------------------------------------------------------------------------- | ------------------------------------- |
| `deviceStatus` | [DeviceStatus](/docs/navixy-repository-api/core-api-reference/devices/types.md#type-devicestatus)! | The created or updated device status. |

</details>

<details>

<summary>DeviceStatus (entity)</summary>

An operational status for devices.

**Implements:** [CatalogItem](/docs/navixy-repository-api/core-api-reference/catalogs/catalog-items.md#type-catalogitem), [Node](/docs/navixy-repository-api/core-api-reference/common.md#type-node), [Versioned](/docs/navixy-repository-api/core-api-reference/common.md#type-versioned), [Titled](/docs/navixy-repository-api/core-api-reference/common.md#type-titled)

| Field          | Type                                                                                                              | Description                                                                     |
| -------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `id`           | `ID!`                                                                                                             | A globally unique identifier.                                                   |
| `version`      | `Int!`                                                                                                            | The version number for optimistic locking.                                      |
| `title`        | `String!`                                                                                                         | The human-readable display name. Can be localized.                              |
| `code`         | `Code!`                                                                                                           | A machine-readable code, unique within the catalog scope.                       |
| `order`        | `Int!`                                                                                                            | The display order within the same level or category.                            |
| `catalog`      | [Catalog](/docs/navixy-repository-api/core-api-reference/catalogs/catalog-items.md#type-catalog)!                 | The catalog this item belongs to.                                               |
| `organization` | [Organization](/docs/navixy-repository-api/core-api-reference/organizations.md#type-organization)                 | The organization that owns this item. Null for system items.                    |
| `meta`         | [CatalogItemMeta](/docs/navixy-repository-api/core-api-reference/catalogs/catalog-items.md#type-catalogitemmeta)! | Metadata about this item including description, origin, and display properties. |

</details>

***

### deviceStatusDelete

Deletes a device status.

```graphql
deviceStatusDelete(
    input: CatalogItemDeleteInput!
  ): DeletePayload
```

**Arguments**

| Name    | Type                      | Description                                      |
| ------- | ------------------------- | ------------------------------------------------ |
| `input` | `CatalogItemDeleteInput!` | The input fields for deleting the device status. |

**Input types:**

<details>

<summary>CatalogItemDeleteInput</summary>

Input for deleting a catalog item.

| Field     | Type  | Description                                                                                     |
| --------- | ----- | ----------------------------------------------------------------------------------------------- |
| `id`      | `ID!` | The catalog item ID to delete.                                                                  |
| `version` | `Int` | The current version for optimistic locking. If omitted, auto-increments without conflict check. |

</details>

**Output types:**

<details>

<summary>DeletePayload</summary>

The result of a delete mutation.

| Field       | Type  | Description                   |
| ----------- | ----- | ----------------------------- |
| `deletedId` | `ID!` | The ID of the deleted entity. |

</details>

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://navixy.com/docs/navixy-repository-api/core-api-reference/devices/mutations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
