NAV Navbar
shell ruby python php java javascript

Introduction

Welcome to the Raixer API, a HTTP-based RESTful API that uses HTTP Basic Auth for authorization and has all request and response bodies formatted in JSON. You can use our API to interact with our entire platform and, specially, to interact with our awesome Raixer devices.

We have several language bindings! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

This documentation was created with Slate.

Authentication

Example request:

curl "api_endpoint_here" \
  -H "Authorization: Basic your_encoded_base64_string"
require 'net/http'
require 'uri'

headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("api_endpoint_here")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("api_endpoint_here", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "api_endpoint_here");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet req = new HttpGet("api_endpoint_here");

req.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(req);
const https = require("https")

let req = https.get("api_endpoint_here", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})

Make sure to replace your_encoded_base64_string with your encoded base 64 string including your API username and password.

We use HTTP Basic Auth to allow access to our API. Please, contact us at hello@raixer.com to get one. While you get your credentials from us, please, register on our great App and configure your devices, so you can use them.

We expect your private API username and password to be included as an Authorization Header in all of the requests you make. In, more or less words, this is:

  1. Make a string of this form: your_api_username:your_api_password
  2. Encode the obtained string in base 64
  3. Put the encoded string in an HTTP Header called Authorization with the value Basic your_encoded_base64_string

Authorized Phones

Example authorized phone:

{
  "_id": "edcba54321",
  "deviceId": "abcde12345",
  "phoneNumber": 123456789,
  "owner": "fghjkl67890",
  "created": "2018-09-17T14:36:10.446Z",
  "updated": "2018-09-17T14:36:10.446Z"
}

To allow a specific phone number, from all around the world, access to a device, you create an authorized phone. The API allows you to create, update or delete an authorized phone. You can retrieve an individual phone as well as list all of them associated to a device. Authorized phones are identified by a unique, random ID.

Create an Authorized Phone

Example request:

curl "https://api.raixer.com/authorized-phones" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
  -d '{"deviceId": "abcde12345", "phoneNumber": 123456789}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/authorized-phones")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

