# Update device

> `PUT https://api.kustom.co/ipp/v1/devices/{id}`

Updates device properties such as name, metadata, or location assignment.

## Parameters

- `id` (string, path, required) — Device ID

## Request body

`application/json`

- `name` (string) — Display name of the device.
- `metadata` (object) — Custom metadata key-value pairs for the device.
  - `key` (string) — Any additional property. The key is free-form; the value has this shape.
- `location_id` (string) — Location identifier to assign the device to.

### Example request

```json
{
  "name": "POS Terminal 1",
  "metadata": {
    "store_id": "123",
    "region": "EU"
  },
  "location_id": "550e8400-e29b-41d4-a716-446655440000"
}
```

## Responses

### 200

Device updated successfully.

`application/json`

- `id` (string) — Unique device identifier.
- `unique_id` (string, deprecated) — Hardware identifier (deprecated, use hardwareId).
- `hardware_id` (string) — Hardware identifier of the device.
- `merchant_id` (string) — Merchant identifier.
- `location_id` (string) — Location identifier where the device is registered.
- `name` (string) — Display name of the device.
- `platform` (string) — Device platform. Enum: `IOS`, `ANDROID`, `TERMINAL`.
- `metadata` (object) — Custom metadata key-value pairs for the device.
  - `key` (string) — Any additional property. The key is free-form; the value has this shape.
- `created_at` (string) — Timestamp when the device was created.
- `open_cash_register_id` (integer) — ID of the currently open cash register on this device.
- `credentials` (object) — Device authentication credentials.
  - `bearer_token` (string) — Bearer token for device authentication.
  - `issuedAt` (string) — Timestamp when the token was issued.

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "unique_id": "ABC123XYZ",
  "hardware_id": "ABC123XYZ",
  "merchant_id": "merchant_12345",
  "location_id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "POS Terminal 1",
  "platform": "IOS",
  "metadata": {
    "store_id": "123",
    "region": "EU"
  },
  "created_at": "2024-01-15T10:30:00Z",
  "open_cash_register_id": 42,
  "credentials": {
    "bearer_token": "eyJhbGciOiJSUzI1NiIsInR5cCI...",
    "issuedAt": "2024-01-15T10:30:00Z"
  }
}
```

### 401

Missing or invalid credentials.

`application/json`

### 404

Device not found.

`application/json`
