{
  "opencollection": "1.0.0",
  "info": {
    "name": "IO.Common Accounts Devices API",
    "version": "1.0"
  },
  "request": {
    "auth": {
      "type": "oauth2",
      "flow": "authorization_code",
      "authorizationUrl": "https://identity.scanbro.com/connect/authorize",
      "accessTokenUrl": "https://identity.scanbro.com/connect/token",
      "credentials": {
        "clientId": "{{clientId}}",
        "clientSecret": "{{clientSecret}}"
      }
    }
  },
  "items": [
    {
      "info": {
        "name": "Devices",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Returns list of available device commands",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v1/Devices/commands",
            "params": [
              {
                "name": "Account",
                "value": "",
                "type": "query",
                "description": "Account"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://identity.scanbro.com/connect/authorize",
              "accessTokenUrl": "https://identity.scanbro.com/connect/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns list of available device commands"
        },
        {
          "info": {
            "name": "Returns list of devices for the tenant",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v1/Devices",
            "params": [
              {
                "name": "status",
                "value": "",
                "type": "query"
              },
              {
                "name": "Filter",
                "value": "",
                "type": "query"
              },
              {
                "name": "Page",
                "value": "",
                "type": "query"
              },
              {
                "name": "PageSize",
                "value": "",
                "type": "query"
              },
              {
                "name": "SortColumn",
                "value": "",
                "type": "query"
              },
              {
                "name": "SortOrder",
                "value": "",
                "type": "query"
              },
              {
                "name": "Account",
                "value": "",
                "type": "query",
                "description": "Account"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://identity.scanbro.com/connect/authorize",
              "accessTokenUrl": "https://identity.scanbro.com/connect/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns list of devices for the tenant"
        },
        {
          "info": {
            "name": "Returns device details",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v1/Devices/:deviceId",
            "params": [
              {
                "name": "deviceId",
                "value": "",
                "type": "path"
              },
              {
                "name": "Account",
                "value": "",
                "type": "query",
                "description": "Account"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://identity.scanbro.com/connect/authorize",
              "accessTokenUrl": "https://identity.scanbro.com/connect/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns device details"
        },
        {
          "info": {
            "name": "Update tenant device information",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "{{baseUrl}}/v1/Devices/:deviceId",
            "params": [
              {
                "name": "deviceId",
                "value": "",
                "type": "path"
              },
              {
                "name": "Account",
                "value": "",
                "type": "query",
                "description": "Account"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://identity.scanbro.com/connect/authorize",
              "accessTokenUrl": "https://identity.scanbro.com/connect/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Update tenant device information"
        },
        {
          "info": {
            "name": "Delete tenant device",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/v1/Devices/:deviceId",
            "params": [
              {
                "name": "deviceId",
                "value": "",
                "type": "path"
              },
              {
                "name": "Account",
                "value": "",
                "type": "query",
                "description": "Account"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://identity.scanbro.com/connect/authorize",
              "accessTokenUrl": "https://identity.scanbro.com/connect/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Delete tenant device"
        },
        {
          "info": {
            "name": "Send FireBase command to the device",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/v1/Devices/:deviceId/command",
            "params": [
              {
                "name": "deviceId",
                "value": "",
                "type": "path"
              },
              {
                "name": "Account",
                "value": "",
                "type": "query",
                "description": "Account"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://identity.scanbro.com/connect/authorize",
              "accessTokenUrl": "https://identity.scanbro.com/connect/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Send FireBase command to the device"
        },
        {
          "info": {
            "name": "Notifies all devices in the location to sync users",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/v1/Devices/locations/:locationId/sync_users",
            "params": [
              {
                "name": "locationId",
                "value": "",
                "type": "path"
              },
              {
                "name": "Account",
                "value": "",
                "type": "query",
                "description": "Account"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://identity.scanbro.com/connect/authorize",
              "accessTokenUrl": "https://identity.scanbro.com/connect/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Notifies all devices in the location to sync users"
        },
        {
          "info": {
            "name": "Returns list of device heartbeats",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v1/Devices/:deviceId/heartbeats",
            "params": [
              {
                "name": "deviceId",
                "value": "",
                "type": "path"
              },
              {
                "name": "Filter",
                "value": "",
                "type": "query"
              },
              {
                "name": "Page",
                "value": "",
                "type": "query"
              },
              {
                "name": "PageSize",
                "value": "",
                "type": "query"
              },
              {
                "name": "SortColumn",
                "value": "",
                "type": "query"
              },
              {
                "name": "SortOrder",
                "value": "",
                "type": "query"
              },
              {
                "name": "Account",
                "value": "",
                "type": "query",
                "description": "Account"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://identity.scanbro.com/connect/authorize",
              "accessTokenUrl": "https://identity.scanbro.com/connect/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns list of device heartbeats"
        },
        {
          "info": {
            "name": "Returns list of device events",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v1/Devices/:deviceId/events",
            "params": [
              {
                "name": "deviceId",
                "value": "",
                "type": "path"
              },
              {
                "name": "Filter",
                "value": "",
                "type": "query"
              },
              {
                "name": "Page",
                "value": "",
                "type": "query"
              },
              {
                "name": "PageSize",
                "value": "",
                "type": "query"
              },
              {
                "name": "SortColumn",
                "value": "",
                "type": "query"
              },
              {
                "name": "SortOrder",
                "value": "",
                "type": "query"
              },
              {
                "name": "Account",
                "value": "",
                "type": "query",
                "description": "Account"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://identity.scanbro.com/connect/authorize",
              "accessTokenUrl": "https://identity.scanbro.com/connect/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns list of device events"
        },
        {
          "info": {
            "name": "Pre register tenant dedicated device",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/v1/Devices/dedicated/register/pre",
            "params": [
              {
                "name": "Account",
                "value": "",
                "type": "query",
                "description": "Account"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://identity.scanbro.com/connect/authorize",
              "accessTokenUrl": "https://identity.scanbro.com/connect/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Pre register tenant dedicated device"
        },
        {
          "info": {
            "name": "Authorise dedicated device to aquire new secret",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/v1/Devices/:deviceId/regen",
            "params": [
              {
                "name": "deviceId",
                "value": "",
                "type": "path"
              },
              {
                "name": "Account",
                "value": "",
                "type": "query",
                "description": "Account"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://identity.scanbro.com/connect/authorize",
              "accessTokenUrl": "https://identity.scanbro.com/connect/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Authorise dedicated device to aquire new secret"
        },
        {
          "info": {
            "name": "Returns list of free cabinets for the tenant, optionally filtered by cabinet type",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v1/Devices/free-cabinets",
            "params": [
              {
                "name": "tenantId",
                "value": "",
                "type": "query"
              },
              {
                "name": "cabinetType",
                "value": "",
                "type": "query"
              },
              {
                "name": "Account",
                "value": "",
                "type": "query",
                "description": "Account"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://identity.scanbro.com/connect/authorize",
              "accessTokenUrl": "https://identity.scanbro.com/connect/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns list of free cabinets for the tenant, optionally filtered by cabinet type"
        }
      ]
    }
  ],
  "bundled": true
}