---
title: "Retrieve device"
method: GET
path: "/v2/partition/{partitionId}/account/{accountId}/deviceline/{deviceId}"
tags: ["Account Device Line"]
---

# Retrieve device

`GET /v2/partition/{partitionId}/account/{accountId}/deviceline/{deviceId}`

## Request

- Base URL: `https://api.alianza.com`
- URL: `https://api.alianza.com/v2/partition/{partitionId}/account/{accountId}/deviceline/{deviceId}`
- Auth: API key in header `X-AUTH-TOKEN`
- TypeScript: <https://skmtc.dev/alianza/apis/alianza-public-api/docs/v2/partition/:partitionId/account/:accountId/deviceline/:deviceId/get.ts> (a function with typed inputs; its response is checked against the schema)

Use to retrieve a device by deviceId.  <span hidden>See also <a href="accountDeviceLine.html#read-deviceline">here</a></span>

## Path parameters

- `accountId` string, required
- `deviceId` string, required
- `partitionId` string, required

## Response `200`

Successful operation

- DeviceX
  - `id` string, required: Not required for creating a new device line
  - `deviceTypeId` string, required: Identifies the equipment as well as the features that the device supports. Refers to <a href="#/~schema/DeviceTypeX">deviceType.id</a>. See also: <a href="#/~operation/Reference%20Resources/getDeviceTypes">Get All Device Types</a> and <a href="#/~operation/Reference%20Resources/getDeviceTypeById">Get Device Type by ID</a>
  - `accountId` string, required: Not required for creating a new device line
  - `partitionId` string, required: Not required for creating a new device line
  - `macAddress` string: The 48-bit hexadecimal address assigned to the device by the manufacturer. Required if the device line refers to a physical device. Must not be claimed in another device request.
  - `deviceName` string, required
  - `emergencyNumber` string: Required if emergencyNumberReservationId is absent
  - `emergencyNumberReservationId` string: Required if emergencyNumber is absent
  - `faxEnabled` boolean, required
  - `lineNumber` integer, required: Required for POST & PUT operations only
  - `userId` string, required
  - `sipPassword` string
  - `sipUsername` string: Required to be globally unique if specified
  - `zipcode` string
  - `state` string
  - `lineType` 'Line' | 'AdvancedSharedLine' | 'ReferencedUser' | 'IntercomLine' | 'PresenceBlfUser' | 'SpeedDialUser' | 'SpeedDialTn' | 'CallParkingSpot' | 'SipPaging' | 'Custom'
  - `referenceId` string: Changes Depending on LineType. If LineType.Line then this should be null. If LineType.ReferencedUser, PresenceBlfUser, or SpeedDialUser then this should be a valid userid. If LineType.SpeedDialTn then this should be a valid phone number.
  - `provisioningRequest` ProvisioningRequestX
    - `id` string: The 48-bit hexadecimal address assigned to the device by the manufacturer.
    - `requestDate` string, date-time: The ISO 8601 formatted date string indicating when the device last tried to retrieve provisioning data.
    - `httpStatus` integer: The http status of the device's most recent request for provisioning.
    - `deviceId` string: DeviceId, reference to <a href="#/~schema/DeviceX">device.id</a>
    - `ipAddress` string
    - `userAgent` string: The user agent that was used to retrieve the provisioning data.

## Other responses

- `400`: Invalid partition, account or user ID supplied
- `401`: Unauthorized
- `404`: User not found

---

[API](https://skmtc.dev/alianza/apis/alianza-public-api.md) - [All operations](https://skmtc.dev/alianza/apis/alianza-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/alianza/apis/alianza-public-api/revisions/7223246c352c?raw)
