action squareup_create_device_code { label: "CreateDeviceCode" description: "Creates a DeviceCode that can be used to login to a Square Terminal device to enter the connected\nterminal mode." provider: squareup method: POST path: "/v2/devices/codes" encoding: json input: { type: "object" required: ["device_code", "idempotency_key"] properties: { device_code: { 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." } } } idempotency_key: { type: "string" description: "A unique string that identifies this CreateDeviceCode request. Keys can\nbe any valid string but must be unique for every CreateDeviceCode request.\n\nSee [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information." } } } output: { type: "object" properties: { device_code: { 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." } } } } } } }