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

# Retrieve device provisioning data

`GET /v2/partition/{partitionId}/deviceprovisioning/account/{accountId}/device/{deviceId}`

## Request

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

Use to retrieve a device's provisioning data by [device.id](#/~schema/DeviceX). Device.id actually identifies an Account Device Line, while the data returned by this call is best thought of as being one level higher, a list of related lines which will include the line searched by. (if present)

This is the canonical way to request the SIP credentials of a device line, but it requires extra work on your part; you will have to dig down into the lines array and search it by line.lineNumber == [device.lineNumber](#/~schema/DeviceX).

## Path parameters

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

## Response `200`

Successful operation

- DeviceData
  - `macAddress` string
  - `deviceType` string: Reference to <a href="#/~schema/DeviceX">device.deviceTypeId</a> -> <a href="#/~schema/DeviceTypeX">deviceType.id</a> -> <a href="#/~schema/DeviceTypeX">deviceType.name</a>. For possible values, query <a href="#/~operation/Reference%20Resources/getDeviceTypes">getDevicetypes</a>.
  - `lineCount` integer
  - `dialPlan` string: This is a dial plan string which instructs a phone when to consider dialing "complete"; in other words, when the phone should send the digits to the switch. For example, it usually instructs a device to immediately send 911, and can also help the phone determine that an extension is being dialed, so it should send after the extension length has been reached. These rules are encoded in a language of sorts and are only really understood by the phone itself.
  - `hasFaxEnabledLine` boolean
  - `lines` object[]
    - `macAddress` string
    - `lineNumber` integer
    - `userId` string
    - `displayName` string
    - `sipUsername` string
    - `sipPassword` string
    - `server` string
    - `serverPort` string
    - `emergencyNumber` string
    - `enabled` boolean
    - `faxEnabled` boolean

## Other responses

- `400`: Invalid request parameters
- `401`: Unauthorized
- `404`: 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)