body = {
  "deviceId": "abcde12345",
  "phoneNumber": 123456789
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"deviceId": "abcde12345", "phoneNumber": 123456789}
req = requests.post("https://api.raixer.com/authorized-phones", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$body = [
  "deviceId" => "abcde12345",
  "phoneNumber" => 123456789
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/authorized-phones");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject body = new JSONObject();
body.put("deviceId", "abcde12345");
body.put("phoneNumber", 123456789);
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/authorized-phones");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {"deviceId": "abcde12345", "phoneNumber": 123456789}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "authorized-phones",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

{
  "insertedId": "edcba54321",
  "result": {
      "n": 1,
      "ok": 1
  }
}

Creates a new authorized phone.

HTTP Request

POST https://api.raixer.com/authorized-phones

Body Parameters

Parameter Required Default Description
deviceId Yes N/A A string that specifies the device associated to the phone
phoneNumber Yes N/A A number that specifies the phone number that will access the device, including the country extension
authorized No true A boolean that specifies if the phone is authorized or not to access the device.

Update an Authorized Phone

Example request:

curl "https://api.raixer.com/authorized-phones/edcba54321" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X PUT
  -d '{"deviceId": "abcde12345", "phoneNumber": 123456789}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/authorized-phones/edcba54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Put.new(uri.request_uri, headers)

body = {
  "deviceId": "abcde12345",
  "phoneNumber": 123456789
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"deviceId": "abcde12345", "phoneNumber": 123456789}
req = requests.put("https://api.raixer.com/authorized-phones/edcba54321", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$body = [
  "deviceId" => "abcde12345",
  "phoneNumber" => 123456789
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/authorized-phones/edcba54321");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject body = new JSONObject();
body.put("deviceId", "abcde12345");
body.put("phoneNumber", 123456789);
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPut("https://api.raixer.com/authorized-phones/edcba54321");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {"deviceId": "abcde12345", "phoneNumber": 123456789}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "authorized-phones/edcba54321",
  "method": "PUT",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

{
  "n": 1,
  "nModified": 1,
  "ok": 1
}

Updates an authorized phone.

HTTP Request

PUT https://api.raixer.com/authorized-phones/:id

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the authorized phone to update

Body Parameters

Parameter Required Default Description
deviceId Yes N/A A string that specifies the device associated to the phone
phoneNumber Yes N/A A number that specifies the phone number that will access the device, including the country extension
authorized No true A boolean that specifies if the phone is authorized or not to access the device.

Delete an Authorized Phone

Example request:

curl "https://api.raixer.com/authorized-phones/edcba54321" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -X DELETE
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/authorized-phones/edcba54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Delete.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.delete("https://api.raixer.com/authorized-phones/edcba54321", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/authorized-phones/edcba54321");
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpDelete("https://api.raixer.com/authorized-phones/edcba54321");

req.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(req);
const https = require("https")

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "authorized-phones/edcba54321",
  "method": "DELETE",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string"
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write()
req.end()

Example response:

{
  "n": 1,
  "ok": 1
}

Deletes an authorized phone.

HTTP Request

DELETE https://api.raixer.com/authorized-phones/:id

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the authorized phone to delete

Get an Authorized Phone

Example request:

curl "https://api.raixer.com/authorized-phones/edcba54321"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/authorized-phones/edcba54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/authorized-phones/edcba54321", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/authorized-phones/edcba54321");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/authorized-phones/edcba54321");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/authorized-phones/edcba54321", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
});
req.on("error", (err) => {
  // Handle error
})

Example response:

{
  "_id": "edcba54321",
  "deviceId": "abcde12345",
  "phoneNumber": 123456789,
  "owner": "fghjkl67890",
  "created": "2018-09-17T14:36:10.446Z",
  "updated": "2018-09-17T14:36:10.446Z"
}

Retrieves the details of an authorized phone that has previously been created.

HTTP Request

GET https://api.raixer.com/authorized-phones/:id

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the authorized phone to retrieve

Get all Authorized Phones of a Device

Example request:

curl "https://api.raixer.com/authorized-phones/device/abcde12345"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/authorized-phones/device/abcde12345")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/authorized-phones/device/abcde12345", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/authorized-phones/device/abcde12345");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/authorized-phones/device/abcde12345");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/authorized-phones/device/abcde12345", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})

Example response:

[
  1234567890,
  9876543210
]

Retrieves the numbers of all of the authorized phones associated to one device.

HTTP Request

GET https://api.raixer.com/authorized-phones/device/:deviceId

Parameters

Parameter Required Default Description
deviceId Yes N/A A string that specifies the ID of the device associated to the authorized phones to retrieve

Connections

Example connection:

{
    "_id" : "edcba54321",
    "owner" : "fghjkl67890",
    "deviceId" : "abcde12345",
    "profile" : "user",
    "disabled" : false,
    "created" : "2018-08-17T08:19:35.462Z",
    "updated" : "2018-08-17T08:25:33.785Z",
    "name" : "Lorem ipsum"
}

To control a specific device, no matter where it is, you must have a connection. The API allows you to create, update or delete a connection in multiple ways. You can retrieve an individual connection as well as list all of them associated to a user, ordered or not. Connections are identified by a unique, random ID and are always associated to an user and a device.

Create a Connection

Example request:

curl "https://api.raixer.com/connections" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
  -d '{"deviceId": "abcde12345", "name": "Lorem ipsum", "deviceOwner": "fghjkl67890"}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/connections")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

body = {
    "deviceId": "abcde12345", 
  "name": "Lorem ipsum",
  "deviceOwner": "fghjkl67890"
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"deviceId": "abcde12345", "name": "Lorem ipsum", "deviceOwner": "fghjkl67890"}
req = requests.post("https://api.raixer.com/connections", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$body = [
  "deviceId" => "abcde12345", 
  "name" => "Lorem ipsum",
  "deviceOwner" => "fghjkl67890"
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/connections");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject body = new JSONObject();
body.put("deviceId", "abcde12345");
body.put("name", "Lorem ipsum");
body.put("deviceOwner", "fghjkl67890");
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/connections");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {"deviceId": "abcde12345", "name": "Lorem ipsum", "deviceOwner": "fghjkl67890"}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "connections",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

// List of ordered connections of the user, including the newly created one
[
  // Intercom connections
  [
    {
      "_id": "edcba54321",
      "owner": "fghjkl67890",
      "deviceId": "abcde12345",
      "profile": "admin",
      "created": "2018-09-18T08:01:10.614Z",
      "updated": "2018-09-18T08:01:10.614Z",
      "device": {
        ...
        "doors": [
          {
            ...
          }
        ],
        "inUseComplete": [
          ...
        ],
        "openingsComplete": [
          ...
        ],
        "campaign": {
          ...
        },
        ...
      }
    },
    ...
  ],
  // Power connections
  [
    {
      "_id": "edcba54322",
      "deviceId": "abcde54321",
      "owner": "fghjkl67890",
      "name": "Lorem ipsum",
      "created": "2018-06-15T07:30:38.200Z",
      "updated": "2018-06-15T07:30:38.200Z",
      "profile": "user",
      "disabled": false,
      "device": {
        ...
      }
    }
  ]
]

Creates a new connection.

HTTP Request

POST https://api.raixer.com/connections

Body Parameters

Parameter Required Default Description
deviceId Yes N/A A string that specifies the device associated to the connection.
profile No N/A A string that specifies the level of control given to the owner of the connection for the associated device. Must be one of the following: 'user', 'admin', 'installer'. If not specified, the resulting profile will depend of the passing or not of the deviceOwner parameter.
disabled No N/A A boolean that specifies if the connection is disabled or not.
name No N/A A string that specifies the name you want to the connection.
deviceOwer No N/A A string that specifies the owner of the device associated to the connection. If not passed (and the profile is not passed also), the profile of the connection will be 'admin'. If passed (and the profile is passed also), the profile of the connection will 'admin' if the parameter value is the same as the ID of the user making the request, if not, it will be 'user'. If this parameter is not passed, the device will be updated to change its owner to the user making this request.

Update a Connection

Example request:

curl "https://api.raixer.com/connections/edcba54321" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X PUT
  -d '{"name": "Lorem ipsum", "profile": "user", "disabled": false}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/connections/edcba54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Put.new(uri.request_uri, headers)

body = {
  "name": "Lorem ipsum",
  "profile": "user",
  "disabled": false
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"name": "Lorem ipsum", "profile": "user", "disabled": false}
req = requests.put("https://api.raixer.com/connections/edcba54321", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$body = [
  "name" => "Lorem ipsum", 
  "profile" => "user", 
  "disabled" => false
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/connections/edcba54321");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject body = new JSONObject();
body.put("name", "Lorem ipsum");
body.put("profile", "user");
body.put("disabled", false);
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPut("https://api.raixer.com/connections/edcba54321");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {"name": "Lorem ipsum", "profile": "user", "disabled": false}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "connections/edcba54321",
  "method": "PUT",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

{
  "n": 1,
  "nModified": 1,
  "ok": 1
}

Updates a connection.

HTTP Request

PUT https://api.raixer.com/connections/:id

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the connection to update

Body Parameters

Parameter Required Default Description
profile No N/A A string that specifies the level of control given to the owner of the connection for the associated device. Must be one of the following: 'user', 'admin', 'installer'.
disabled No N/A A boolean that specifies if the connection is disabled or not.
name No N/A A string that specifies the name you want to the connection.

Delete a Connection

Example request:

curl "https://api.raixer.com/connections/edcba54321" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -X DELETE
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/connections/edcba54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Delete.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.delete("https://api.raixer.com/connections/edcba54321", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/connections/edcba54321");
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpDelete("https://api.raixer.com/connections/edcba54321");

req.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(req);
const https = require("https")

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "connections/edcba54321",
  "method": "DELETE",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string"
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write()
req.end()

Example response:

{
  "n": 1,
  "ok": 1
}

Deletes a connection.

HTTP Request

DELETE https://api.raixer.com/connections/:id

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the connection to delete

Enable Connections to a Device by User Email

Example request:

curl "https://api.raixer.com/connections/by/device/abcde12345/enable/by/email" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
  -d '{"email": "jon.doe@a.b"}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/connections/by/device/abcde12345/enable/by/email")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

body = {
  "email": "jon.doe@a.b"
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"email": "jon.doe@a.b"}
req = requests.post("https://api.raixer.com/connections/by/device/abcde12345/enable/by/email", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$body = [
  "email" => "jon.doe@a.b"
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/connections/by/device/abcde12345/enable/by/email");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject body = new JSONObject();
body.put("email", "jon.doe@a.b");
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/connections/by/device/abcde12345/enable/by/email");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {"email": "jon.doe@a.b"}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "connections/by/device/abcde12345/enable/by/email",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

// All connections to the device
[
  {
    "_id": "edcba54321",
    "deviceId": "abcde12345",
    "owner": "fghjkl67890",
    "profile": "admin",
    "disabled": false,
    "name": "Sit amet",
    "created": "2018-08-17T08:30:15.105Z",
    "updated": "2018-08-17T10:07:59.966Z",
    "ownerName": "Jon Doe",
    "ownerEmail": "jon.doe@a.b"
  },
  {
    "_id": "edcba54322",
    "owner": "abcde67890",
    "deviceId": "abcde12345",
    "profile": "admin",
    "created": "2018-09-18T08:01:10.614Z",
    "updated": "2018-09-18T09:51:25.002Z",
    "disabled": false,
    "name": "Lorem ipsum",
    "ownerName": "Jane Doe",
    "ownerEmail": "jane.doe@a.b"
  },
  ...
]

Enables all connections to a device by an user email.

HTTP Request

POST https://api.raixer.com/connections/by/device/:deviceId/enable/by/email

Parameters

Parameter Required Default Description
deviceId Yes N/A A string that specifies the ID of the device associated to the connections to enable.

Body Parameters

Parameter Required Default Description
email Yes N/A A string that specifies the user email owner of the connections to be enabled.

Disable Connections to a Device by User Email

Example request:

curl "https://api.raixer.com/connections/by/device/abcde12345/disable/by/email" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
  -d '{"email": "jon.doe@a.b"}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/connections/by/device/abcde12345/disable/by/email")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

body = {
  "email": "jon.doe@a.b"
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"email": "jon.doe@a.b"}
req = requests.post("https://api.raixer.com/connections/by/device/abcde12345/disable/by/email", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$body = [
  "email" => "jon.doe@a.b"
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/connections/by/device/abcde12345/disable/by/email");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject body = new JSONObject();
body.put("email", "jon.doe@a.b");
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/connections/by/device/abcde12345/disable/by/email");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {"email": "jon.doe@a.b"}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "connections/by/device/abcde12345/disable/by/email",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

// All connections to the device
[
  {
    "_id": "edcba54321",
    "deviceId": "abcde12345",
    "owner": "fghjkl67890",
    "profile": "admin",
    "disabled": false,
    "name": "Sit amet",
    "created": "2018-08-17T08:30:15.105Z",
    "updated": "2018-08-17T10:07:59.966Z",
    "ownerName": "Jon Doe",
    "ownerEmail": "jon.doe@a.b"
  },
  {
    "_id": "edcba54322",
    "owner": "abcde67890",
    "deviceId": "abcde12345",
    "profile": "admin",
    "created": "2018-09-18T08:01:10.614Z",
    "updated": "2018-09-18T09:51:25.002Z",
    "disabled": false,
    "name": "Lorem ipsum",
    "ownerName": "Jane Doe",
    "ownerEmail": "jane.doe@a.b"
  },
  ...
]

Disables all connections to a device by an user email.

HTTP Request

POST https://api.raixer.com/connections/by/device/:deviceId/disable/by/email

Parameters

Parameter Required Default Description
deviceId Yes N/A A string that specifies the ID of the device associated to the connections to disable.

Body Parameters

Parameter Required Default Description
email Yes N/A A string that specifies the user email owner of the connections to be disabled.

Delete Connections to a Device by User Email

Example request:

curl "https://api.raixer.com/connections/by/device/abcde12345/delete/by/email" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
  -d '{"email": "jon.doe@a.b"}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/connections/by/device/abcde12345/delete/by/email")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

body = {
  "email": "jon.doe@a.b"
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"email": "jon.doe@a.b"}
req = requests.post("https://api.raixer.com/connections/by/device/abcde12345/delete/by/email", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$body = [
  "email" => "jon.doe@a.b"
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/connections/by/device/abcde12345/delete/by/email");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject body = new JSONObject();
body.put("email", "jon.doe@a.b");
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/connections/by/device/abcde12345/delete/by/email");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {"email": "jon.doe@a.b"}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "connections/by/device/abcde12345/delete/by/email",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

// All connections to the device
[
  {
    "_id": "edcba54321",
    "deviceId": "abcde12345",
    "owner": "fghjkl67890",
    "profile": "admin",
    "disabled": false,
    "name": "Sit amet",
    "created": "2018-08-17T08:30:15.105Z",
    "updated": "2018-08-17T10:07:59.966Z",
    "ownerName": "Jon Doe",
    "ownerEmail": "jon.doe@a.b"
  },
  {
    "_id": "edcba54322",
    "owner": "abcde67890",
    "deviceId": "abcde12345",
    "profile": "admin",
    "created": "2018-09-18T08:01:10.614Z",
    "updated": "2018-09-18T09:51:25.002Z",
    "disabled": false,
    "name": "Lorem ipsum",
    "ownerName": "Jane Doe",
    "ownerEmail": "jane.doe@a.b"
  },
  ...
]

Deletes all connections to a device by an user email.

HTTP Request

POST https://api.raixer.com/connections/by/device/:deviceId/delete/by/email

Parameters

Parameter Required Default Description
deviceId Yes N/A A string that specifies the ID of the device associated to the connections to delete.

Body Parameters

Parameter Required Default Description
email Yes N/A A string that specifies the user email owner of the connections to be deleted.

Update Connections to a Device by User Email

Example request:

curl "https://api.raixer.com/connections/by/device/abcde12345/update/by/email" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
  -d '{"email": "jon.doe@a.b"}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/connections/by/device/abcde12345/update/by/email")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

body = {
  "email": "jon.doe@a.b"
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"email": "jon.doe@a.b"}
req = requests.post("https://api.raixer.com/connections/by/device/abcde12345/update/by/email", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$body = [
  "email" => "jon.doe@a.b"
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/connections/by/device/abcde12345/update/by/email");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject body = new JSONObject();
body.put("email", "jon.doe@a.b");
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/connections/by/device/abcde12345/update/by/email");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {"email": "jon.doe@a.b"}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "connections/by/device/abcde12345/update/by/email",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

// All connections to the device
[
  {
    "_id": "edcba54321",
    "deviceId": "abcde12345",
    "owner": "fghjkl67890",
    "profile": "admin",
    "disabled": false,
    "name": "Sit amet",
    "created": "2018-08-17T08:30:15.105Z",
    "updated": "2018-08-17T10:07:59.966Z",
    "ownerName": "Jon Doe",
    "ownerEmail": "jon.doe@a.b"
  },
  {
    "_id": "edcba54322",
    "owner": "abcde67890",
    "deviceId": "abcde12345",
    "profile": "admin",
    "created": "2018-09-18T08:01:10.614Z",
    "updated": "2018-09-18T09:51:25.002Z",
    "disabled": false,
    "name": "Lorem ipsum",
    "ownerName": "Jane Doe",
    "ownerEmail": "jane.doe@a.b"
  },
  ...
]

Updates the profile of all connections to a device by an user email.

HTTP Request

POST https://api.raixer.com/connections/by/device/:deviceId/update/by/email

Parameters

Parameter Required Default Description
deviceId Yes N/A A string that specifies the ID of the device associated to the connections to delete.

Body Parameters

Parameter Required Default Description
email Yes N/A A string that specifies the user email owner of the connections to be deleted.
profile Yes N/A A string that specifies the level of control given to the owner of the connection for the associated device. Must be one of the following: 'user', 'admin', 'installer'.

Get all Connections to a Device

Example request:

curl "https://api.raixer.com/connections/by/device/abcde12345"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/connections/by/device/abcde12345")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/connections/by/device/abcde12345", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/connections/by/device/abcde12345");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/connections/by/device/abcde12345");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/connections/by/device/abcde12345", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})

Example response:

[
  {
    "_id": "9876543210",
    "owner": "a1b2c3d4e5",
    "deviceId": "abcde12345",
    "profile": "admin",
    "disabled": false,
    "created": "2018-07-12T09:02:30.664Z",
    "updated": "2018-08-04T09:18:16.966Z",
    "name": "Street 1, Madrid",
    "ownerName": "Jon Doe",
    "ownerEmail": "jon.doe@a.b"
  },
  {
    "_id": "1234567890",
    "owner": "5e4d3c2b1a",
    "deviceId": "abcde12345",
    "profile": "user",
    "disabled": true,
    "created": "2018-07-12T09:02:30.664Z",
    "updated": "2018-08-04T09:18:16.966Z",
    "name": "Street 1, Madrid",
    "ownerName": "Jane Doe",
    "ownerEmail": "jane.doe@a.b"
  },
  ...
]

Retrieves all the connections to a given device, with the information of the users associated to each og them.

HTTP Request

GET https://api.raixer.com/connections/by/device/:deviceId

Parameters

Parameter Required Default Description
deviceId Yes N/A A string that specifies the ID of the device associated to the connections to delete.

Get a Connection

Example request:

curl "https://api.raixer.com/connections/edcba54321"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/connections/edcba54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/connections/edcba54321", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/connections/edcba54321");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/connections/edcba54321");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/connections/edcba54321", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
});
req.on("error", (err) => {
  // Handle error
})

Example response:

{
  "_id": "edcba54321",
  "owner": "fghjkl67890",
  "deviceId": "abcde12345",
  "profile": "admin",
  "created": "2018-09-18T08:01:10.614Z",
  "updated": "2018-09-18T09:51:25.002Z",
  "disabled": false,
  "name": "Lorem ipsum",
  "schedules": [
    ...
  ],
  "device": {
    ...
  }
}

Retrieves the details of a connection that has previously been created.

HTTP Request

GET https://api.raixer.com/connections/:id

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the connection to retrieve

Get all Connections (Unordered)

Example request:

curl "https://api.raixer.com/connections"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/connections")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/connections", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/connections");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/connections");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/connections", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})

Example response:

// List of unordered connections of the user
[
  {
    "_id": "edcba54321",
    "owner": "fghjkl67890",
    "deviceId": "abcde12345",
    "profile": "admin",
    "created": "2018-09-18T08:01:10.614Z",
    "updated": "2018-09-18T08:01:10.614Z",
    "device": {
      ...
      "doors": [
        {
          ...
        }
      ],
      "inUseComplete": [
        ...
      ],
      "openingsComplete": [
        ...
      ],
      "campaign": {
        ...
      },
      ...
    }
  },
  {
    "_id": "edcba54322",
    "deviceId": "abcde54321",
    "owner": "fghjkl67890",
    "name": "Lorem ipsum",
    "created": "2018-06-15T07:30:38.200Z",
    "updated": "2018-06-15T07:30:38.200Z",
    "profile": "user",
    "disabled": false,
    "device": {
      ...
    }
  },
  ...
]

Retrieves all the connections of the user.

HTTP Request

GET https://api.raixer.com/connections

Get all Connections (Ordered)

Example request:

curl "https://api.raixer.com/connections/ordered"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/connections/ordered")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/connections/ordered", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/connections/ordered");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/connections/ordered");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/connections/ordered", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})

Example response:

// List of ordered connections of the user
[
  // Intercom connections
  [
    {
      "_id": "edcba54321",
      "owner": "fghjkl67890",
      "deviceId": "abcde12345",
      "profile": "admin",
      "created": "2018-09-18T08:01:10.614Z",
      "updated": "2018-09-18T08:01:10.614Z",
      "device": {
        ...
        "doors": [
          {
            ...
          }
        ],
        "inUseComplete": [
          ...
        ],
        "openingsComplete": [
          ...
        ],
        "campaign": {
          ...
        },
        ...
      }
    },
    ...
  ],
  // Power connections
  [
    {
      "_id": "edcba54322",
      "deviceId": "abcde54321",
      "owner": "fghjkl67890",
      "name": "Lorem ipsum",
      "created": "2018-06-15T07:30:38.200Z",
      "updated": "2018-06-15T07:30:38.200Z",
      "profile": "user",
      "disabled": false,
      "device": {
        ...
      }
    }
  ]
]

Retrieves all the connections of the user ordered in two groups (intercon and power connections, i.e. the type of device) and by creation date (descending).

HTTP Request

GET https://api.raixer.com/connections/ordered

Get the History of a Connection

Example request:

curl "https://api.raixer.com/connections/edcba54321/history?page=1"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/connections/edcba54321/history?page=1")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/connections/edcba54321/history?page=1", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/connections/edcba54321/history?page=1");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/connections/edcba54321/history?page=1");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/connections/edcba54321/history?page=1", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
});
req.on("error", (err) => {
  // Handle error
})

Example response:

[
  {
    "_id": "1",
    "deviceId": "abcde12345",
    "action": "connections.detail.history.action.openDoor2",
    "error": false,
    "details": "Jon Doe",
    "created": "2018-08-29T15:21:13.245Z",
    "updated": "2018-08-29T15:21:13.245Z"
  },
  {
    "_id": "2",
    "deviceId": "abcde12345",
    "action": "connections.detail.history.action.doorOpened",
    "error": false,
    "created": "2018-08-29T15:21:11.645Z",
    "updated": "2018-08-29T15:21:11.645Z"
  },
  {
    "_id": "3",
    "deviceId": "abcde12345",
    "action": "connections.detail.history.action.openDoor",
    "error": false,
    "details": "Jon Doe",
    "created": "2018-08-29T15:20:57.997Z",
    "updated": "2018-08-29T15:20:57.997Z"
  },
  ...
]

Retrieves the history of actions made with or by the device of a connection. The results are paginated in pages of 10.

HTTP Request

GET https://api.raixer.com/connections/:id/history?page=1

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the connection to retrieve the history of

Query Parameters

Parameter Required Default Description
page No 0 A number that specifies the history page to retrieve (the first one is 0)

Devices

Example device:

{
  "_id": "edcba54321",
  "owner": "fghjkl67890",
  "name": "lorem_ipsum",
  "online": true,
  "type": "intercom",
  "version": "v2",
  "campaignId": "abcde12345",
  "created": "2018-08-17T08:19:35.457Z",
  "updated": "2018-09-18T08:01:15.668Z"
}

The section you must be most excited to read and to play with: our awesome Raixer Devices :). Let's be honest, our devices are the reason you know us and use Raixer in the first place. Here, you will learn to use our API to manage, configure and interact with all your devices without interacting throughout our APP, in most cases. Devices are identified by a unique ID that comes directly configured from the factory and into their firmware.

It is very important that you are either the owner or an authorized user (have a connection to the device) of the device you want to interact with, because, for very important security reasons, we don't allow unauthorized use of the devices.

IMPORTANT NOTE:

If you want to see the addresses or all of the properties your devices are controlling, you must follow the [Connections](#connections) section of our API, after you identify the device controlling a certain property, you can then follow this section to do whatever you want with your device.

Create a Device

To create a new device you must use our APP and configure it through the ADD button on the Main Screen, afterwards, follow the instructions of the Configure new device process. This will guide you through the WiFi or Mobile connection configuration for the device, so it can have internet and be interacted with. If you want, you can also make the configuration and calibration of the sensors, if applies.

We highly recommend that all of this process is made by an installer, so you can be sure that your device is configured correctly and will function accordingly.

Delete a Device

Example request:

curl "https://api.raixer.com/devices/edcba54321" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -X DELETE
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Delete.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.delete("https://api.raixer.com/devices/edcba54321", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321");
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpDelete("https://api.raixer.com/devices/edcba54321");

req.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(req);
const https = require("https")

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321",
  "method": "DELETE",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string"
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write()
req.end()

Example response:

{
  "deviceId": "edcba54321",
  "removed": true, 
  "msg": "device_removed"
}

Deletes a device (well, to be honest, it only removes the IDs of the owner and the campaign from a device, we never delete them :)) and all the data associated to it, as it's users connections and it's sensors for doors or other use.

HTTP Request

DELETE https://api.raixer.com/devices/:id

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device to delete

Get a Device

Example request:

curl "https://api.raixer.com/devices/edcba54321"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/devices/edcba54321", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/devices/edcba54321");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/devices/edcba54321", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
});
req.on("error", (err) => {
  // Handle error
})

Example response:

{
  "_id": "edcba54321",
  "owner": "fghjkl67890",
  "name": "lorem_ipsum",
  "online": true,
  "type": "intercom",
  "version": "v2",
  "campaignId": "abcde12345",
  "created": "2018-08-17T08:19:35.457Z",
  "updated": "2018-09-18T08:01:15.668Z"
}

Retrieves the details of a device that has previously been created.

HTTP Request

GET https://api.raixer.com/devices/:id

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device to retrieve

Get all Devices

Example request:

curl "https://api.raixer.com/devices"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/devices")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/devices", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/devices");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/devices", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})

