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
| Header | Value |
|---|---|
Authorization | Bearer <token> |
Content-Type | application/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.
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | No | ID of an existing device type to update. Omit to create a new device type. |
name | string | Yes | Display 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"
}
]
