Bulk upsert device types

Creates or updates device types in bulk. Any existing device types not included in the request are deleted. This endpoint is the authoritative source for the full set of device types.

Request

PUT /device-type/bulk

Headers

HeaderValue
AuthorizationBearer <token>
Content-Typeapplication/json

Request Body

A JSON array of device type objects. To create a new device type, omit the id field. To update an existing one, include its id.

FieldTypeRequiredDescription
idintegerNoID of an existing device type to update. Omit to create a new device type.
namestringYesDisplay name of the device type.

Example Request

[
  { "id": 1, "name": "Desktop" },
  { "id": 2, "name": "Mobile" },
  { "name": "Tablet" }
]

Response

Returns a JSON array of all device type objects after the upsert. Device types not present in the request body are removed.

Example Response

[
  {
    "id": 1,
    "name": "Desktop"
  },
  {
    "id": 2,
    "name": "Mobile"
  },
  {
    "id": 4,
    "name": "Tablet"
  }
]