Skip to content

Square: Devices schemas

18 Square schemas with complete fields and constraints.

← Devices operations · All schemas

Create Device Code — request body — body

FieldTypePresenceDescription and constraints
$objectRoot
device_codeModelRequired within parentExpand Create Device Code — request body — body device code
The device code to create.
idempotency_keystringRequired within parentA unique string that identifies this CreateDeviceCode request. Keys can
be any valid string but must be unique for every CreateDeviceCode request.

See [Idempotency keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) for more information.
Maximum length: 128
Minimum length: 1

Referenced models: Create Device Code — request body — body device code

Create Device Code — request body — body device code

FieldTypePresenceDescription and constraints
$objectRoot
codestringOptionalThe unique code that can be used to login.
Read only: true
created_atstringOptionalWhen this DeviceCode was created. Timestamp in RFC 3339 format.
Read only: true
device_idstringOptionalThe unique id of the device that used this code. Populated when the device is paired up.
Read only: true
idstringOptionalThe unique id for this device code.
Read only: true
location_idJSONOptional
location_id (anyOf 1)stringAlternativeThe location assigned to this code.
Maximum length: 50
location_id (anyOf 2)nullAlternative
nameJSONOptional
name (anyOf 1)stringAlternativeAn optional user-defined name for the device code.
Maximum length: 128
name (anyOf 2)nullAlternative
pair_bystringOptionalWhen this DeviceCode will expire and no longer login. Timestamp in RFC 3339 format.
Read only: true
paired_atstringOptionalWhen this DeviceCode was paired. Timestamp in RFC 3339 format.
Read only: true
product_typestringRequired within parentThe targeting product type of the device code.
One of: TERMINAL_API
statusstringOptionalDeviceCode.Status enum.
The pairing status of the device code.
See [DeviceCodeStatus](#type-devicecodestatus) for possible values
One of: UNKNOWN, UNPAIRED, PAIRED, EXPIRED
Read only: true
status_changed_atstringOptionalWhen this DeviceCode's status was last changed. Timestamp in RFC 3339 format.
Read only: true

Create Device Code — response body

FieldTypePresenceDescription and constraints
$objectRoot
device_codeModelOptionalExpand Get Device Code — response body — device code
The created DeviceCode object containing the device code string.
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

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

Get Device Code — response body

FieldTypePresenceDescription and constraints
$objectRoot
device_codeModelOptionalExpand Get Device Code — response body — device code
The queried DeviceCode.
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

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

Get Device Code — response body — device code

FieldTypePresenceDescription and constraints
$objectRoot
codestringOptionalThe unique code that can be used to login.
Read only: true
created_atstringOptionalWhen this DeviceCode was created. Timestamp in RFC 3339 format.
Read only: true
device_idstringOptionalThe unique id of the device that used this code. Populated when the device is paired up.
Read only: true
idstringOptionalThe unique id for this device code.
Read only: true
location_idJSONOptional
location_id (anyOf 1)stringAlternativeThe location assigned to this code.
Maximum length: 50
location_id (anyOf 2)nullAlternative
nameJSONOptional
name (anyOf 1)stringAlternativeAn optional user-defined name for the device code.
Maximum length: 128
name (anyOf 2)nullAlternative
pair_bystringOptionalWhen this DeviceCode will expire and no longer login. Timestamp in RFC 3339 format.
Read only: true
paired_atstringOptionalWhen this DeviceCode was paired. Timestamp in RFC 3339 format.
Read only: true
product_typestringRequired within parentThe targeting product type of the device code.
Known values: TERMINAL_API
statusstringOptionalDeviceCode.Status enum.
The pairing status of the device code.
See [DeviceCodeStatus](#type-devicecodestatus) for possible values
Known values: UNKNOWN, UNPAIRED, PAIRED, EXPIRED
Read only: true
status_changed_atstringOptionalWhen this DeviceCode's status was last changed. Timestamp in RFC 3339 format.
Read only: true

Get Device — response body

FieldTypePresenceDescription and constraints
$objectRoot
deviceModelOptionalExpand Get Device — response body — device
The requested `Device`.
errorsarrayOptionalInformation about errors encountered 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 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 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 components A list of components applicable to the device item application details application type, device code id, session location, version

FieldTypePresenceDescription and constraints
$objectRoot
application_typeJSONOptional
application_type (anyOf 1)stringAlternativeThe type of application.
See [ApplicationType](#type-applicationtype) for possible values
Known values: TERMINAL_API
application_type (anyOf 2)nullAlternative
device_code_idJSONOptional
device_code_id (anyOf 1)stringAlternativeThe id of the device code that was used to log in to the device.
device_code_id (anyOf 2)nullAlternative
session_locationJSONOptional
session_location (anyOf 1)stringAlternativeThe location_id of the session for the application.
session_location (anyOf 2)nullAlternative
versionstringOptionalThe version of the application.

Get Device — response body — device components A list of components applicable to the device item battery details external power, visible percent

FieldTypePresenceDescription and constraints
$objectRoot
external_powerJSONOptional
external_power (anyOf 1)stringAlternativeAn enum for ExternalPower.
The status of external_power.
See [ExternalPower](#type-externalpower) for possible values
Known values: AVAILABLE_CHARGING, AVAILABLE_NOT_IN_USE, UNAVAILABLE, AVAILABLE_INSUFFICIENT
external_power (anyOf 2)nullAlternative
visible_percentJSONOptional
visible_percent (anyOf 1)JSONAlternative
visible_percent (anyOf 1) (anyOf 1)integerAlternativeThe battery charge percentage as displayed on the device.
visible_percent (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
visible_percent (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.

Get Device — response body — device components A list of components applicable to the device item ethernet details active, ip address v4, mac address

FieldTypePresenceDescription and constraints
$objectRoot
activeJSONOptional
active (anyOf 1)booleanAlternativeA boolean to represent whether the Ethernet interface is currently active.
active (anyOf 2)nullAlternative
ip_address_v4JSONOptional
ip_address_v4 (anyOf 1)stringAlternativeThe string representation of the device’s IPv4 address.
ip_address_v4 (anyOf 2)nullAlternative
mac_addressJSONOptional
mac_address (anyOf 1)stringAlternativeThe mac address of the device in this network.
mac_address (anyOf 2)nullAlternative

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

FieldTypePresenceDescription and constraints
$objectRoot
activeJSONOptional
active (anyOf 1)booleanAlternativeA boolean to represent whether the WiFI interface is currently active.
active (anyOf 2)nullAlternative
ip_address_v4JSONOptional
ip_address_v4 (anyOf 1)stringAlternativeThe string representation of the device’s IPv4 address.
ip_address_v4 (anyOf 2)nullAlternative
mac_addressJSONOptional
mac_address (anyOf 1)stringAlternativeThe mac address of the device in this network.
mac_address (anyOf 2)nullAlternative
secure_connectionJSONOptional
secure_connection (anyOf 1)stringAlternativeThe security protocol for a secure connection (e.g. WPA2). None provided if the connection
is unsecured.
secure_connection (anyOf 2)nullAlternative
signal_strengthJSONOptional
signal_strength (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 signal strength A value qualified by unit of measure
A representation of signal strength of the WIFI network connection.
signal_strength (anyOf 2)nullAlternative
ssidJSONOptional
ssid (anyOf 1)stringAlternativeThe name of the connected WIFI network.
ssid (anyOf 2)nullAlternative

Referenced models: 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 signal strength A value qualified by unit of measure

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 signal strength A value qualified by unit of measure

FieldTypePresenceDescription and constraints
$objectRootA value qualified by unit of measure.
valueJSONOptional
value (anyOf 1)JSONAlternative
value (anyOf 1) (anyOf 1)integerAlternativeValue of measure.
value (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
value (anyOf 2)nullAlternative

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

List Device Codes — response body

FieldTypePresenceDescription and constraints
$objectRoot
cursorstringOptionalA 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_codesarrayOptionalThe queried DeviceCode.
device_codes[]ModelEach itemExpand Get Device Code — response body — device code
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

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

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

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.