Development
  • Guides
  • API Reference
  • API Explorer
  • SDKs
  • Sample apps
  • System status
Support
  • Developer forums
  • Developer blog
  • YouTube
  • X
More
  • Square Home
  • Square Developer
  • App Marketplace
  • Partner with Square
  • Solutions Partner Program
  • Pricing
  • Sales

© 2026 Square, Inc.

  • Developer terms of service
  • Developer Integration and Marketing Agreement
  • Privacy policy
  • Partnerships
  • Sign In
  • Sign In

    Devices

  • List devices

  • List device codes

  • Create device code

  • Get device code

  • Get device

  • Webhooks

  • device.code.paired

  • device.created

<- Devices API

Devices API

All versions ->

Get device code

GET

 /v2/devices/codes/{id}

Retrieves DeviceCode with the associated ID.

Permissions:DEVICE_CREDENTIAL_MANAGEMENT
Try in API Explorer
Link to section

Path parameters

Example code

Link to section

id

string

Required

The unique identifier for the device code.

Link to section

Response fields

Link to section

errors

Any errors that occurred during the request.

Link to section

device_code

The queried DeviceCode.

Link to section

Examples

All versions ->

GET /v2/devices/codes/{id}
curl https://connect.squareup.com/v2/devices/codes/B3Z6NAMYQSMTM \ -H 'Square-Version: 2026-11-18' \ -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" } }