DeviceCodes
Creates and lists DeviceCode that can be used to login to a Square Terminal device to enter the connected terminal mode.
Table Specific Information
Select
The add-in uses the Square API to process search criteria that refer to the Id column, while other filters are processed client side within the add-in.
Retrieve all DeviceCodes associated with the merchant.
SELECT * from DeviceCodes
Retrieve a DeviceCode with the associated ID.
SELECT * from DeviceCodes where id = 'E4RB0XKDX01A1'
Insert
To create a device code, you will need to specify the targeting product type of the device code.
INSERT INTO DeviceCodes(ProductType, Name) Values('TERMINAL_API','TestName@001')
Columns
Name | Type | ReadOnly | Description |
Id [KEY] | String | True |
The unique id for this device code. |
Name | String | False |
An optional user-defined name for the device code. |
Code | String | True |
The unique code that can be used to login. |
DeviceId | String | True |
The unique id of the device that used this code. Populated when the device is paired up. |
ProductType | String | False |
The targeting product type of the device code. |
LocationId | String | False |
The location assigned to this code. |
PairBy | String | True |
When this DeviceCode will expire and no longer login. Timestamp in RFC 3339 format. |
CreatedAt | String | True |
When this DeviceCode was created. Timestamp in RFC 3339 format. |
StatusChangedAt | String | True |
When this DeviceCode's status was last changed. Timestamp in RFC 3339 format. |
PairedAt | String | True |
When this DeviceCode was paired. Timestamp in RFC 3339 format. |
Status | String | True |
The pairing status of the device code. |