---
title: "ListDeviceCodes"
method: GET
path: "/v2/devices/codes"
tags: ["Devices"]
---

# ListDeviceCodes

`GET /v2/devices/codes`

Lists all DeviceCodes associated with the merchant.

## Query parameters

- `cursor` string
- `location_id` string
- `product_type` string
- `status` string

## Response `200`

Success

- ListDeviceCodesResponse
  - `cursor` string — A pagination cursor to retrieve the next set of results for your original query to the endpoint. This value is present only if the request succeeded and additional results are available. See [Paginating results](https://developer.squareup.com/docs/working-with-apis/pagination) for more information.
  - `device_codes` DeviceCode[] — The queried 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)
