Square: Devices schemas
18 Square schemas with complete fields and constraints.
← Devices operations · All schemas
Create Device Code — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
device_code | Model | Required within parent | Expand Create Device Code — request body — body device code The device code to create. |
idempotency_key | string | Required within parent | A 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
code | string | Optional | The unique code that can be used to login. Read only: true |
created_at | string | Optional | When this DeviceCode was created. Timestamp in RFC 3339 format. Read only: true |
device_id | string | Optional | The unique id of the device that used this code. Populated when the device is paired up. Read only: true |
id | string | Optional | The unique id for this device code. Read only: true |
location_id | JSON | Optional | |
location_id (anyOf 1) | string | Alternative | The location assigned to this code. Maximum length: 50 |
location_id (anyOf 2) | null | Alternative | |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | An optional user-defined name for the device code. Maximum length: 128 |
name (anyOf 2) | null | Alternative | |
pair_by | string | Optional | When this DeviceCode will expire and no longer login. Timestamp in RFC 3339 format. Read only: true |
paired_at | string | Optional | When this DeviceCode was paired. Timestamp in RFC 3339 format. Read only: true |
product_type | string | Required within parent | The targeting product type of the device code. One of: TERMINAL_API |
status | string | Optional | DeviceCode.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_at | string | Optional | When this DeviceCode's status was last changed. Timestamp in RFC 3339 format. Read only: true |
Create Device Code — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
device_code | Model | Optional | Expand Get Device Code — response body — device code The created DeviceCode object containing the device code string. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
device_code | Model | Optional | Expand Get Device Code — response body — device code The queried DeviceCode. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
code | string | Optional | The unique code that can be used to login. Read only: true |
created_at | string | Optional | When this DeviceCode was created. Timestamp in RFC 3339 format. Read only: true |
device_id | string | Optional | The unique id of the device that used this code. Populated when the device is paired up. Read only: true |
id | string | Optional | The unique id for this device code. Read only: true |
location_id | JSON | Optional | |
location_id (anyOf 1) | string | Alternative | The location assigned to this code. Maximum length: 50 |
location_id (anyOf 2) | null | Alternative | |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | An optional user-defined name for the device code. Maximum length: 128 |
name (anyOf 2) | null | Alternative | |
pair_by | string | Optional | When this DeviceCode will expire and no longer login. Timestamp in RFC 3339 format. Read only: true |
paired_at | string | Optional | When this DeviceCode was paired. Timestamp in RFC 3339 format. Read only: true |
product_type | string | Required within parent | The targeting product type of the device code. Known values: TERMINAL_API |
status | string | Optional | DeviceCode.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_at | string | Optional | When this DeviceCode's status was last changed. Timestamp in RFC 3339 format. Read only: true |
Get Device — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
device | Model | Optional | Expand Get Device — response body — device The requested `Device`. |
errors | array | Optional | Information about errors encountered during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
Referenced models: Get Device — response body — device, Get Shift — response body — errors item
Get Device — response body — device
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
attributes | Model | Required within parent | Expand Get Device — response body — device attributes A collection of DeviceAttributes representing the device. |
components | JSON | Optional | |
components (anyOf 1) | array | Alternative | A list of components applicable to the device. |
components (anyOf 1)[] | Model | Each item | Expand Get Device — response body — device components A list of components applicable to the device item |
components (anyOf 2) | null | Alternative | |
id | string | Optional | A 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 |
status | Model | Optional | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
manufacturer | string | Required within parent | The maker of the device. |
manufacturers_id | JSON | Optional | |
manufacturers_id (anyOf 1) | string | Alternative | The manufacturer-supplied identifier for the device (where available). In many cases, this identifier will be a serial number. |
manufacturers_id (anyOf 2) | null | Alternative | |
merchant_token | JSON | Optional | |
merchant_token (anyOf 1) | string | Alternative | The merchant_token identifying the merchant controlling the device. |
merchant_token (anyOf 2) | null | Alternative | |
model | JSON | Optional | |
model (anyOf 1) | string | Alternative | The specific model of the device. |
model (anyOf 2) | null | Alternative | |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | A seller-specified name for the device. |
name (anyOf 2) | null | Alternative | |
type | string | Required within parent | An enum identifier of the device type. The device type. See [DeviceType](#type-devicetype) for possible values Known values: TERMINAL, HANDHELD |
updated_at | string | Optional | The RFC 3339-formatted value of the most recent update to the device information. (Could represent any field update on the device.) Read only: true |
version | string | Optional | The current version of software installed on the device. |
Get Device — response body — device components A list of components applicable to the device item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The wrapper object for the component entries of a given component type. |
application_details | JSON | Optional | |
application_details (anyOf 1) | Model | Alternative | Expand 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) | null | Alternative | |
battery_details | JSON | Optional | |
battery_details (anyOf 1) | Model | Alternative | Expand 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) | null | Alternative | |
card_reader_details | JSON | Optional | |
card_reader_details (anyOf 1) | Model | Alternative | Expand 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) | null | Alternative | |
ethernet_details | JSON | Optional | |
ethernet_details (anyOf 1) | Model | Alternative | Expand 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) | null | Alternative | |
type | string | Required within parent | An 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_details | JSON | Optional | |
wifi_details (anyOf 1) | Model | Alternative | Expand 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) | null | Alternative |
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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
application_type | JSON | Optional | |
application_type (anyOf 1) | string | Alternative | The type of application. See [ApplicationType](#type-applicationtype) for possible values Known values: TERMINAL_API |
application_type (anyOf 2) | null | Alternative | |
device_code_id | JSON | Optional | |
device_code_id (anyOf 1) | string | Alternative | The id of the device code that was used to log in to the device. |
device_code_id (anyOf 2) | null | Alternative | |
session_location | JSON | Optional | |
session_location (anyOf 1) | string | Alternative | The location_id of the session for the application. |
session_location (anyOf 2) | null | Alternative | |
version | string | Optional | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
external_power | JSON | Optional | |
external_power (anyOf 1) | string | Alternative | An 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) | null | Alternative | |
visible_percent | JSON | Optional | |
visible_percent (anyOf 1) | JSON | Alternative | |
visible_percent (anyOf 1) (anyOf 1) | integer | Alternative | The battery charge percentage as displayed on the device. |
visible_percent (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
visible_percent (anyOf 2) | null | Alternative |
Get Device — response body — device components A list of components applicable to the device item card reader details version
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
version | string | Optional | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
active | JSON | Optional | |
active (anyOf 1) | boolean | Alternative | A boolean to represent whether the Ethernet interface is currently active. |
active (anyOf 2) | null | Alternative | |
ip_address_v4 | JSON | Optional | |
ip_address_v4 (anyOf 1) | string | Alternative | The string representation of the device’s IPv4 address. |
ip_address_v4 (anyOf 2) | null | Alternative | |
mac_address | JSON | Optional | |
mac_address (anyOf 1) | string | Alternative | The mac address of the device in this network. |
mac_address (anyOf 2) | null | Alternative |
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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
active | JSON | Optional | |
active (anyOf 1) | boolean | Alternative | A boolean to represent whether the WiFI interface is currently active. |
active (anyOf 2) | null | Alternative | |
ip_address_v4 | JSON | Optional | |
ip_address_v4 (anyOf 1) | string | Alternative | The string representation of the device’s IPv4 address. |
ip_address_v4 (anyOf 2) | null | Alternative | |
mac_address | JSON | Optional | |
mac_address (anyOf 1) | string | Alternative | The mac address of the device in this network. |
mac_address (anyOf 2) | null | Alternative | |
secure_connection | JSON | Optional | |
secure_connection (anyOf 1) | string | Alternative | The security protocol for a secure connection (e.g. WPA2). None provided if the connection is unsecured. |
secure_connection (anyOf 2) | null | Alternative | |
signal_strength | JSON | Optional | |
signal_strength (anyOf 1) | Model | Alternative | Expand 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) | null | Alternative | |
ssid | JSON | Optional | |
ssid (anyOf 1) | string | Alternative | The name of the connected WIFI network. |
ssid (anyOf 2) | null | Alternative |
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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A value qualified by unit of measure. |
value | JSON | Optional | |
value (anyOf 1) | JSON | Alternative | |
value (anyOf 1) (anyOf 1) | integer | Alternative | Value of measure. |
value (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
value (anyOf 2) | null | Alternative |
Get Device — response body — device status
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
category | JSON | Optional | |
category (anyOf 1) | string | Alternative | Category of the device status. See [Category](#type-category) for possible values Known values: AVAILABLE, NEEDS_ATTENTION, OFFLINE |
category (anyOf 2) | null | Alternative |
List Device Codes — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
cursor | string | Optional | 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 | array | Optional | The queried DeviceCode. |
device_codes[] | Model | Each item | Expand Get Device Code — response body — device code |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
cursor | string | Optional | The 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. |
devices | array | Optional | The requested list of `Device` objects. |
devices[] | Model | Each item | Expand Get Device — response body — device |
errors | array | Optional | Information about errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
Referenced models: Get Device — response body — device, Get Shift — response body — errors item