• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
Get device code BETA

Retrieves DeviceCode with the associated ID.

Required permissions: DEVICE_CREDENTIAL_MANAGEMENT

Path Parameters

Name Description
id
string

Required

The unique identifier for the device code.

Response Fields

Name Description
errors
Error [ ]

Any errors that occurred during the request.

device_code
DeviceCode

The queried DeviceCode.

Examples

You are viewing an old version of the API
GET /v2/devices/codes/{id}
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
curl https://connect.squareup.com/v2/devices/codes/B3Z6NAMYQSMTM \
  -H 'Square-Version: 2020-06-25' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
Response JSON
{
  "device_code": {
    "id": "B3Z6NAMYQSMTM",
    "name": "Counter 1",
    "code": "EBCARJ",
    "product_type": "TERMINAL_API",
    "location_id": "B5E4484SHHNYH",
    "created_at": "2020-02-06T18:44:33.000Z",
    "pair_by": "2020-02-06T18:49:33.000Z",
    "status": "PAIRED",
    "device_id": "907CS13101300122",
    "status_changed_at": "2020-02-06T18:47:28.000Z"
  }
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?