action square_list_device_codes { label: "ListDeviceCodes" description: "Lists all DeviceCodes associated with the merchant." provider: square method: GET path: "/v2/devices/codes" encoding: json input: { type: "object" properties: { cursor: { type: "string" } location_id: { type: "string" } product_type: { type: "string" } status: { type: "string" } } additionalProperties: false } output: { type: "object" properties: { cursor: { type: "string" description: "A pagination cursor to retrieve the next set of results for your\noriginal query to the endpoint. This value is present only if the request\nsucceeded and additional results are available.\n\nSee [Paginating results](https://developer.squareup.com/docs/working-with-apis/pagination) for more information." } device_codes: { type: "array" description: "The queried DeviceCode." items: { type: "object" required: ["product_type"] properties: { code: { type: "string" description: "The unique code that can be used to login." } created_at: { type: "string" description: "When this DeviceCode was created. Timestamp in RFC 3339 format." } device_id: { type: "string" description: "The unique id of the device that used this code. Populated when the device is paired up." } id: { type: "string" description: "The unique id for this device code." } location_id: { type: "string" description: "The location assigned to this code." } name: { type: "string" description: "An optional user-defined name for the device code." } pair_by: { type: "string" description: "When this DeviceCode will expire and no longer login. Timestamp in RFC 3339 format." } paired_at: { type: "string" description: "When this DeviceCode was paired. Timestamp in RFC 3339 format." } product_type: { type: "string" description: "The targeting product type of the device code." } status: { type: "string" description: "The pairing status of the device code." } status_changed_at: { type: "string" description: "When this DeviceCode's status was last changed. Timestamp in RFC 3339 format." } } } } errors: { type: "array" description: "Any errors that occurred during the request." items: { type: "object" description: "Represents an error encountered during a request to the Connect API.\n\nSee [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information." required: ["category", "code"] properties: { category: { type: "string" description: "The high-level category for the error." } code: { type: "string" description: "The specific code of the error." } detail: { type: "string" description: "A human-readable description of the error for debugging purposes." } field: { type: "string" description: "The name of the field provided in the original request (if any) that\nthe error pertains to." } } } } } } }