CData Python Connector for Square

Build 26.0.9770

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 connector uses the Square API to filter the results by the following columns and operators while the rest of the filter is executed client-side within the connector.

  • Id supports the following operator: =.
  • ProductType supports the following operator: =.
  • LocationId supports the following operator: =.
  • Status supports the following operator: =.

Retrieve all device codes associated with the merchant:

SELECT * FROM DeviceCodes

Retrieve a device code with the associated Id:

SELECT * FROM DeviceCodes WHERE Id = 'E4RB0XKDX01A1'

Insert

To create a device code, you must specify the target 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.

The allowed values are TERMINAL_API.

LocationId String False

The location assigned to this code.

PairBy String True

Specifies when this device code will expire and no longer log in. Timestamp in RFC 3339 format.

CreatedAt Datetime True

Specifies when this device code was created. Timestamp in RFC 3339 format.

StatusChangedAt Datetime True

Specifies when this device code's status was last changed. Timestamp in RFC 3339 format.

PairedAt Datetime True

Specifies when this device code was paired. Timestamp in RFC 3339 format.

Status String True

The pairing status of the device code.

The allowed values are UNKNOWN, UNPAIRED, PAIRED, EXPIRED.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 26.0.9770