{
  "opencollection": "1.0.0",
  "info": {
    "name": "Square ApplePay Devices API",
    "version": "2.0"
  },
  "items": [
    {
      "info": {
        "name": "Devices",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Square List Devices",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://connect.squareup.com/v2/devices",
            "params": [
              {
                "name": "cursor",
                "value": "",
                "type": "query",
                "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information."
              },
              {
                "name": "sort_order",
                "value": "",
                "type": "query",
                "description": "The order in which results are listed.\n- `ASC` - Oldest to newest.\n- `DESC` - Newest to oldest (default)."
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "The number of results to return in a single page."
              },
              {
                "name": "location_id",
                "value": "",
                "type": "query",
                "description": "If present, only returns devices at the target location."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://connect.squareup.com/oauth2/authorize",
              "accessTokenUrl": "https://connect.squareup.com/oauth2/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "List devices associated with the merchant. Currently, only Terminal API\ndevices are supported."
        },
        {
          "info": {
            "name": "Square List Device Codes",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://connect.squareup.com/v2/devices/codes",
            "params": [
              {
                "name": "cursor",
                "value": "",
                "type": "query",
                "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for your original query.\n\nSee [Paginating results](https://developer.squareup.com/docs/working-with-apis/pagination) for more information."
              },
              {
                "name": "location_id",
                "value": "",
                "type": "query",
                "description": "If specified, only returns DeviceCodes of the specified location.\nReturns DeviceCodes of all locations if empty."
              },
              {
                "name": "product_type",
                "value": "",
                "type": "query",
                "description": "If specified, only returns DeviceCodes targeting the specified product type.\nReturns DeviceCodes of all product types if empty."
              },
              {
                "name": "status",
                "value": "",
                "type": "query",
                "description": "If specified, returns DeviceCodes with the specified statuses.\nReturns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://connect.squareup.com/oauth2/authorize",
              "accessTokenUrl": "https://connect.squareup.com/oauth2/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Lists all DeviceCodes associated with the merchant."
        },
        {
          "info": {
            "name": "Square Create Device Code",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://connect.squareup.com/v2/devices/codes",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://connect.squareup.com/oauth2/authorize",
              "accessTokenUrl": "https://connect.squareup.com/oauth2/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Creates a DeviceCode that can be used to login to a Square Terminal device to enter the connected\nterminal mode."
        },
        {
          "info": {
            "name": "Square Get Device Code",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://connect.squareup.com/v2/devices/codes/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The unique identifier for the device code."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://connect.squareup.com/oauth2/authorize",
              "accessTokenUrl": "https://connect.squareup.com/oauth2/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Retrieves DeviceCode with the associated ID."
        },
        {
          "info": {
            "name": "Square Get Device",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://connect.squareup.com/v2/devices/:device_id",
            "params": [
              {
                "name": "device_id",
                "value": "",
                "type": "path",
                "description": "The unique ID for the desired `Device`."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://connect.squareup.com/oauth2/authorize",
              "accessTokenUrl": "https://connect.squareup.com/oauth2/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Retrieves Device with the associated `device_id`."
        }
      ]
    }
  ],
  "bundled": true
}