Skip to content

Square: List Devices

Square devices.listDevices: arguments, response, policy and SDK examples.

← Devices operations · Get started

Operation square.listdevices

Provider route: GET /v2/devices. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/square with npm, or alter-sdk-square with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { SquareIntegration } from "@alter-ai/square";
async function execute(input: Parameters<SquareIntegration["devices"]["listDevices"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new SquareIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.devices.listDevices(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_square import SquareIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = SquareIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.devices.list_devices(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectOptionalAdditional keys: not allowed
query.cursorstringOptional
query.sort_orderstringOptionalThe order (e.g., chronological or alphabetical) in which results from a request are returned.
One of: DESC, ASC
query.limitintegerOptional
query.location_idstringOptional

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand List Devices — response body

Referenced models: List Devices — response body

6 more schemas are linked from the tables above, on the schema pages.

List Devices — response body
FieldTypePresenceDescription and constraints
$objectRoot
cursorstringOptionalThe pagination cursor to be used in a subsequent request. If empty,
this is the final response.
See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.
devicesarrayOptionalThe requested list of `Device` objects.
devices[]ModelEach itemExpand Get Device — response body — device
errorsarrayOptionalInformation about errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Get Device — response body — device, Get Shift — response body — errors item

Get Device — response body — device
FieldTypePresenceDescription and constraints
$objectRoot
attributesModelRequired within parentExpand Get Device — response body — device attributes
A collection of DeviceAttributes representing the device.
componentsJSONOptional
components (anyOf 1)arrayAlternativeA list of components applicable to the device.
components (anyOf 1)[]ModelEach itemExpand Get Device — response body — device components A list of components applicable to the device item
components (anyOf 2)nullAlternative
idstringOptionalA synthetic identifier for the device. The identifier includes a standardized prefix and
is otherwise an opaque id generated from key device fields.
Read only: true
statusModelOptionalExpand Get Device — response body — device status
The current status of the device.
Read only: true

Referenced models: Get Device — response body — device components A list of components applicable to the device item, Get Device — response body — device attributes, Get Device — response body — device status

Get Shift — response body — errors item
FieldTypePresenceDescription and constraints
$objectRootRepresents an error encountered during a request to the Connect API.

See [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information.
categorystringRequired within parentIndicates which high-level category of error has occurred during a
request to the Connect API.
The high-level category for the error.
See [ErrorCategory](#type-errorcategory) for possible values
Known values: API_ERROR, AUTHENTICATION_ERROR, INVALID_REQUEST_ERROR, RATE_LIMIT_ERROR, PAYMENT_METHOD_ERROR, REFUND_ERROR, MERCHANT_SUBSCRIPTION_ERROR, EXTERNAL_VENDOR_ERROR
codeModelRequired within parentExpand Get Shift — response body — errors item code
The specific code of the error.
See [ErrorCode](#type-errorcode) for possible values
detailstringOptionalA human-readable description of the error for debugging purposes.
fieldstringOptionalThe name of the field provided in the original request (if any) that
the error pertains to.

Referenced models: Get Shift — response body — errors item code

Get Device — response body — device components A list of components applicable to the device item
FieldTypePresenceDescription and constraints
$objectRootThe wrapper object for the component entries of a given component type.
application_detailsJSONOptional
application_details (anyOf 1)ModelAlternativeExpand Get Device — response body — device components A list of components applicable to the device item application details application type, device code id, session location, version
Structured data for an `Application`, set for Components of type `APPLICATION`.
application_details (anyOf 2)nullAlternative
battery_detailsJSONOptional
battery_details (anyOf 1)ModelAlternativeExpand Get Device — response body — device components A list of components applicable to the device item battery details external power, visible percent
Structured data for a `Battery`, set for Components of type `BATTERY`.
battery_details (anyOf 2)nullAlternative
card_reader_detailsJSONOptional
card_reader_details (anyOf 1)ModelAlternativeExpand Get Device — response body — device components A list of components applicable to the device item card reader details version
Structured data for a `CardReader`, set for Components of type `CARD_READER`.
card_reader_details (anyOf 2)nullAlternative
ethernet_detailsJSONOptional
ethernet_details (anyOf 1)ModelAlternativeExpand Get Device — response body — device components A list of components applicable to the device item ethernet details active, ip address v4, mac address
Structured data for an `Ethernet` interface, set for Components of type `ETHERNET`.
ethernet_details (anyOf 2)nullAlternative
typestringRequired within parentAn enum for ComponentType.
The type of this component. Each component type has expected properties expressed
in a structured format within its corresponding `*_details` field.
See [ComponentType](#type-componenttype) for possible values
Known values: APPLICATION, CARD_READER, BATTERY, WIFI, ETHERNET, PRINTER
wifi_detailsJSONOptional
wifi_details (anyOf 1)ModelAlternativeExpand Get Device — response body — device components A list of components applicable to the device item wifi details active, ip address v4, mac address, secure connection, signal strength, ssid
Structured data for a `WiFi` interface, set for Components of type `WIFI`.
wifi_details (anyOf 2)nullAlternative

Referenced models: Get Device — response body — device components A list of components applicable to the device item card reader details version, Get Device — response body — device components A list of components applicable to the device item ethernet details active, ip address v4, mac address, Get Device — response body — device components A list of components applicable to the device item application details application type, device code id, session location, version, Get Device — response body — device components A list of components applicable to the device item battery details external power, visible percent, Get Device — response body — device components A list of components applicable to the device item wifi details active, ip address v4, mac address, secure connection, signal strength, ssid

Get Device — response body — device attributes
FieldTypePresenceDescription and constraints
$objectRoot
manufacturerstringRequired within parentThe maker of the device.
manufacturers_idJSONOptional
manufacturers_id (anyOf 1)stringAlternativeThe manufacturer-supplied identifier for the device (where available). In many cases,
this identifier will be a serial number.
manufacturers_id (anyOf 2)nullAlternative
merchant_tokenJSONOptional
merchant_token (anyOf 1)stringAlternativeThe merchant_token identifying the merchant controlling the device.
merchant_token (anyOf 2)nullAlternative
modelJSONOptional
model (anyOf 1)stringAlternativeThe specific model of the device.
model (anyOf 2)nullAlternative
nameJSONOptional
name (anyOf 1)stringAlternativeA seller-specified name for the device.
name (anyOf 2)nullAlternative
typestringRequired within parentAn enum identifier of the device type.
The device type.
See [DeviceType](#type-devicetype) for possible values
Known values: TERMINAL, HANDHELD
updated_atstringOptionalThe RFC 3339-formatted value of the most recent update to the device information.
(Could represent any field update on the device.)
Read only: true
versionstringOptionalThe current version of software installed on the device.
Get Device — response body — device status
FieldTypePresenceDescription and constraints
$objectRoot
categoryJSONOptional
category (anyOf 1)stringAlternativeCategory of the device status.
See [Category](#type-category) for possible values
Known values: AVAILABLE, NEEDS_ATTENTION, OFFLINE
category (anyOf 2)nullAlternative
Get Device — response body — device components A list of components applicable to the device item card reader details version
FieldTypePresenceDescription and constraints
$objectRoot
versionstringOptionalThe version of the card reader.

SDK function policy ID: square.listdevices. Catalog operation: ListDevices. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["DEVICES_READ"]

Pinned headers: {"Square-Version": "2026-11-18"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.