Example response:

[
  {
    "_id": "edcba54321",
    "owner": "fghjkl67890",
    "name": "lorem_ipsum",
    "online": true,
    "type": "intercom",
    "version": "v2",
    "campaignId": "abcde12345",
    "created": "2018-08-17T08:19:35.457Z",
    "updated": "2018-09-18T08:01:15.668Z"
  },
  {
    "_id": "edcba54322",
    "owner": "fghjkl67890",
    "name": "sit_amet",
    "online": true,
    "type": "intercom",
    "version": "v1",
    "campaignId": "lkjhg12345",
    "created": "2018-08-17T08:19:35.457Z",
    "updated": "2018-09-18T08:01:15.668Z"
  },
  ...
]

Retrieves all the devices owned by your user.

HTTP Request

GET https://api.raixer.com/devices

Important notes

Get all Device Doors

Example request:

curl "https://api.raixer.com/devices/edcba54321/doors"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/doors")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/devices/edcba54321/doors", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/doors");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/devices/edcba54321/doors");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/devices/edcba54321/doors", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})

Example response:

[
  {
    "_id": "abcde54321",
    "openingValue": 7500,
    "tolerance": 6000,
    "maxOpenings": 7,
    "waitTimeFirst": 2000,
    "twoOpenings": true,
    "mustCallBellFirst": true,
    "remainingOpenings": 100,
    "remainingTestOpenings": 25,
    "remainingPhoneCalls": 100,
    "remainingRaixerPhoneCalls": 25,
    "sensorMode": "bell",
    "name": "Street",
    "port": "left",
    "use": "street",
    "deviceId": "edcba54321",
    "created": "2018-08-02T10:10:41.294Z",
    "updated": "2018-08-16T19:06:33.628Z",
    "intercomCallFirst": true,
    "intercomEnableAutoAccess": true,
    "phoneNumber": 1234567890,
    "callingEnabled": true,
    "anyCallerEnabled": false
  },
  ...
]

Retrieves all the doors (sensors associated to doors, for example: an intercom sensor or an open/closed sensor) configured in a device. A Raixer Device should always have at least 1 door configured.

HTTP Request

GET https://api.raixer.com/devices/:id/doors

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device associated to the doors.

Create (Add) a Door to a Device

Example request:

curl "https://api.raixer.com/devices/edcba54321/doors" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
  -d '{"deviceId": "edcba54321", "openingValue": 6500, "tolerance": 1000, "maxOpenings": 4, "waitTimeFirst": 1500, "twoOpenings": true, "mustCallBellFirst": true, "remainingOpenings": 100, "remainingTestOpenings": 25, "remainingPhoneCalls": 100, "remainingRaixerPhoneCalls": 25, "sensorMode": "bell", "name": "Lorem", "port": "right", "use": "street"}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/doors")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

