Overview
TheDevices client provides methods to:
- List all devices associated with a merchant
- Retrieve details about a specific device
- View device components (battery, WiFi, card reader, etc.)
Client Initialization
Methods
List Devices
Retrieves a list of devices associated with the merchant. Currently, only Terminal API devices are supported.devices/client/client.go
A pagination cursor from a previous call. Provide this to retrieve the next set of results.
The order in which results are listed:
ASC: Oldest to newestDESC: Newest to oldest (default)
The number of results to return in a single page
If present, only returns devices at the target location
Array of device objects
Get Device
Retrieves details about a specific device.devices/client/client.go
The unique ID for the desired device
The requested device object
Response Types
Device
Represents a Square hardware device.A synthetic identifier for the device (generated from key device fields)
A collection of attributes representing the device
List of components applicable to the device
The current operational status of the device
DeviceAttributes
The device type:
TERMINAL: A Square Terminal deviceHANDHELD: A handheld device
The maker of the device (e.g., “Square”)
The specific model of the device
A seller-specified name for the device
The manufacturer-supplied identifier (often a serial number)
The RFC 3339 timestamp of the most recent update to device information
The current version of software installed on the device
Component
Represents a device component (battery, WiFi, card reader, etc.).The type of component:
APPLICATION: Software applicationCARD_READER: Card reader hardwareBATTERY: Battery componentWIFI: WiFi interfaceETHERNET: Ethernet interfacePRINTER: Printer component
Details for APPLICATION components
Details for CARD_READER components
Details for BATTERY components
visible_percent: Battery percentageexternal_power: Power connection status
Details for WIFI components
active: Whether WiFi is activessid: Network nameip_address_v4: IPv4 addresssignal_strength: Signal strength measurement
Details for ETHERNET components
active: Whether Ethernet is activeip_address_v4: IPv4 address
DeviceStatus
The status category:
AVAILABLE: Device is available and operationalNEEDS_ATTENTION: Device requires attentionOFFLINE: Device is offline
Use Cases
Check Device Battery Status
List Devices at a Specific Location
Check Network Connectivity
Error Handling
Related Resources
- Devices API Documentation
- Terminal API - Process payments on Square Terminal
- Locations API - Manage device locations
