POST /v2/devices/codes
Creates a DeviceCode that can be used to login to a Square Terminal device to enter the connected terminal mode.
Servers
- https://connect.squareup.com
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
device_code |
Object | Yes | |
device_code.id |
String | No |
The unique id for this device code. |
device_code.location_id |
String | No |
The location assigned to this code. |
device_code.name |
String | No |
An optional user-defined name for the device code. |
device_code.product_type |
String | Yes |
The targeting product type of the device code. |
device_code.device_id |
String | No |
The unique id of the device that used this code. Populated when the device is paired up. |
device_code.paired_at |
String | No |
When this DeviceCode was paired. Timestamp in RFC 3339 format. |
device_code.status |
String | No |
The pairing status of the device code. |
device_code.code |
String | No |
The unique code that can be used to login. |
device_code.created_at |
String | No |
When this DeviceCode was created. Timestamp in RFC 3339 format. |
device_code.status_changed_at |
String | No |
When this DeviceCode's status was last changed. Timestamp in RFC 3339 format. |
device_code.pair_by |
String | No |
When this DeviceCode will expire and no longer login. Timestamp in RFC 3339 format. |
idempotency_key |
String | Yes |
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 for more information. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.