body = {
  "deviceId": "edcba54321",
  "openingValue": 6500,
  "tolerance": 1000,
  "maxOpenings": 4,
  "waitTimeFirst": 1500,
  "twoOpenings": true,
  "mustCallBellFirst": true,
  "remainingOpenings": 100,
  "remainingTestOpenings": 25,
  "remainingPhoneCalls": 100,
  "remainingRaixerPhoneCalls": 25,
  "sensorMode": "bell",
  "name": "Lorem",
  "port": "right",
  "use": "street"
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"deviceId": "edcba54321", "openingValue": 6500, "tolerance": 1000, "maxOpenings": 4, "waitTimeFirst": 1500, "twoOpenings": true, "mustCallBellFirst": true, "remainingOpenings": 100, "remainingTestOpenings": 25, "remainingPhoneCalls": 100, "remainingRaixerPhoneCalls": 25, "sensorMode": "bell", "name": "Lorem", "port": "right", "use": "street"}
req = requests.post("https://api.raixer.com/devices/edcba54321/doors", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$body = [
  "deviceId" => "edcba54321",
  "openingValue" => 6500,
  "tolerance" => 1000,
  "maxOpenings" => 4,
  "waitTimeFirst" => 1500,
  "twoOpenings" => true,
  "mustCallBellFirst" => true,
  "remainingOpenings" => 100,
  "remainingTestOpenings" => 25,
  "remainingPhoneCalls" => 100,
  "remainingRaixerPhoneCalls" => 25,
  "sensorMode" => "bell",
  "name" => "Lorem",
  "port" => "right",
  "use" => "street"
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/doors");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject body = new JSONObject();
body.put("deviceId", "edcba54321");
body.put("openingValue", 6500);
body.put("tolerance", 1000);
body.put("maxOpenings", 4);
body.put("waitTimeFirst", 1500);
body.put("twoOpenings", true);
body.put("mustCallBellFirst", true);
body.put("remainingOpenings", 100);
body.put("remainingTestOpenings", 25);
body.put("remainingPhoneCalls", 100);
body.put("remainingRaixerPhoneCalls", 25);
body.put("sensorMode", "bell");
body.put("name", "Lorem");
body.put("port", "right");
body.put("use", "street");
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/devices/edcba54321/doors");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {
  "deviceId": "edcba54321",
  "openingValue": 6500,
  "tolerance": 1000,
  "maxOpenings": 4,
  "waitTimeFirst": 1500,
  "twoOpenings": true,
  "mustCallBellFirst": true,
  "remainingOpenings": 100,
  "remainingTestOpenings": 25,
  "remainingPhoneCalls": 100,
  "remainingRaixerPhoneCalls": 25,
  "sensorMode": "bell",
  "name": "Lorem",
  "port": "right",
  "use": "street"
}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/doors",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

{
  "insertedId": "abcde54321",
}

Creates (add) a new door to a device.

HTTP Request

POST https://api.raixer.com/devices/:id/doors

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device to add the door to.

Body Parameters

Parameter Required Default Description
deviceId No N/A A string that specifies the device associated to the door.
openingValue No N/A A number that specifies the value (in Volts) in which the sensor will react.
tolerance No N/A A number that specifies the value (in Volts) to add/remove to the openingValue to define the range in which the sensor will react.
maxOpenings No N/A A number that specifies the maximum number of auto openings allowed by the device in listening mode before it is automatically ended.
waitTimeFirst No N/A A number that specifies the amount of time in seconds the device will wait before opening the door when it is informed to do it (via the API, APP or Phone call).
twoOpenings No N/A A boolean that specifies if the sensor will open the door two times when it is informed to do it (via the API, APP or Phone call).
mustCallBellFirst No N/A A boolean that specifies if the sensor need to call the bell before opening the door when it is informed to do it (via the API, APP or Phone call).
remainingOpenings No N/A A number that specifies the amount of openings remaining (not in use).
remainingTestOpenings No N/A A number that specifies the amount of openings remaining when the device has not been upgraded (not in use).
remainingPhoneCalls No N/A A number that specifies the amount of openings via phone calls remaining in one month (not in use).
remainingRaixerPhoneCalls No N/A A number that specifies the amount of openings via phone calls remaining when the device has not beem upgrades (not in use).
sensorMode No N/A A string that specifies the type of use destined to the sensor. Must be one of the following: bell, openingSensor
name No N/A A string that specifies the name of the sensor.
port No N/A A string that specifies the port of the device that this configuration is applied to. Must be one of the following: null, left, right.
use No N/A A string that specifies the use destined to the sensor of the port. It must be one of the following: null, street, home, garage, other.

Update a Door of a Device

Example request:

curl "https://api.raixer.com/devices/edcba54321/doors/abcde54321" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X PUT
  -d '{"deviceId": "edcba54321", "openingValue": 6500, "tolerance": 1000, "maxOpenings": 4, "waitTimeFirst": 1500, "twoOpenings": true, "mustCallBellFirst": true, "remainingOpenings": 100, "remainingTestOpenings": 25, "remainingPhoneCalls": 100, "remainingRaixerPhoneCalls": 25, "sensorMode": "bell", "name": "Lorem", "port": "right", "use": "street"}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/doors/abcde54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Put.new(uri.request_uri, headers)

body = {
  "deviceId": "edcba54321", 
  "openingValue": 6500, 
  "tolerance": 1000, 
  "maxOpenings": 4, 
  "waitTimeFirst": 1500, 
  "twoOpenings": true, 
  "mustCallBellFirst": true, 
  "remainingOpenings": 100, 
  "remainingTestOpenings": 25, 
  "remainingPhoneCalls": 100, 
  "remainingRaixerPhoneCalls": 25, 
  "sensorMode": "bell", 
  "name": "Lorem", 
  "port": "right", 
  "use": "street"
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"deviceId": "edcba54321", "openingValue": 6500, "tolerance": 1000, "maxOpenings": 4, "waitTimeFirst": 1500, "twoOpenings": true, "mustCallBellFirst": true, "remainingOpenings": 100, "remainingTestOpenings": 25, "remainingPhoneCalls": 100, "remainingRaixerPhoneCalls": 25, "sensorMode": "bell", "name": "Lorem", "port": "right", "use": "street"}
req = requests.put("https://api.raixer.com/devices/edcba54321/doors/abcde54321", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$body = [
  "deviceId" => "edcba54321",
  "openingValue" => 6500,
  "tolerance" => 1000,
  "maxOpenings" => 4,
  "waitTimeFirst" => 1500,
  "twoOpenings" => true,
  "mustCallBellFirst" => true,
  "remainingOpenings" => 100,
  "remainingTestOpenings" => 25,
  "remainingPhoneCalls" => 100,
  "remainingRaixerPhoneCalls" => 25,
  "sensorMode" => "bell",
  "name" => "Lorem",
  "port" => "right",
  "use" => "street"
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/doors/abcde54321");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject body = new JSONObject();
body.put("deviceId", "edcba54321");
body.put("openingValue", 6500);
body.put("tolerance", 1000);
body.put("maxOpenings", 4);
body.put("waitTimeFirst", 1500);
body.put("twoOpenings", true);
body.put("mustCallBellFirst", true);
body.put("remainingOpenings", 100);
body.put("remainingTestOpenings", 25);
body.put("remainingPhoneCalls", 100);
body.put("remainingRaixerPhoneCalls", 25);
body.put("sensorMode", "bell");
body.put("name", "Lorem");
body.put("port", "right");
body.put("use", "street");
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPut("https://api.raixer.com/devices/edcba54321/doors/abcde54321");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {
  "deviceId": "edcba54321", 
  "openingValue": 6500, 
  "tolerance": 1000, 
  "maxOpenings": 4, 
  "waitTimeFirst": 1500, 
  "twoOpenings": true, 
  "mustCallBellFirst": true, 
  "remainingOpenings": 100, 
  "remainingTestOpenings": 25, 
  "remainingPhoneCalls": 100, 
  "remainingRaixerPhoneCalls": 25, 
  "sensorMode": "bell", 
  "name": "Lorem", 
  "port": "right", 
  "use": "street"
}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/doors/abcde54321",
  "method": "PUT",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

{
  "n": 1,
  "nModified": 1,
  "ok": 1
}

Updates a door of a device

HTTP Request

PUT https://api.raixer.com/devices/:deviceId/doors/:doorId

Parameters

Parameter Required Default Description
deviceId Yes N/A A string that specifies the ID of the device associated to the door
doorId Yes N/A A string that specifies the ID of the door to update

Body Parameters

Parameter Required Default Description
deviceId No N/A A string that specifies the device associated to the door.
openingValue No N/A A number that specifies the value (in Volts) in which the sensor will react.
tolerance No N/A A number that specifies the value (in Volts) to add/remove to the openingValue to define the range in which the sensor will react.
maxOpenings No N/A A number that specifies the maximum number of auto openings allowed by the device in listening mode before it is automatically ended.
waitTimeFirst No N/A A number that specifies the amount of time in seconds the device will wait before opening the door when it is informed to do it (via the API, APP or Phone call).
twoOpenings No N/A A boolean that specifies if the sensor will open the door two times when it is informed to do it (via the API, APP or Phone call).
mustCallBellFirst No N/A A boolean that specifies if the sensor need to call the bell before opening the door when it is informed to do it (via the API, APP or Phone call).
remainingOpenings No N/A A number that specifies the amount of openings remaining (not in use).
remainingTestOpenings No N/A A number that specifies the amount of openings remaining when the device has not been upgraded (not in use).
remainingPhoneCalls No N/A A number that specifies the amount of openings via phone calls remaining in one month (not in use).
remainingRaixerPhoneCalls No N/A A number that specifies the amount of openings via phone calls remaining when the device has not beem upgrades (not in use).
sensorMode No N/A A string that specifies the type of use destined to the sensor. Must be one of the following: bell, openingSensor
name No N/A A string that specifies the name of the sensor.
port No N/A A string that specifies the port of the device that this configuration is applied to. Must be one of the following: null, left, right.
use No N/A A string that specifies the use destined to the sensor of the port. It must be one of the following: null, street, home, garage, other.

Delete a Door of a Device

Example request:

curl "https://api.raixer.com/devices/edcba54321/doors/abcde54321" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -X DELETE
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/doors/abcde54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Delete.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.delete("https://api.raixer.com/devices/edcba54321/doors/abcde54321", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/doors/abcde54321");
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpDelete("https://api.raixer.com/devices/edcba54321/doors/abcde54321");

req.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(req);
const https = require("https")

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/doors/abcde54321",
  "method": "DELETE",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string"
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write()
req.end()

Example response:

{
  "n": 1,
  "ok": 1
}

Deletes a door of a device.

HTTP Request

DELETE https://api.raixer.com/devices/:deviceId/doors/:doorId

Parameters

Parameter Required Default Description
deviceId Yes N/A A string that specifies the ID of the device associated to the door
doorId Yes N/A A string that specifies the ID of the door to delete

Get all Device Sensors

Example request:

curl "https://api.raixer.com/devices/edcba54321/sensors"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/sensors")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/devices/edcba54321/sensors", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/sensors");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/devices/edcba54321/sensors");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/devices/edcba54321/sensors", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})

Example response:

[
  {
    "_id": "abcde54321",
    "name": "Movement",
    "use": "movement",
    "port": "left",
    "deviceId": "edcba54321",
    "created": "2018-08-02T10:10:41.294Z",
    "updated": "2018-08-16T19:06:33.628Z"
  },
  ...
]

Retrieves all the sensors (for example: a movement sensor) configured in a device.

HTTP Request

GET https://api.raixer.com/devices/:id/sensors

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device associated to the sensors.

Create (Add) a Sensor to a Device

Example request:

curl "https://api.raixer.com/devices/edcba54321/sensors" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
  -d '{"name": "Lorem", "use": "movement", "port": "right"}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/sensors")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

body = {
  "name": "Lorem",
  "use": "movement",
  "port": "right"
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"name": "Lorem", "use": "movement", "port": "right"}
req = requests.post("https://api.raixer.com/devices/edcba54321/sensors", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$body = [
  "name" => "Lorem",
  "use" => "movement",
  "port" => "right"  
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/sensors");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject body = new JSONObject();
body.put("name", "Lorem");
body.put("use", "movement");
body.put("port", "right");
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/devices/edcba54321/sensors");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {
  "name": "Lorem",
  "use": "movement",
  "port": "right"
}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/sensors",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

{
  "insertedId": "abcde54321",
}

Creates (add) a new sensor to a device.

HTTP Request

POST https://api.raixer.com/devices/:id/sensors

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device to add the sensor to.

Body Parameters

Parameter Required Default Description
name No N/A A string that specifies the name of the sensor.
use No N/A A string that specifies the type of use destined to the sensor. Must be one of the following: movement.
port No N/A A string that specifies the port of the device that this configuration is applied to. Must be one of the following: null, left, right.

Update a Sensor of a Device

Example request:

curl "https://api.raixer.com/devices/edcba54321/sensors/abcde54321" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X PUT
  -d '{"name": "Lorem", "use": "movement", "port": "right"}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/sensors/abcde54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Put.new(uri.request_uri, headers)

body = {
  "name": "Lorem",
  "use": "movement",
  "port": "right"
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"name": "Lorem", "use": "movement", "port": "right"}
req = requests.put("https://api.raixer.com/devices/edcba54321/sensors/abcde54321", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$body = [
  "name" => "Lorem",
  "use" => "movement",
  "port" => "right" 
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/sensors/abcde54321");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject body = new JSONObject();
body.put("name", "Lorem");
body.put("use", "movement");
body.put("port", "right");
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPut("https://api.raixer.com/devices/edcba54321/sensors/abcde54321");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {
  "name": "Lorem",
  "use": "movement",
  "port": "right"
}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/sensors/abcde54321",
  "method": "PUT",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

{
  "n": 1,
  "nModified": 1,
  "ok": 1
}

Updates a sensor of a device

HTTP Request

PUT https://api.raixer.com/devices/:deviceId/sensors/:sensorId

Parameters

Parameter Required Default Description
deviceId Yes N/A A string that specifies the ID of the device associated to the sensor
sensorId Yes N/A A string that specifies the ID of the sensor to update

Body Parameters

Parameter Required Default Description
name No N/A A string that specifies the name of the sensor.
use No N/A A string that specifies the type of use destined to the sensor. Must be one of the following: movement.
port No N/A A string that specifies the port of the device that this configuration is applied to. Must be one of the following: null, left, right.

Delete a Sensor of a Device

Example request:

curl "https://api.raixer.com/devices/edcba54321/sensors/abcde54321" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -X DELETE
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/sensors/abcde54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Delete.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.delete("https://api.raixer.com/devices/edcba54321/sensors/abcde54321", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/sensors/abcde54321");
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpDelete("https://api.raixer.com/devices/edcba54321/sensors/abcde54321");

req.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(req);
const https = require("https")

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/sensors/abcde54321",
  "method": "DELETE",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string"
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write()
req.end()

Example response:

{
  "n": 1,
  "ok": 1
}

Deletes a sensor of a device.

HTTP Request

DELETE https://api.raixer.com/devices/:deviceId/sensors/:sensorId

Parameters

Parameter Required Default Description
deviceId Yes N/A A string that specifies the ID of the device associated to the sensor
sensorId Yes N/A A string that specifies the ID of the sensor to delete

Enable Phone Access to a Door of a Device

Example request:

curl "https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/enable" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/enable")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
req = requests.post("https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/enable", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/enable");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/enable");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");

HttpResponse response = client.execute(req);
const https = require("https")

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/doors/abcde54321/phone/enable",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json"
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write()
req.end()

Example response:

{
  "n": 1,
  "nModified": 1,
  "ok": 1
}

Enables the phone access to a door of a device.

HTTP Request

POST https://api.raixer.com/devices/:deviceId/doors/:doorId/phone/enable

Parameters

Parameter Required Default Description
deviceId Yes N/A A string that specifies the ID of the device associated to the door
doorId Yes N/A A string that specifies the ID of the door to update

Disable Phone Access to a Door of a Device

Example request:

curl "https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/disable" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/disable")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
req = requests.post("https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/disable", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/disable");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/disable");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");

HttpResponse response = client.execute(req);
const https = require("https")

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/doors/abcde54321/phone/disable",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json"
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write()
req.end()

Example response:

{
  "n": 1,
  "nModified": 1,
  "ok": 1
}

Disables the phone access to a door of a device.

HTTP Request

POST https://api.raixer.com/devices/:deviceId/doors/:doorId/phone/disable

Parameters

Parameter Required Default Description
deviceId Yes N/A A string that specifies the ID of the device associated to the door
doorId Yes N/A A string that specifies the ID of the door to update

Enable Any Caller Phone Access to a Door of a Device

Example request:

curl "https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/any-caller/enable" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/any-caller/enable")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
req = requests.post("https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/any-caller/enable", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/any-caller/enable");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/any-caller/enable");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");

HttpResponse response = client.execute(req);
const https = require("https")

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/doors/abcde54321/phone/any-caller/enable",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json"
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write()
req.end()

Example response:

{
  "n": 1,
  "nModified": 1,
  "ok": 1
}

Enables the any caller phone access to a door of a device.

HTTP Request

POST https://api.raixer.com/devices/:deviceId/doors/:doorId/phone/any-caller/enable

Parameters

Parameter Required Default Description
deviceId Yes N/A A string that specifies the ID of the device associated to the door
doorId Yes N/A A string that specifies the ID of the door to update

Disable Any Caller Phone Access to a Door of a Device

Example request:

curl "https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/any-caller/disable" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/any-caller/disable")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
req = requests.post("https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/any-caller/disable", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/any-caller/disable");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/devices/edcba54321/doors/abcde54321/phone/any-caller/disable");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");

HttpResponse response = client.execute(req);
const https = require("https")

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/doors/abcde54321/phone/any-caller/disable",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json"
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write()
req.end()

Example response:

{
  "n": 1,
  "nModified": 1,
  "ok": 1
}

Disables the any caller phone access to a door of a device.

HTTP Request

POST https://api.raixer.com/devices/:deviceId/doors/:doorId/phone/any-caller/disable

Parameters

Parameter Required Default Description
deviceId Yes N/A A string that specifies the ID of the device associated to the door
doorId Yes N/A A string that specifies the ID of the door to update

Get a Device Information

Example request:

curl "https://api.raixer.com/devices/edcba54321/information"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/information")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/devices/edcba54321/information", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/information");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/devices/edcba54321/information");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/devices/edcba54321/information", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
});
req.on("error", (err) => {
  // Handle error
})

Example response:

{
  "id": "edcba54321",
  "name": "lorem_ipsum",
  "last_app": null,
  "last_ip_address": "1.2.3.4",
  "last_heard": "2018-09-19T16:23:52.658Z",
  "product_id": 1234,
  "connected": true,
  "platform_id": 8,
  "cellular": false,
  "notes": null,
  "status": "normal",
  "current_build_target": "0.8.0-rc.10",
  "system_firmware_version": "0.8.0-rc.10",
  "pinned_build_target": "0.8.0-rc.10",
  "default_build_target": "0.7.0",
  "variables": {
    "variable_name": "variable_type",
    ...
  },
  "functions": [
    "function_name",
    ...
  ],
  "groups": [],
  "targeted_firmware_release_version": null
}

Retrieves all the information of a device. The most interesting parts of this information are the variables and the functions, wich, respectively, represents all the variables and functions made available by or to the device.

HTTP Request

GET https://api.raixer.com/devices/:id/information

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device to retrieve the information

Get a Device Variable

Example request:

curl "https://api.raixer.com/devices/edcba54321/variable/abcd"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/variable/abcd")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/devices/edcba54321/variable/abcd", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/variable/abcd");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/devices/edcba54321/variable/abcd");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/devices/edcba54321/variable/abcd", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
});
req.on("error", (err) => {
  // Handle error
})

Example response:

{
  "cmd": "VarReturn",
  "name": "variable_name",
  "result": "variable_result",
  "coreInfo": {
    "last_app": "",
    "last_heard": "2018-09-19T16:33:50.372Z",
    "connected": true,
    "last_handshake_at": "2018-09-19T16:18:56.144Z",
    "deviceID": "edcba54321",
    "product_id": 1234
  }
}

Retrieves a the value of a variable of the device. The variable must be listed in the variables section of the information of the device.

The result of the variable will always be in the field result.

HTTP Request

GET https://api.raixer.com/devices/:id/variable/:variable

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device to retrieve the variable
variable Yes N/A A string that specifies the name of the variable to retrieve

Practical example

Imagine you need to know if the device is in listening mode (auto access) in this particular moment, you'll need then to call this endpoint with the variable status or statusN (where N is the number of the port to get the info of, starting at 2), depending of the port you'll want to check.

Response of the status variable:

{
  "cmd": "VarReturn",
  "name": "status",
  "result": "0,,0,1537376277,1,0",
  "coreInfo": {
    "last_app": "",
    "last_heard": "2018-09-19T16:33:50.372Z",
    "connected": true,
    "last_handshake_at": "2018-09-19T16:18:56.144Z",
    "deviceID": "edcba54321",
    "product_id": 1234
  }
}

The result of this variable is always a string separated by commas and it always has 6 parts, no matter if some are empty. The parts of the string represent the following:

Position Type Possible values Meaning
0 Number 1 or 0 The device is in listening mode or not (1 for listening, 0 for not listening)
1 String N/A The ID of the last user that put the device in listening mode. Empty if the device is not in listening mode.
2 Date and time (timestamp) N/A The date and time (in a timestamp) that specifies when the device was put in listening mode or not (0 for when it is not in listening mode)
3 Date and time (timestamp) N/A The date and time (in a timestamp) for when the device was last turned on
4 Number 1 or 0 The device is an intercom device or not (1 is an intercom device, 0 not)
5 Number N/A A number that indicates how many auto openings the device has made (f.e. somebody called the door) since it was last put in listening mode (auto access)

List of Available Variables

Below you'll find a list of all the available device variables and their meaning. Please, note that not every variable is available for all device types, so, make sure to know the version and type of your Raixer Device before trying to get a variable.

Name Type Device Type Possible values Meaning
connected Number All 1 The device is connected and running
status String All See section above See section above
status2 String Intercom Two Doors and Access Same as status (See section above) Same as status (See section above) but for the door connected to the door sensor port 2.
buzzerValue Number All Number >= 0 The value in [mV] detected by the device for the door sensor port 1.
buzzerValue2 Number Intercom Two Doors and Access Number >= 0 The value in [mV] detected by the device for the door sensor port 2.
openValue Number All Number >= 0 The target value in [mV] for the device to open the door connected to the door sensor port 1.
openValue2 Number Intercom Two Doors and Access Number >= 0 The target value in [mV] for the device to open the door connected to the door sensor port 2.
tolerance Number All Number >= 0 A value in [mV] that indicates that the device will open the door connected to the door sensor port 1 when it detects a value between openValue - tolerance and openValue + tolerance
tolerance2 Number Intercom Two Doors and Access Number >= 0 A value in [mV] that indicates that the device will open the door connected to the door sensor port 2 when it detects a value between openValue2 - tolerance and openValue + tolerance
sensorMode Number All -1, 0 or 1 The mode in which the door sensor port 1 is functioning, -1 or 0 to bell sensor (for an intercom sensor) or 1 for opening sensor.
sensorMode2 Number Intercom Two Doors and Access -1, 0 or 1 The mode in which the door sensor port 2 is functioning, -1 or 0 to bell sensor (for an intercom sensor) or 1 for opening sensor.
doorIsOpen Number Intercom One Door and Intercom Two Doors 1 or 0 Indicates if the door connected to the door sensor port 1 is open or not. This will only function correctly if the device has an open/closed sensor connected to the port. We recommend to not get this value directly because, depending of the sensor, the value for open or close could be inverted.
doorIsOpen2 Number Intercom Two Doors 1 or 0 Indicates if the door connected to the door sensor port 2 is open or not. This will only function correctly if the device has an open/closed sensor connected to the port. We recommend to not get this value directly because, depending of the sensor, the value for open or close could be inverted.
doorIsOpen3 Number Access 1 or 0 Indicates if the door connected to the door sensor port 3 is open or not. This will only function correctly if the device has an open/closed sensor connected to the port. We recommend to not get this value directly because, depending of the sensor, the value for open or close could be inverted.
movement Number Intercom Two Doors and Access 1 or 0 Indicates if the movement sensor connected to any of the ports is detecting movement or not (1 for movement, 0 for none). This will only function correctly if the device has a movement sensor connected to any port.
lastMovement Number Intercom Two Doors and Access Timestamp in UTC Indicates the last time and date the device detected movement.
timeNow Number Intercom Two Doors and Access Timestamp in UTC Indicates the actual date and time of the device.
timeValid Boolean Intercom Two Doors and Access True or False Indicates if the actual date and time of the device is valid or not.
moveAlarm Number Intercom Two Doors and Access 1 or 0 Indicates if the movement alarm is active or not.

Execute a Device Function

Example request:

curl "https://api.raixer.com/devices/edcba54321/function/abcd" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/function/abcd")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
req = requests.post("https://api.raixer.com/devices/edcba54321/function/abcd", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/function/abcd");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/devices/edcba54321/function/abcd");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");

HttpResponse response = client.execute(req);
const https = require("https")

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/function/abcd",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json"
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write()
req.end()

Example response:

{
  "status": "success",
  "msg": "The action abcd was executed successfully",
  "deviceId": "abcde54321",
  "notifications": [
    ...
  ]
}

Execute a function of the device. The function must be listed in the functions section of the information of the device.

HTTP Request

POST https://api.raixer.com/devices/:id/function/:function

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device to retrieve the variable
function Yes N/A A string that specifies the name of the function to execute

List of Available Functions

Below you'll find a list of all the available device functions and their meaning. Please, note that not every variable is available for all device types, so, make sure to know the version and type of your Raixer Device before trying execute a function. Also, on a more important note, some functions are not recommended to use by calling them directly, as they are intended to use through our corresponding API functions or our APP.

Name Deprecated Recommended use Device Type Argument Possible return values Meaning
relay NO API All See related section below 1 or 0 This function starts the Auto Access for the sensor connected to the door sensor port 1. If it returns 1, it started correctly, if 0, it did not start correctly.
relay2 NO API Intercom Two Doors and Access See related section below 1 or 0 This function starts the Auto Access for the sensor connected to the door sensor port 2. If it returns 1, it started correctly, if 0, it did not start correctly.
solenoid YES None All None 1 Starts the solenoid corresponding to the door sensor port 1.
cut NO API All None 1 This function stops the Auto Access for the sensor connected to the door sensor port 1.
cut2 NO API Intercom Two Doors and Access None 1 This function stops the Auto Access for the sensor connected to the door sensor port 2.
state YES None All None 1 Always returns 1, it is called to see if the device is online and running.
add YES None All Number 1 or 0 This function add the passed time to the Auto Access for the sensor connected to the door sensor port 1. It returns 1 if everything was ok, 0 for when it is not.
intercom YES None All None 1 or 0 Indicates if the device is a Power Device or not: 0 for when it is and 1 for when it is not.
openDoor NO API All None 1 Opens the door connected to the door sensor port 1.
openDoor2 NO API Intercom Two Doors and Access None 1 Opens the door connected to the door sensor port 2.
openDoor3 NO API Access None 1 Opens the door connected to the door sensor port 3.
calibrate NO APP All None Number >= 0 Starts the process of auto calibration. Resets all the values associated to the process of auto calibration for the sensor connected to the door sensor port 1. It returns the number of seconds the device will calculate the mean of the buzzer value for the port 1 when it is in resting state. Use it only from our APP.
calibrate2 NO APP Intercom Two Doors and Access None Number >= 0 Starts the process of auto calibration. Resets all the values associated to the process of auto calibration for the sensor connected to the door sensor port 2. It returns the number of seconds the device will calculate the mean of the buzzer value for the port 2 when it is in resting state. Use it only from our APP.
getRestMean NO APP All None Number >= 0 Part to the process of auto calibration. Gets the mean of the buzzer value for the door connected to the door sensor port 1, for it's resting state, calculated after calling the function calibrate. Use it only from our APP.
getRestMean2 NO APP Intercom Two Doors and Access None Number >= 0 Part to the process of auto calibration. Gets the mean of the buzzer value for the door connected to the door sensor port 2, for it's resting state, calculated after calling the function calibrate2. Use it only from our APP.
getMean NO APP All None Number >= 0 Part to the process of auto calibration. Gets the mean of the buzzer value for the door connected to the door sensor port 1, calculated after calling the function calibrate and getRestMean. Use it only from our APP.
getMean2 NO APP Intercom Two Doors and Access None Number >= 0 Part to the process of auto calibration. Gets the mean of the buzzer value for the door connected to the door sensor port 2, calculated after calling the function calibrate2 and getRestMean2. Use it only from our APP.
getTol NO APP All None Number >= 0 Part to the process of auto calibration. Gets the tolerance for the buzzer value for the door connected to the door sensor port 1, calculated after calling the function calibrate, getRestMean and getMean. Use it only from our APP.
getTol2 NO APP Intercom Two Doors and Access None Number >= 0 Part to the process of auto calibration. Gets the tolerance for the buzzer value for the door connected to the door sensor port 2, calculated after calling the function calibrate2, getRestMean2 and getMean2. Use it only from our APP.
setValues NO None All See related section below 1 Sets the values of the variables openValue, tolerance, maxOpenings, waitTimeFirst and sensorMode.
setValues2 NO None Intercom Two Doors and Access See related section below 1 Sets the values of the variables openValue2, tolerance2, maxOpenings2, waitTimeFirst2 and sensorMode2.
activate NO None Access 1 or 0 1 or 0 Activates or deactivates the whole system controlling the open/close mechanism of the door connected to the middle port (port 3) of the Access device. If the argument is 1, the mechanism will activate (will work as normal), if it's 0 it will deactivate the mechanism (will always be open). Returns 1 for when the mechanism is active and 0 for when it's not. DO NOT USE DIRECTLY, as it is intended to work automatically when the device loses its internet connection.
changeMode NO None Access None 1 WORK IN PROGRESS: Activates or deactivates the whole system controlling the failsafe system of the open/close mechanism of the door connected to any of the ports of the device.
lastMove NO API or Direct Intercom Two Doors and Access None Timestamp in UTC or 0 Indicates the date and time of the last movement detected by the movement sensor connected to any of the ports of the device. If it returns 0, indicates that there are no new movement.
alarm NO API or Direct Intercom Two Doors and Access 1, 0 or infinite 1 or 0 Activates or deactivates the "movement alarm" system of the device, sending a maximum of 3 notifications (if parameter was 1) or sending infinite notifications (if parameter was infinite) when the device detects movement when the system is active. Returns 1 for when the system was activated or 0 for when it's not.
offlineAA NO APP, API or Direct All 1 or 0 1 or 0 Activates or deactivates the "Offline Auto Access" Contingency Mode of the device, wich starts the Auto Access whenever the device goes offline. Returns 1 for when the mode was activated or 0 for when it's not.
alwaysActive NO APP, API or Direct All 1 or 0 1 or 0 Activates or deactivates the "Auto Access Always Active" Mode of the device, wich sets the Auto Access on for all time for all the configured door sensor ports. Returns 1 for when the mode was activated or 0 for when it's not.
resetMemory NO None All None 1 Resets the device memory to it's factory state. WARNING: calling this function will delete all the stored values in the device wich may lead to undesired behavior and wrongly executed openings for Auto Access Mode.
invertSensor NO API or Direct Intercom Two Doors and Access 1 or 0 1 or 0 Indicates wether the device has to interpret the readings from a connected movement sensor as inverse or not. If the argument is 1, the sensor will be interpreted as inverted, 0 as normal. Returns 1 if the sensor will be interpreted as inverted, 0 for when it's not.
waitBells NO API or Direct All 1 or 0 1 or 0 Sets the time, in seconds, the device will wait after detecting a bell ring to detect a new one, eliminating the problem of detecting further bell rings one after another. This value is only considerated when the device has its Auto Access mode active for the door sensor port 1.
waitBells2 NO API or Direct Intercom Two Doors and Access 1 or 0 1 or 0 Sets the time, in seconds, the device will wait after detecting a bell ring to detect a new one, eliminating the problem of detecting further bell rings one after another. This value is only considerated when the device has its Auto Access mode active for the door sensor port 2.

Relay Functions Argument

These functions expect a string argument of certain numbers separated by commas. In the table below you'll find the explanation of all the parts.

Position Required Type Possible values Meaning
0 Yes Number Number >= 0 Value indicating how much time the device will be in Auto Access mode for the corresponding port.
1 No String String or empty The ID of the user who started the Auto Access Mode.
2 Yes (Intercom One Door and Intercom Two Doors) / No (Access) Number Number >= 0 or Empty Value for the corresponding openValue variable.
3 Yes (Intercom One Door and Intercom Two Doors) / No (Access) Number Number >= 0 or Empty Value for the corresponding tolerance variable.
4 Yes (Intercom One Door and Intercom Two Doors) / No (Access) Number Number >= 0 or Empty Value for the corresponding maxOpenings variable.
5 Yes (Intercom One Door and Intercom Two Doors) / No (Access) Number Number >= 0 or Empty Value for the corresponding waitTimeFirst variable.

SetValues Functions Argument

These functions expect a string argument of certain numbers separated by commas. In the table below you'll find the explanation of all the parts.

Position Type Possible values Meaning
0 Number Number >= 0 Value for the corresponding openValue variable.
1 Number Number >= 0 Value for the corresponding tolerance variable.
2 Number Number >= 0 Value for the corresponding maxOpenings variable.
3 Number Number >= 0 Value for the corresponding waitTimeFirst variable.
4 Number 0, 1 or 2 Value indicating the sensorMode of the door, 0 for when it is an Auto Access, 1 for when it is an Opening Sensor or 2 for anything else.
5 Number 0 or 1 Value indicating the sensorReverse of an Opening Sensor door, dictating if the sensor has the readings inverse of the expected.
6 Number Number >= 0 Value for the corresponding waitBuzzerTime variable, wich indicates how many seconds the bell has to be pressed before the device recognises the calling and opens the door. This value is only for an Auto Access door.

Open Door at Position

Example request:

curl "https://api.raixer.com/devices/edcba54321/open-door/street" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/open-door/street")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
req = requests.post("https://api.raixer.com/devices/edcba54321/open-door/street", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/open-door/street");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/devices/edcba54321/open-door/street");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");

HttpResponse response = client.execute(req);
const https = require("https")

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/open-door/street",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json"
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write()
req.end()

Example response:

[
  {
    "status": "success",
    "msg": "The action openDoor was executed successfully",
    "deviceId": "abcde54321",
    "notifications": [
      ...
    ]
  },
  {
    "status": "success",
    "msg": "The action openDoor2 was executed successfully",
    "deviceId": "abcde54321",
    "notifications": [
      ...
    ]
  },
  ...
]

Opens the door connected to the sensor of the device at the position or use specified.

This method, in difference with Open door, returns an array, with the result of the operation for each of the doors that were selected by the user specified position/use. For example: a device has configured two doors for the use street, this method will return an array with two objects indicating the result of the operation for each of the doors.

HTTP Request

POST https://api.raixer.com/devices/:id/open-door/:position

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device
position Yes N/A A number or string that specifies the position or the use of the sensor you want to open. If it is a number it should be 1 or higher. If it is a string, it should be one of the following: street, home, garage or other.

Important notes

Start Job (Auto Access) at Position

Example request:

curl "https://api.raixer.com/devices/edcba54321/start-job/street" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
  -d '{"minutes": 3}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/start-job/street")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

body = {
  "minutes": 3
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"minutes": 3}
req = requests.post("https://api.raixer.com/devices/edcba54321/start-job/street", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$body = [
  "minutes" => 3
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/start-job/street");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject body = new JSONObject();
body.put("minutes", 3);
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/devices/edcba54321/start-job/street");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {
  "minutes": 3
}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/start-job/street",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

[
  {
    "status": "success",
    "msg": "The action relay was executed successfully",
    "deviceId": "abcde54321",
    "notifications": [
      ...
    ]
  },
  // If more than one door is configured with the same use/position
  {
    "status": "success",
    "msg": "The action relay2 was executed successfully",
    "deviceId": "abcde54321",
    "notifications": [
      ...
    ]
  },
  ...
]

Starts the auto access listening mode in the door connected to the door of the device at the position or use you specify. If a device is in auto access listening mode, whenever somebody calls the bell of the door or the intercom connected to that sensor, the device will get the call and open the door.

This method, in difference with Start Job, returns an array, with the result of the operation for each of the doors that were selected by the user specified position/use. For example: a device has configured two doors for the use street, this method will return an array with two objects indicating the result of the operation for each of the doors.

Important notes

HTTP Request

POST https://api.raixer.com/devices/:id/start-job/:position

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device
position Yes N/A A number or string that specifies the position or the use of the sensor you want to open. If it is a number it should be 1 or higher. If it is a string, it should be one of the following: street, home, garage or other.

Body Parameters

Parameter Required Default Description
minutes Yes N/A A number that specifies the number of minutes the device will be in auto access listening mode.
openingValue No Configured value A number that specifies the value (in Volts) in which the sensor will react. If not passed, the device will take the previously configured value via our APP.
tolerance No Configured value A number that specifies the value (in Volts) to add/remove to the openingValue to define the range in which the sensor will react. If not passed, the device will take the previously configured value via our APP.
maxOpenings No Configured value A number that specifies the maximum number of auto openings allowed by the device in listening mode before it is automatically ended. If not passed, the device will take the previously configured value via our APP.
waitTimeFirst No Configured value A number that specifies the amount of time in seconds the device will wait before opening the door when it is informed to do it (via the API, APP or Phone call). If not passed, the device will take the previously configured value via our APP.

Stop Job (Auto Access) at Position

Example request:

curl "https://api.raixer.com/devices/edcba54321/stop-job/street" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/stop-job/street")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
req = requests.post("https://api.raixer.com/devices/edcba54321/stop-job/street", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/stop-job/street");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/devices/edcba54321/stop-job/street");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");

HttpResponse response = client.execute(req);
const https = require("https")

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/stop-job/street",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json"
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write()
req.end()

Example response:

[
  {
    "status": "success",
    "msg": "The action cut was executed successfully",
    "deviceId": "abcde54321",
    "notifications": [
      ...
    ]
  },
  {
    "status": "success",
    "msg": "The action cut2 was executed successfully",
    "deviceId": "abcde54321",
    "notifications": [
      ...
    ]
  },
  ...
]

Stops the auto access listening mode for the door connected to the sensor of the device at the position or use specified.

This method, in difference with Stop job, returns an array, with the result of the operation for each of the doors that were selected by the user specified position/use. For example: a device has configured two doors for the use street, this method will return an array with two objects indicating the result of the operation for each of the doors.

HTTP Request

POST https://api.raixer.com/devices/:id/stop-job/:position

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device
position Yes N/A A number or string that specifies the position or the use of the sensor you want to open. If it is a number it should be 1 or higher. If it is a string, it should be one of the following: street, home, garage or other.

Important notes

Manage Movement Alarm

Example request:

curl "https://api.raixer.com/devices/edcba54321/movement-alarm/1" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/movement-alarm/1")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
req = requests.post("https://api.raixer.com/devices/edcba54321/movement-alarm/1", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/movement-alarm/1");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/devices/edcba54321/movement-alarm/1");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");

HttpResponse response = client.execute(req);
const https = require("https")

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/movement-alarm/1",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json"
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write()
req.end()

Example response:

// If the movement alarm was activated
{
  "status": "success",
  "msg": "The action alarm was executed successfully",
  "deviceId": "abcde54321",
  "result": 1
}

// If the movement alarm was deactivated
{
  "status": "success",
  "msg": "The action alarm was executed successfully",
  "deviceId": "abcde54321",
  "result": 0
}

Starts or stops the movement alarm.

NOTE: the movement alarm will only trigger when the device has changed movement states, i.e. the device has not been detected movement and then detects movement

HTTP Request

POST https://api.raixer.com/devices/:id/movement-alarm/:action

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device
action Yes N/A A string that specifies the action (f.e. activate for ever, activate or deactivate) to execute for the movement alarm of the device. Has to be one of the following: infinite, 1 or 0

Importat notes

Manage Offline Auto Access (Contingency Mode)

Example request:

curl "https://api.raixer.com/devices/edcba54321/offline-auto-access" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
  -d '{"offlineAutoAccess": true}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/offline-auto-access")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

body = {
  "offlineAutoAccess": true
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"offlineAutoAccess": true}
req = requests.post("https://api.raixer.com/devices/edcba54321/offline-auto-access", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$body = [
  "offlineAutoAccess" => true
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/offline-auto-access");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject body = new JSONObject();
body.put("offlineAutoAccess", true);
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/devices/edcba54321/offline-auto-access");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {
  "offlineAutoAccess": true
}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/offline-auto-access",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

{
  "n": 1,
  "nModified": 1,
  "ok": 1
}

Enables or disables the Offline Auto Access Contingency Mode of the device. If this mode is active for a device, when it goes offline it will start automatically it's Auto Access Mode as long as it's offline or the maximum number of openings are reached.

HTTP Request

POST https://api.raixer.com/devices/:id/offline-auto-access

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device

Body Parameters

Parameter Required Default Description
offlineAutoAccess Yes N/A A boolean (true/false) that specifies if the Offline Auto Access will be active or not.

Importat notes

Manage Auto Access Always Active

Example request:

curl "https://api.raixer.com/devices/edcba54321/auto-access-always-active" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
  -d '{"autoAccessAlwaysActive": true}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/auto-access-always-active")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

body = {
  "autoAccessAlwaysActive": true
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"autoAccessAlwaysActive": true}
req = requests.post("https://api.raixer.com/devices/edcba54321/auto-access-always-active", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$body = [
  "autoAccessAlwaysActive" => true
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/auto-access-always-active");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject body = new JSONObject();
body.put("autoAccessAlwaysActive", true);
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/devices/edcba54321/auto-access-always-active");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {
  "autoAccessAlwaysActive": true
}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/auto-access-always-active",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

{
  "n": 1,
  "nModified": 1,
  "ok": 1
}

Enables or disables the Auto Access Always Active Mode of the device. If this mode is active for a device, the configured sensors door ports will always be in Auto Access mode, doesn't matter the device goes offline or the maximum number of openings are reached.

HTTP Request

POST https://api.raixer.com/devices/:id/auto-access-always-active

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device

Body Parameters

Parameter Required Default Description
autoAccessAlwaysActive Yes N/A A boolean (true/false) that specifies if the Offline Auto Access will be active or not.

Importat notes

Open Door 1 (DEPRECATED)

Example request:

curl "https://api.raixer.com/devices/edcba54321/open-door" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/open-door")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
req = requests.post("https://api.raixer.com/devices/edcba54321/open-door", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/open-door");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/devices/edcba54321/open-door");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");

HttpResponse response = client.execute(req);
const https = require("https")

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/open-door",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json"
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write()
req.end()

Example response:

{
  "status": "success",
  "msg": "The action openDoor was executed successfully",
  "deviceId": "abcde54321",
  "notifications": [
    ...
  ]
}

Opens the door connected to the first door sensor port of the device.

Importat note

DEPRECATED: we strongly recommend to instead use the Open door at position.

HTTP Request

POST https://api.raixer.com/devices/:id/open-door

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device

Open Door 2 (DEPRECATED)

Example request:

curl "https://api.raixer.com/devices/edcba54321/open-door-2" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/open-door-2")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
req = requests.post("https://api.raixer.com/devices/edcba54321/open-door-2", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/open-door-2");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/devices/edcba54321/open-door-2");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");

HttpResponse response = client.execute(req);
const https = require("https")

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/open-door-2",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json"
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write()
req.end()

Example response:

{
  "status": "success",
  "msg": "The action openDoor2 was executed successfully",
  "deviceId": "abcde54321",
  "notifications": [
    ...
  ]
}

Opens the door connected to the second door sensor port of the device.

Importat note

DEPRECATED: we strongly recommend to instead use the Open door at position.

HTTP Request

POST https://api.raixer.com/devices/:id/open-door-2

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device

Start Job (Auto Access) 1 (DEPRECATED)

Example request:

curl "https://api.raixer.com/devices/edcba54321/start-job" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
  -d '{"minutes": 3}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/start-job")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

body = {
  "minutes": 3
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"minutes": 3}
req = requests.post("https://api.raixer.com/devices/edcba54321/start-job", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$body = [
  "minutes" => 3
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/start-job");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject body = new JSONObject();
body.put("minutes", 3);
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/devices/edcba54321/start-job");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {
  "minutes": 3
}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/start-job",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

{
  "status": "success",
  "msg": "The action relay was executed successfully",
  "deviceId": "abcde54321",
  "notifications": [
    ...
  ]
}

Starts the auto access listening mode in the door connected to the first sensor door port of the device. If a device is in auto access listening mode, whenever somebody calls the bell of the door or the intercom, the device will get the call and open the door.

Importat note

DEPRECATED: we strongly recommend to instead use the Start Job at position.

HTTP Request

POST https://api.raixer.com/devices/:id/start-job

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device

Body Parameters

Parameter Required Default Description
minutes Yes N/A A number that specifies the number of minutes the device will be in auto access listening mode.
openingValue No Configured value A number that specifies the value (in Volts) in which the sensor will react. If not passed, the device will take the previously configured value via our APP.
tolerance No Configured value A number that specifies the value (in Volts) to add/remove to the openingValue to define the range in which the sensor will react. If not passed, the device will take the previously configured value via our APP.
maxOpenings No Configured value A number that specifies the maximum number of auto openings allowed by the device in listening mode before it is automatically ended. If not passed, the device will take the previously configured value via our APP.
waitTimeFirst No Configured value A number that specifies the amount of time in seconds the device will wait before opening the door when it is informed to do it (via the API, APP or Phone call). If not passed, the device will take the previously configured value via our APP.

Stop Job (Auto Access) 1 (DEPRECATED)

Example request:

curl "https://api.raixer.com/devices/edcba54321/stop-job" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/devices/edcba54321/stop-job")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
req = requests.post("https://api.raixer.com/devices/edcba54321/stop-job", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/devices/edcba54321/stop-job");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/devices/edcba54321/stop-job");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");

HttpResponse response = client.execute(req);
const https = require("https")

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "devices/edcba54321/doors/abcde54321/stop-job",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json"
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write()
req.end()

Example response:

{
  "status": "success",
  "msg": "The action cut was executed successfully",
  "deviceId": "abcde54321",
  "notifications": [
    ...
  ]
}

Stops the auto access listening mode for the door connected to the first sensor door port of the device.

Importat note

DEPRECATED: we strongly recommend to instead use the Stop Job at position.

HTTP Request

POST https://api.raixer.com/devices/:id/stop-job

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the device

Device Upgrades

When you acquire a Raixer Device you have 7 days to interact and test with it without paying us anything. After your 7 dayas has passed, you'll have to Upgrade your Device so you can keep using it.

To manage your Devices Upgrades you can only use our awesome Raixer APP :) To do it, go into the detail screen of the device you want to Upgrade and then into the Settings Screen of it, once you're there, search for the Upgrade section and follow the two simple steps. After you upgrade your device, you can use as you want with our API.

To give you a heads up, we offer two awesome plans to better suit your needs and wallet: monthly and yearly.

Pro tip: if you prefer our yearly plan, you'll save two months :)

Intercom Campaigns

Example intercom campaign:

{
  "_id": "edcba54321",
  "owner": "fghjkl67890",
  "name": "Lorem ipsum",
  "created": "2018-07-02T09:41:07.291Z",
  "updated": "2018-07-10T15:27:53.808Z",
  "subscriptionId": "12345abcde",
  "schedule": true, // Deprecated
  "openNow": true, // Deprecated
  "twoDoors": false, // Deprecated
  "userChangedConfig": false // Deprecated
}

To mantain certain data and traceability to our intercom devices, we have campaigns. The API allows you to retrieve an individual campaign as well as list all of them associated to your user. Intercom campaigns are identified by a unique, random ID.

Get an Intercom Campaign

Example request:

curl "https://api.raixer.com/intercom-campaigns/edcba54321"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/intercom-campaigns/edcba54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/intercom-campaigns/edcba54321", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/intercom-campaigns/edcba54321");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/intercom-campaigns/edcba54321");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/intercom-campaigns/edcba54321", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
});
req.on("error", (err) => {
  // Handle error
})

Example response:

{
  "_id": "edcba54321",
  "owner": "fghjkl67890",
  "name": "Lorem ipsum",
  "created": "2018-07-02T09:41:07.291Z",
  "updated": "2018-07-10T15:27:53.808Z",
  "subscriptionId": "12345abcde",
  "schedule": true, // Deprecated
  "openNow": true, // Deprecated
  "twoDoors": false, // Deprecated
  "userChangedConfig": false // Deprecated
}

Retrieves the details of an intercom campaign that has previously been created.

HTTP Request

GET https://api.raixer.com/intercom-campaigns/:id

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the intercom campaign to retrieve

Get all Intercom Campaigns

Example request:

curl "https://api.raixer.com/intercom-campaigns"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/intercom-campaigns")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/intercom-campaigns", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/intercom-campaigns");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/intercom-campaigns");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/intercom-campaigns", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})

