---
title: "GetDeviceCode"
method: GET
path: "/v2/devices/codes/{id}"
tags: ["Devices"]
---

# GetDeviceCode

`GET /v2/devices/codes/{id}`

Retrieves DeviceCode with the associated ID.

## Path parameters

- `id` string, required

## Response `200`

Success

- GetDeviceCodeResponse
  - `device_code` DeviceCode
    - `code` string — The unique code that can be used to login.
    - `created_at` string — When this DeviceCode was created. Timestamp in RFC 3339 format.
    - `device_id` string — The unique id of the device that used this code. Populated when the device is paired up.
    - `id` string — The unique id for this device code.
    - `location_id` string — The location assigned to this code.
    - `name` string — An optional user-defined name for the device code.
    - `pair_by` string — When this DeviceCode will expire and no longer login. Timestamp in RFC 3339 format.
    - `paired_at` string — When this DeviceCode was paired. Timestamp in RFC 3339 format.
    - `product_type` string, required — The targeting product type of the device code.
    - `status` string — The pairing status of the device code.
    - `status_changed_at` string — When this DeviceCode's status was last changed. Timestamp in RFC 3339 format.
  - `errors` Error[] — Any errors that occurred during the request.
    - `category` string, required — The high-level category for the error.
    - `code` string, required — The specific code of the error.
    - `detail` string — A human-readable description of the error for debugging purposes.
    - `field` string — The name of the field provided in the original request (if any) that the error pertains to.

---

[API](https://skmtc.net/square/apis/squareup.md) · [All operations](https://skmtc.net/square/apis/squareup/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/square/squareup/revisions/8d95e3639487/schema)
