Devices
CreateDeviceCode
Creates a DeviceCode that can be used to login to a Square Terminal device to enter the connected terminal mode.
post/v2/devices/codes
Request body
Example request
{
"request_body": {
"device_code": {
"location_id": "B5E4484SHHNYH",
"name": "Counter 1",
"product_type": "TERMINAL_API"
},
"idempotency_key": "01bb00a6-0c86-4770-94ed-f5fca973cd56"
}
}Response
Success
Example response
{
"device_code": {
"code": "EBCARJ",
"created_at": "2020-02-06T18:44:33.000Z",
"id": "B3Z6NAMYQSMTM",
"location_id": "B5E4484SHHNYH",
"name": "Counter 1",
"pair_by": "2020-02-06T18:49:33.000Z",
"product_type": "TERMINAL_API",
"status": "UNPAIRED",
"status_changed_at": "2020-02-06T18:44:33.000Z"
}
}