Example response:

[
  {
    "_id": "edcba54321",
    "owner": "fghjkl67890",
    "name": "Lorem ipsum",
    "created": "2018-07-02T09:41:07.291Z",
    "updated": "2018-07-10T15:27:53.808Z",
    "subscriptionId": "12345abcde",
    "schedule": true, // Deprecated
    "openNow": true, // Deprecated
    "twoDoors": false, // Deprecated
    "userChangedConfig": false // Deprecated
  },
  {
    "_id": "edcba54322",
    "owner": "fghjkl67890",
    "name": "Dolor sit amet",
    "created": "2018-07-02T09:41:07.291Z",
    "updated": "2018-07-10T15:27:53.808Z",
    "schedule": true, // Deprecated
    "openNow": true, // Deprecated
    "twoDoors": false, // Deprecated
    "userChangedConfig": false // Deprecated
  },
  ...
]

Retrieves all the intercom campaigns associated to your user.

HTTP Request

GET https://api.raixer.com/intercom-campaigns

Power Campaigns

Example power campaign:

{
  "_id": "edcba54321",
  "name": "Lorem ipsum",
  "accumulated": 5.1,
  "mode": "time",
  "price": 0.01,
  "owner": "fghjkl67890",
  "created": "2018-06-15T07:30:13.816Z",
  "updated": "2018-06-15T07:30:13.816Z"
}

To mantain certain data and traceability to our power devices, we have campaigns. The API allows you to retrieve an individual campaign as well as list all of them associated to your user. Power campaigns are identified by a unique, random ID.

Get a Power Campaign

Example request:

curl "https://api.raixer.com/power-campaigns/edcba54321"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/power-campaigns/edcba54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/power-campaigns/edcba54321", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/power-campaigns/edcba54321");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/power-campaigns/edcba54321");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/power-campaigns/edcba54321", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
});
req.on("error", (err) => {
  // Handle error
})

Example response:

{
  "_id": "edcba54321",
  "name": "Lorem ipsum",
  "accumulated": 5.1,
  "mode": "time",
  "price": 0.01,
  "owner": "fghjkl67890",
  "created": "2018-06-15T07:30:13.816Z",
  "updated": "2018-06-15T07:30:13.816Z"
}

Retrieves the details of a power campaign that has previously been created.

HTTP Request

GET https://api.raixer.com/power-campaigns/:id

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the power campaign to retrieve

Get all Power Campaigns

Example request:

curl "https://api.raixer.com/power-campaigns"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/power-campaigns")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/power-campaigns", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/power-campaigns");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/power-campaigns");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/power-campaigns", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})

Example response:

[
  {
    "_id": "edcba54321",
    "name": "Lorem ipsum",
    "accumulated": 5.1,
    "mode": "time",
    "price": 0.01,
    "owner": "fghjkl67890",
    "created": "2018-06-15T07:30:13.816Z",
    "updated": "2018-06-15T07:30:13.816Z"
  },
  {
    "_id": "edcba54322",
    "name": "Sit amet",
    "accumulated": 0,
    "mode": "use",
    "price": 1,
    "time": 1,
    "owner": "fghjkl67890",
    "created": "2018-06-15T07:30:13.739Z",
    "updated": "2018-06-15T07:30:13.739Z"
  },
  ...
]

Retrieves all the power campaigns associated to your user.

HTTP Request

GET https://api.raixer.com/power-campaigns

Schedules

Example schedule:

{
  "_id": "edcba54321",
  "campaignId": "abcde12345",
  "time": 3,
  "schedule": 1539638640000.0,
  "owner": "fghjkl67890",
  "doorPort": "1",
  "created": "2018-09-15T21:25:59.756Z",
  "updated": "2018-09-15T21:25:59.756Z"
}

To allow an intercom device to listen to bell calls and open the door automatically when they happen, you create a schedule. The API allows you to create, update or delete a schedule. You can retrieve an individual schedule as well as list all of them or list all of them associated to a campaign. Schedules are identified by a unique, random ID.

Create a Schedule

Example request:

curl "https://api.raixer.com/schedules" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X POST
  -d '{"campaignId": "abcde12345", "time": 3, "schedule": 1539638640000}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/schedules")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.request_uri, headers)

body = {
  "campaignId": "abcde12345",
  "time": 3,
  "schedule": 1539638640000
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"campaignId": "abcde12345", "time": 3, "schedule": 1539638640000}
req = requests.post("https://api.raixer.com/schedules", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$body = [
  "campaignId" => "abcde12345", 
  "time" => 3,
  "schedule" => 1539638640000
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/schedules");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject body = new JSONObject();
body.put("campaignId", "abcde12345");
body.put("time", 3);
body.put("schedule", 1539638640000);
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPost("https://api.raixer.com/schedules");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {"campaignId": "abcde12345", "time": 3, "schedule": 1539638640000}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "schedules",
  "method": "POST",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

{
  "insertedId": "edcba54321",
  "result": {
      "n": 1,
      "ok": 1
  }
}

Creates a new schedule.

HTTP Request

POST https://api.raixer.com/schedules

Body Parameters

Parameter Required Default Description
campaignId Yes N/A A string that specifies the campaign associated to the schedule.
time Yes N/A A number that specifies the amount of minutes the device will be in listening mode.
schedule Yes N/A A number that specifies the date and time the device will enter the listening mode, in UTC Format.
doorPort No 1 A string that specifies the port of the device that will enter listening mode. If not specified, the device will listen in the default port, the first one (right).

Update a Schedule

Example request:

curl "https://api.raixer.com/schedules/edcba54321" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X PUT
  -d '{"campaignId": "abcde12345", "time": 3, "schedule": 1539638640000}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/schedules/edcba54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Put.new(uri.request_uri, headers)

body = {
  "campaignId": "abcde12345",
  "time": 3,
  "schedule": 1539638640000
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"campaignId": "abcde12345", "time": 3, "schedule": 1539638640000}
req = requests.put("https://api.raixer.com/schedules/edcba54321", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$body = [
  "campaignId" => "abcde12345",
  "time" => 3,
  "schedule" => 1539638640000
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/schedules/edcba54321");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject body = new JSONObject();
body.put("campaignId", "abcde12345");
body.put("time", 3);
body.put("schedule", 1539638640000);
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPut("https://api.raixer.com/schedules/edcba54321");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {"campaignId": "abcde12345", "time": 3, "schedule": 1539638640000}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "schedules/edcba54321",
  "method": "PUT",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

{
  "insertedId": "5ba20c5fb0a2ba0015a6f2ab",
  "result": {
      "n": 1,
      "ok": 1
  }
}

Updates a schedule by removing the old one and creating a new one

HTTP Request

PUT https://api.raixer.com/schedules/:id

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the schedule to update

Body Parameters

Parameter Required Default Description
campaignId Yes N/A A string that specifies the campaign associated to the schedule.
time Yes N/A A number that specifies the amount of minutes the device will be in listening mode.
schedule Yes N/A A number that specifies the date and time the device will enter the listening mode, in UTC Format.
doorPort No 1 A string that specifies the port of the device that will enter listening mode. If not specified, the device will listen in the default port, the first one (right).

Delete a Schedule

Example request:

curl "https://api.raixer.com/schedules/edcba54321" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -X DELETE
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/schedules/edcba54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Delete.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.delete("https://api.raixer.com/schedules/edcba54321", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/schedules/edcba54321");
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpDelete("https://api.raixer.com/schedules/edcba54321");

req.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(req);
const https = require("https")

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "schedules/edcba54321",
  "method": "DELETE",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string"
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write()
req.end()

Example response:

{
  "result": true,
  "msg": "The schedule was deleted correctly"
}

Deletes a schedule.

HTTP Request

DELETE https://api.raixer.com/schedules/:id

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the schedule to delete

Get a Schedule

Example request:

curl "https://api.raixer.com/schedules/edcba54321"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/schedules/edcba54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/schedules/edcba54321", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/schedules/edcba54321");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/schedules/edcba54321");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/schedules/edcba54321", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
});
req.on("error", (err) => {
  // Handle error
})

Example response:

{
  "_id": "edcba54321",
  "campaignId": "abcde12345",
  "time": 3,
  "schedule": 1539638640000.0,
  "owner": "fghjkl67890",
  "doorPort": "1",
  "created": "2018-09-15T21:25:59.756Z",
  "updated": "2018-09-15T21:25:59.756Z"
}

Retrieves the details of a schedule that has previously been created.

HTTP Request

GET https://api.raixer.com/schedules/:id

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the schedule to retrieve

Get all Schedules

Example request:

curl "https://api.raixer.com/schedules?campaignId=abcde12345"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/schedules?campaignId=abcde12345")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/schedules?campaignId=abcde12345", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/schedules?campaignId=abcde12345");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/schedules?campaignId=abcde12345");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/schedules?campaignId=abcde12345", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})

Example response:

[
  {
    "_id": "edcba54321",
    "campaignId": "abcde12345",
    "time": 3,
    "schedule": 1539638640000.0,
    "owner": "fghjkl67890",
    "doorPort": "1",
    "created": "2018-09-15T21:25:59.756Z",
    "updated": "2018-09-15T21:25:59.756Z"
  },
  {
    "_id": "edcba54322",
    "campaignId": "abcde12345",
    "time": 30,
    "schedule": 1539638840000.0,
    "owner": "fghjkl67890",
    "doorPort": "1",
    "created": "2018-09-15T21:25:59.756Z",
    "updated": "2018-09-15T21:25:59.756Z"
  },
  ...
]

Retrieves all the schedules or all the schedules associated to a campaign.

HTTP Request

GET https://api.raixer.com/schedules?campaignId=abcde12345

Query Parameters

Parameter Required Default Description
campaignId No N/A A string that specifies the ID of the campaign associated to the schedules to retrieve. If not specified, all schedules will be retrieved.

Users

Example user:

{
  "_id" : "edcba54321",
  "displayName" : "Jon Doe",
  "email" : "jon.doe@a.b",
  "created" : "2018-09-17T16:14:42.238Z",
  "updated" : "2018-09-17T16:14:59.266Z",
  "address": {
    "email": "jon.doe@a.b",
    "name": "Jon Doe",
    "address": "ID_NUMBER",
    "street2": "Street",
    "city": "City",
    "zip": "12345",
    "state": "State",
    "country": "Country"
  }
}

To allow you to interact with our entire platform, through our APP or API, you must have an user. The API allows you only to update a user and to retrieve an individual one. Users are identified by a unique, random ID.

Create a User

To create a user you must register on our APP via Email and Password or Facebook, it will only take you a minute and you will love all the great things you can do with our awesome platform.

Update an User

Example request:

curl "https://api.raixer.com/users/edcba54321" \
  -H "Authorization: Basic your_encoded_base64_string" \
  -H "Content-Type: application/json" \
  -X PUT
  -d '{"displayName": "Jon Doe", "email": "jon.doe@a.b", "address": {"email": "jon.doe@a.b", "name": "Jon Doe", "address": "ID_NUMBER", "street2": "Street", "city": "City", "zip": "12345", "state": "State", "country": "Country"}}'
require 'net/http'
require 'uri'
require 'json'

headers = {
  "Authorization": "Basic your_encoded_base64_string",
  "Content-Type": "application/json"
}

uri = URI.parse("https://api.raixer.com/users/edcba54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Put.new(uri.request_uri, headers)

body = {
  "displayName": "Jon Doe",
  "email": "jon.doe@a.b",
  "address": {
    "email": "jon.doe@a.b",
    "name": "Jon Doe",
    "address": "ID_NUMBER",
    "street2": "Street",
    "city": "City",
    "zip": "12345",
    "state": "State",
    "country": "Country"
  }
}

req.body = body.to_json

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string", "Content-Type": "application/json"}
data={"displayName": "Jon Doe", "email": "jon.doe@a.b", "address": {"email": "jon.doe@a.b", "name": "Jon Doe", "address": "ID_NUMBER", "street2": "Street", "city": "City", "zip": "12345", "state": "State", "country": "Country"}}
req = requests.put("https://api.raixer.com/users/edcba54321", data=data, headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

$address = [
  "email" => "jon.doe@a.b",
  "name" => "Jon Doe",
  "address" => "ID_NUMBER",
  "street2" => "Street",
  "city" => "City",
  "zip" => "12345",
  "state" => "State",
  "country" => "Country"
]
$body = [
  "displayName" => "Jon Doe",
  "email" => "jon.doe@a.b",
  "address" => $address
]

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/users/edcba54321");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string",
  "Content-Type: application/json"
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.HttpResponse;
import org.apache.http.entity.StringEntity;
import org.json.simple.JSONObject;
...

JSONObject address = new JSONObject();
body.put("email", "jon.doe@a.b");
body.put("name", "Jon Doe");
body.put("address", "ID_NUMBER");
body.put("street2", "Street");
body.put("city", "City");
body.put("zip", 12345);
body.put("state", "State");
body.put("country", "Country");
JSONObject body = new JSONObject();
body.put("displayName", "Jon Doe");
body.put("email", "jon.doe@a.b");
body.put("address", address.toString());
StringEntity params = new StringEntity(body.toString());

HttpClient client = new DefaultHttpClient();
HttpPost req = new HttpPut("https://api.raixer.com/users/edcba54321");

req.addHeader("Authorization", "Basic your_encoded_base64_string");
req.addHeader("Content-Type", "application/json");
req.setEntity(params);

HttpResponse response = client.execute(req);
const https = require("https")

const body = {
  "displayName": "Jon Doe",
  "email": "jon.doe@a.b",
  "address": {
    "email": "jon.doe@a.b",
    "name": "Jon Doe",
    "address": "ID_NUMBER",
    "street2": "Street",
    "city": "City",
    "zip": "12345",
    "state": "State",
    "country": "Country"
  }
}

const options = {
  "hostname": "api.raixer.com",
  "port": 443,
  "path": "users/edcba54321",
  "method": "PUT",
  "headers": {
    "Authorization": "Basic your_encoded_base64_string",
    "Content-Type": "application/json",
    "Content-Length": body.toString().length
  }
}

let req = https.request(options)

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
})
req.on("error", (err) => {
  // Handle error
})
req.write(body)
req.end()

Example response:

{
  "n": 1,
  "nModified": 1,
  "ok": 1
}

Updates an user.

HTTP Request

PUT https://api.raixer.com/users/:id

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the user to update.

Body Parameters

Parameter Required Default Description
displayName No N/A A string that specifies the campaign associated to the schedule.
email No N/A A number that specifies the amount of minutes the device will be in listening mode.
address No N/A An object that specifies the address of the user it he/she wants to receive invoices of the payments made to us. It should have the parameters of the below table.

Address Parameters

Parameter Required Default Description
email No N/A A string that specifies the email to wich the invoices will be sended to. If not specified, the invoices will be sended to the email of the user.
name No N/A A string that specifies the name of the person or the legal business responsible of the invoices.
address No N/A A string that specifies the Identification number of the peron or legal business responsible of the invoices.
street2 No N/A A string that specifies the street address of the person or the legal business responsible of the invoices.
city No N/A A string that specifies the city of the address of the person or the legal business responsible of the invoices.
zip No N/A A string that specifies the ZIP code of the address of the person or the legal business responsible of the invoices.
state No N/A A string that specifies the state of the address of the person or the legal business responsible of the invoices.
country No N/A A string that specifies the country of the address of the person or the legal business responsible of the invoices.

Get an User

Example request:

curl "https://api.raixer.com/users/edcba54321"
  -H "Authorization: Basic your_encoded_base64_string"
headers = {
  "Authorization": "Basic your_encoded_base64_string"
}

uri = URI.parse("https://api.raixer.com/users/edcba54321")
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri, headers)

res = http.request(req)
import requests

headers={"Authorization": "Basic your_encoded_base64_string"}
req = requests.get("https://api.raixer.com/users/edcba54321", headers=headers)
$curl = curl_init(); 

if (!$curl) {
  die("Couldn't initialize a cURL handle"); 
}

curl_setopt($curl, CURLOPT_URL, "https://api.raixer.com/users/edcba54321");
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  "Authorization: Basic your_encoded_base64_string"
));

$req = curl_exec($curl); 

if (curl_errno($curl)) {
  echo 'curl error: ' . curl_error($curl); 
} else { 
  // Your following code here
}

curl_close($curl);
...
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
...

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://api.raixer.com/users/edcba54321");

request.addHeader("Authorization", "Basic your_encoded_base64_string");

HttpResponse response = client.execute(request);
const https = require("https")

let req = https.get("https://api.raixer.com/users/edcba54321", { "Authorization": "Basic your_encoded_base64_string" })

req.on("response", (response) => {
  let data = ""
  response.on("data", (chunk) => {
    data += chunk
  })
  response.on("end", () => {
    // Your following code here
  })
  response.on("error", (err) => {
    // Handle error
  })
});
req.on("error", (err) => {
  // Handle error
})

Example response:

{
  "_id" : "edcba54321",
  "displayName" : "Jon Doe",
  "email" : "jon.doe@a.b",
  "created" : "2018-09-17T16:14:42.238Z",
  "updated" : "2018-09-17T16:14:59.266Z",
  "address": {
    "email": "jon.doe@a.b",
    "name": "Jon Doe",
    "address": "ID_NUMBER",
    "street2": "Street",
    "city": "City",
    "zip": "12345",
    "state": "State",
    "country": "Country"
  }
}

Retrieves the details of an user that has previously been created (registered through our APP).

HTTP Request

GET https://api.raixer.com/users/:id

Parameters

Parameter Required Default Description
id Yes N/A A string that specifies the ID of the schedule to retrieve

Errors

Our API uses the following error codes:

Code Meaning
400 Bad Request -- Your request is invalid, for example, you didn't provide the necessary parameters for a function or you didn't pass the Content-Type: application/json header.
401 Unauthorized -- You didn't provide any authorization method or your API credentials are wrong. In some cases, also means you are trying to access a device you don't have permission to.
403 Forbidden -- You are trying to access a non existing device.
404 Not Found -- The specified function could not be found or you tried to access a function with an invalid method.
500 Internal Server Error -- We had a problem with our server. Try again later. If the problem persists, please, get in contact with us.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

Device Notifications

Our Raixer Devices send the following notifications when a certain event happens:

Event Sent to Trigger Meaning
online Raixer APP and Custom Client Webhooks Device goes online The device is online
offline Raixer APP and Custom Client Webhooks Device goes offline The device is offline
door-open Custom Client Webhooks The door connected to any of the sensor door ports was physically opened The door connected to any of the sensor door ports is physically open
door-closed Custom Client Webhooks The door connected to any of the sensor door ports was physically closed The door connected to any of the sensor door ports is physically closed
movement-1 Custom Client Webhooks Device detected movement The movement sensor connected to any of the sensor ports of the device detected movement
movement-0 Custom Client Webhooks Device detected no movement The movement sensor connected to any of the sensor ports of the device detected no movement
power-in Custom Client Webhooks Device detected power in The device detected that the power was restored and it is now charging it's battery
power-out Custom Client Webhooks Device detected power out The device detected that the power was cut and it is now using it's battery to function.
mainButton-press Custom Client Webhooks Device detected main button press The device detected that the it's main button (the physical button) was pressed
connections.detail.history.action.doorIsOpen Raixer APP The door in the sensor door port 1 was physically opened The door connected to the sensor door port 1 is physically open
connections.detail.history.action.doorIsOpen2 Raixer APP The door in the sensor door port 2 was physically opened The door connected to the sensor door port 2 is physically open
connections.detail.history.action.doorIsOpen3 Raixer APP The door in the sensor door port 3 was physically opened The door connected to the sensor door port 3 is physically open
connections.detail.history.action.doorIsClosed Raixer APP The door in the sensor door port 1 was physically closed The door connected to the sensor door port 1 is physically closed
connections.detail.history.action.doorIsClosed2 Raixer APP The door in the sensor door port 2 was physically closed The door connected to the sensor door port 2 is physically closed
connections.detail.history.action.doorIsClosed3 Raixer APP The door in the sensor door port 3 was physically closed The door connected to the sensor door port 3 is physically closed
connections.detail.history.action.doorOpened Raixer APP The device in Auto Access mode opened the door connected to the sensor door port 1 The door connected to the sensor door port 1 of the device was opened in Auto Access mode.
connections.detail.history.action.doorOpened2 Raixer APP The device in Auto Access mode opened the door connected to the sensor door port 2 The door connected to the sensor door port 2 of the device was opened in Auto Access mode.
connections.detail.history.action.doorOpened3 Raixer APP The device in Auto Access mode opened the door connected to the sensor door port 3 The door connected to the sensor door port 3 of the device was opened in Auto Access mode.
connections.detail.history.action.stopJob Raixer APP Auto Access of sensor door port 1 ended The Auto Access mode of the door connected in the sensor door port 1 ended because its time ended or because someone ended by our API or APP.
connections.detail.history.action.stopJob2 Raixer APP Auto Access of sensor door port 2 ended The Auto Access mode of the door connected in the sensor door port 2 ended because its time ended or because someone ended by our API or APP.
connections.detail.history.action.stopJob3 Raixer APP Auto Access of sensor door port 2 ended The Auto Access mode of the door connected in the sensor door port 2 ended because its time ended or because someone ended by our API or APP.
connections.detail.history.action.phoneCall Raixer APP Phone call access of sensor door port 1 The device detected a Phone Call to the Phone associated to the sensor door port 1 and opened the door.
connections.detail.history.action.phoneCall2 Raixer APP Phone call access of sensor door port 2 The device detected a Phone Call to the Phone associated to the sensor door port 2 and opened the door.
connections.detail.history.action.phoneCall3 Raixer APP Phone call access of sensor door port 3 The device detected a Phone Call to the Phone associated to the sensor door port 3 and opened the door.
connections.detail.history.action.openDoor Raixer APP Door of sensor door port 1 was opened The door connected to the sensor door port 1 of the device was opened by our APP or API.
connections.detail.history.action.openDoor2 Raixer APP Door of sensor door port 2 was opened The door connected to the sensor door port 2 of the device was opened by our APP or API.
connections.detail.history.action.openDoor3 Raixer APP Door of sensor door port 3 was opened The door connected to the sensor door port 3 of the device was opened by our APP or API.
connections.detail.history.action.startJob Raixer APP Started Auto Access of door port 1 The Auto Access Mode was started for the door connected to the sensor door port 1 of the device, by our APP or API.
connections.detail.history.action.startJob2 Raixer APP Started Auto Access of door port 2 The Auto Access Mode was started for the door connected to the sensor door port 2 of the device, by our APP or API.
connections.detail.history.action.startJob3 Raixer APP Started Auto Access of door port 3 The Auto Access Mode was started for the door connected to the sensor door port 3 of the device, by our APP or API.
connections.detail.history.action.startJobAutoAccess Raixer APP Started Scheduled Auto Access of door port 1 A Scheduled Auto Access Mode was started for the door connected to the sensor door port 1 of the device.
connections.detail.history.action.startJobAutoAccess2 Raixer APP Started Scheduled Auto Access of door port 2 A Scheduled Auto Access Mode was started for the door connected to the sensor door port 2 of the device.
connections.detail.history.action.startJobAutoAccess3 Raixer APP Started Scheduled Auto Access of door port 3 A Scheduled Auto Access Mode was started for the door connected to the sensor door port 3 of the device.
connections.detail.history.action.movementDetected Raixer APP Device detected movement The movement sensor connected to any of the sensor ports of the device detected movement
connections.detail.history.action.powerIn Raixer APP Power restored The power has been restored and the battery is charging. The device is functioning on power again
connections.detail.history.action.powerOut Raixer APP Power outage The power has been cut and the battery is beign used by the device
connections.detail.history.action.physicalButton Raixer APP Physical open button pressed The physical open button on the device has been pressed