Rock 7 API

The Rock 7 API Developer Hub

Welcome to the Rock 7 API developer hub. You'll find comprehensive guides and documentation to help you start working with Rock 7 API as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    
Suggest Edits

Authentication

 

All calls to the Rock 7 API must be authenticated. The API accepts two parameters - username and password.

These credentials should be different from those used to log in to other Rock Seven systems (e.g. Core). Contact Rock 7 Support (support@rock7.com) for assistance.

 
Suggest Edits

Retrieving all Devices

 

Query Auth

 Authentication is required for this endpoint.
gethttps://core.rock7.com/API3/Device/All
curl --request GET \
  --url https://core.rock7.com/API3/Device/All
var request = require("request");

var options = { method: 'GET', url: 'https://core.rock7.com/API3/Device/All' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://core.rock7.com/API3/Device/All")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://core.rock7.com/API3/Device/All");

xhr.send(data);
import requests

url = "https://core.rock7.com/API3/Device/All"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "devices": [
    {
      "id": "JaKzYmyeDanGPWaokvBLrrVqgZxNXApv",
      "deviceType": "GRIFFIN",
      "name": "RockAIR 100039",
      "type": "device",
      "serial": "100039"
    },
    {
      "id": "KbONwVrMLJxkeXXdNknPDyqjAvGQXzoZ",
      "deviceType": "TIGERSHARK",
      "name": "RockFLEET 50589",
      "type": "device",
      "serial": "50589"
    }
  ]
}
 
Suggest Edits

Set Device Home

For use with the 'Away from Home' mode.

 

Query Auth

 Authentication is required for this endpoint.
gethttps://core.rock7.com/API3/Device/serial/SetHome
curl --request GET \
  --url 'https://core.rock7.com/API3/Device/serial/SetHome?radius=radius'
var request = require("request");

var options = { method: 'GET',
  url:
   'https://core.rock7.com/API3/Device/serial/SetHome',
  qs: { radius: 'radius' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://core.rock7.com/API3/Device/serial/SetHome?radius=radius")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://core.rock7.com/API3/Device/serial/SetHome?radius=radius");

xhr.send(data);
import requests

url = "https://core.rock7.com/API3/Device/serial/SetHome"

querystring = {"radius":"radius"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "result": true
}

Path Params

serial
string
required

Query Params

latitude
double
longitude
double
radius
int32
required

25, 50, 100, 250, 1000, 2000, 3000 (Meters)

 

Notes

Omitting Latitude/Longitude will instruct the device to use its current location as Home

Suggest Edits

Geofences

 
Suggest Edits

Creating a Geofence

 

Query Auth

 Authentication is required for this endpoint.
posthttps://core.rock7.com/API3/Geofence/Create
curl --request POST \
  --url https://core.rock7.com/API3/Geofence/Create
var request = require("request");

var options = { method: 'POST',
  url: 'https://core.rock7.com/API3/Geofence/Create' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://core.rock7.com/API3/Geofence/Create")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://core.rock7.com/API3/Geofence/Create");

xhr.send(data);
import requests

url = "https://core.rock7.com/API3/Geofence/Create"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "result": true
  "geofence": {
    "id": "meJwgzdpXVxNREowVzEMDlQGLPvAbkyr",
    "definition": "25.41,-80.23,32.38,-64.67,18.38,-65.63",
    "name": "Bermuda Triangle",
    "type": "geofence"
  }
}

Query Params

name
string

Geofence name - must be unique

definition
string

Latitude/Longitude - CSV coordinate pairs - minimum 3 points

 

This command will create a new Geofence from the supplied coordinate pairs. The Geofence will be locked, and is not editable after it is created.

Suggest Edits

Retrieving All Geofences

 

Query Auth

 Authentication is required for this endpoint.
gethttps://core.rock7.com/API3/Geofence/All
curl --request GET \
  --url https://core.rock7.com/API3/Geofence/All
var request = require("request");

var options = { method: 'GET',
  url: 'https://core.rock7.com/API3/Geofence/All' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://core.rock7.com/API3/Geofence/All")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://core.rock7.com/API3/Geofence/All");

xhr.send(data);
import requests

url = "https://core.rock7.com/API3/Geofence/All"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "geofences": [
      {
      "id": "RoDmGzOePxrJZKBAvvnagyQXlpAkvMwj",
      "definition": “72.395,-65.390,66.089,-37.266,50.958,-70.664",
      "name": "Shipping Lane",
      "type": "geofence"
    	},
   	{
    	"id": "meJwgzdpXVxNREowVzEMDlQGLPvAbkyr",
    	"definition": "10.122,-32.432,10.580,-32.453,11.874,-33.490",
    	"name": "Danger Zone",
    	"type": "geofence"
  }
]
}
 

This request will return all of the Geofences in your account.

Suggest Edits

Retrieving a specific Geofence

 

Query Auth

 Authentication is required for this endpoint.
gethttps://core.rock7.com/API3/Geofence/geofence_id/Get
curl --request GET \
  --url https://core.rock7.com/API3/Geofence/RoDmGzOePxrJZKBAvvnagyQXlpAkvMwj/Get
var request = require("request");

var options = { method: 'GET',
  url:
   'https://core.rock7.com/API3/Geofence/RoDmGzOePxrJZKBAvvnagyQXlpAkvMwj/Get' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://core.rock7.com/API3/Geofence/RoDmGzOePxrJZKBAvvnagyQXlpAkvMwj/Get")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://core.rock7.com/API3/Geofence/RoDmGzOePxrJZKBAvvnagyQXlpAkvMwj/Get");

xhr.send(data);
import requests

url = "https://core.rock7.com/API3/Geofence/RoDmGzOePxrJZKBAvvnagyQXlpAkvMwj/Get"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "geofence":
      {
      "id": "RoDmGzOePxrJZKBAvvnagyQXlpAkvMwj",
      "definition": “72.395,-65.390,66.089,-37.266,50.958,-70.664",
      "name": "Shipping Lane",
      "type": "geofence"
    	}
}

Path Params

geofence_id
string
required

Geofence identifier

 

This request will return a specific Geofence

Suggest Edits

Polyfences

 

Polyfences can be configured and sent to a tracker, causing specific behaviour to occur exactly when the tracker crosses a geofence boundary.

A polyfence configuration consists of one or more geofences, each with an associated behaviour.

A typical workflow for creating and sending a geofence is shown below.

  • Create one or more geofences
  • Create a new (empty) polyfence configuration
  • Attach one or more Geofences to the polyfence, specifying the desired tracker behaviour for each geofence.
  • Send the polyfence configuration to the device
Suggest Edits

Creating a Polyfence

 

Query Auth

 Authentication is required for this endpoint.
posthttps://core.rock7.com/API3/Polyfence/Create
curl --request POST \
  --url https://core.rock7.com/API3/Polyfence/Create
var request = require("request");

var options = { method: 'POST',
  url: 'https://core.rock7.com/API3/Polyfence/Create' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://core.rock7.com/API3/Polyfence/Create")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://core.rock7.com/API3/Polyfence/Create");

xhr.send(data);
import requests

url = "https://core.rock7.com/API3/Polyfence/Create"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "polyfence": {
    "id": "RoDmGzOePxrJZKBAvvnagyQXlpAkvMwj",
    "created": "2018-02-09T14:09:31.134Z",
    "name": "Polyfence XYZ",
    "locked": false,
    "geofences": [],
    "type": "polyfence"
  }
}

Query Params

name
string

name of the Polyfence

 
Suggest Edits

Attaching Geofences to a Polyfence

This command will “attach” a geofence to the specified polyfence with the given behaviour; this command can be called repeatedly to attach more than one Geofence.

 

Query Auth

 Authentication is required for this endpoint.
posthttps://core.rock7.com/API3/Polyfence/polyfence_id/Attach
curl --request POST \
  --url https://core.rock7.com/API3/Polyfence/LpwjgJyDQqreRkExXlEAGYmVlazNdOMX/Attach
var request = require("request");

var options = { method: 'POST',
  url:
   'https://core.rock7.com/API3/Polyfence/LpwjgJyDQqreRkExXlEAGYmVlazNdOMX/Attach' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://core.rock7.com/API3/Polyfence/LpwjgJyDQqreRkExXlEAGYmVlazNdOMX/Attach")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://core.rock7.com/API3/Polyfence/LpwjgJyDQqreRkExXlEAGYmVlazNdOMX/Attach");

xhr.send(data);
import requests

url = "https://core.rock7.com/API3/Polyfence/LpwjgJyDQqreRkExXlEAGYmVlazNdOMX/Attach"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "polyfence": {
    "id": "LpwjgJyDQqreRkExXlEAGYmVlazNdOMX",
    "created": "2018-02-09T14:09:31.000Z",
    "name": "Polyfence XYZ",
    "locked": false,
    "type": “polyfence”,
    "geofences": [
      {
        "geofence": {
          "id": "pwjgJyDQqreRknxbeGEAGYmVlazNdOMX",
          "definition": "72.395,-65.390,66.089,-37.266,50.958,-70.664",
          "name": “Shipping Lane",
          "type": "geofence"
        },
        "behaviour": "IN"
      }
    ]
  }
}

Path Params

polyfence_id
string
required

Polyfence identifier

Query Params

behaviour
string

Geofence behaviour - see below

geofence
string

Geofence identifier

 
Behaviour
Description

IN_OUT

Tracker will transmit when it enters or leaves the Geofence

IN

Tracker will only transmit when it enters the Geofence

OUT

Tracker will only transmit when it leaves the Geofence

IN_OFF

Tracker will transmit when it enters the Geofence; and then disable Polyfence mode

Suggest Edits

Sending a Polyfence configuration to a Device

 

Query Auth

 Authentication is required for this endpoint.
posthttps://core.rock7.com/API3/Polyfence/polyfence_id/Send
curl --request POST \
  --url https://core.rock7.com/API3/Polyfence/LpwjgJyDQqreRkExXlEAGYmVlazNdOMX/Send
var request = require("request");

var options = { method: 'POST',
  url:
   'https://core.rock7.com/API3/Polyfence/LpwjgJyDQqreRkExXlEAGYmVlazNdOMX/Send' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://core.rock7.com/API3/Polyfence/LpwjgJyDQqreRkExXlEAGYmVlazNdOMX/Send")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://core.rock7.com/API3/Polyfence/LpwjgJyDQqreRkExXlEAGYmVlazNdOMX/Send");

xhr.send(data);
import requests

url = "https://core.rock7.com/API3/Polyfence/LpwjgJyDQqreRkExXlEAGYmVlazNdOMX/Send"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "polyfence": {
    "id": "LpwjgJyDQqreRkExXlEAGYmVlazNdOMX",
    "created": "2018-02-09T14:09:31.000Z",
    "name": "Polyfence XYZ",
    "locked": true,
    "type": “polyfence”,
    "geofences": [
      {
        "geofence": {
          "id": "pwjgJyDQqreRknxbeGEAGYmVlazNdOMX",
          "definition": "72.395,-65.390,66.089,-37.266,50.958,-70.664",
          "name": “Shipping Lane",
          "type": "geofence"
        },
        "behaviour": "IN"
      }
    ]
  }
}

Path Params

polyfence_id
string
required

Polyfence identifier

Query Params

device
string

Device identifier (preferred)

serial
string

Device serial number (optional)

 

Once a Polyfence has been defined; it can be sent to devices.

Sending a polyfence to a device will “lock” the Polyfence so no further Geofences may be attached. If you wish to include additional Geofences, a new Polyfence must be created.

Issuing this command will replace any other Polyfences associated to this device.

A device can be identified either by its device identifier or its serial.

Suggest Edits

Retrieving a specific Polyfence

 

Query Auth

 Authentication is required for this endpoint.
gethttps://core.rock7.com/API3/Polyfence/polyfence_id/Get
curl --request GET \
  --url https://core.rock7.com/API3/Polyfence/LpwjgJyDQqreRkExXlEAGYmVlazNdOMX/Get
var request = require("request");

var options = { method: 'GET',
  url:
   'https://core.rock7.com/API3/Polyfence/LpwjgJyDQqreRkExXlEAGYmVlazNdOMX/Get' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://core.rock7.com/API3/Polyfence/LpwjgJyDQqreRkExXlEAGYmVlazNdOMX/Get")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://core.rock7.com/API3/Polyfence/LpwjgJyDQqreRkExXlEAGYmVlazNdOMX/Get");

xhr.send(data);
import requests

url = "https://core.rock7.com/API3/Polyfence/LpwjgJyDQqreRkExXlEAGYmVlazNdOMX/Get"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "polyfence": {
    "id": "LpwjgJyDQqreRkExXlEAGYmVlazNdOMX",
    "created": "2018-02-09T14:09:31.000Z",
    "name": "Polyfence XYZ",
    "locked": false,
    "type": “polyfence”,
    "geofences": [
      {
        "geofence": {
          "id": "pwjgJyDQqreRknxbeGEAGYmVlazNdOMX",
          "definition": "72.395,-65.390,66.089,-37.266,50.958,-70.664",
          "name": “Shipping Lane",
          "type": "geofence"
        },
        "behaviour": "IN"
      }
    ]
  }
}

Path Params

polyfence_id
string
required

Polyfence identifier

 
Suggest Edits

Retrieving all Polyfences

 

Query Auth

 Authentication is required for this endpoint.
gethttps://core.rock7.com/API3/Polyfence/All
curl --request GET \
  --url https://core.rock7.com/API3/Polyfence/All
var request = require("request");

var options = { method: 'GET',
  url: 'https://core.rock7.com/API3/Polyfence/All' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://core.rock7.com/API3/Polyfence/All")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://core.rock7.com/API3/Polyfence/All");

xhr.send(data);
import requests

url = "https://core.rock7.com/API3/Polyfence/All"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

 
Suggest Edits

Contracts

 

Available devices can be queried along with usage, and line rental can be extended. Charging is carried out automatically using card details stored on file with our card provider (Stripe).

Suggest Edits

Retrieving all Contracts

This command returns the list of device contracts available in the account

 

Query Auth

 Authentication is required for this endpoint.
gethttps://core.rock7.com/API3/Contract/All
curl --request GET \
  --url https://core.rock7.com/API3/Contract/All
var request = require("request");

var options = { method: 'GET',
  url: 'https://core.rock7.com/API3/Contract/All' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://core.rock7.com/API3/Contract/All")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://core.rock7.com/API3/Contract/All");

xhr.send(data);
import requests

url = "https://core.rock7.com/API3/Contract/All"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "accountName": "An Account",
  "credits": 455,
  "contracts": [
    {
      "stopDate": "2018-03-08T08:59:59Z",
      "active": true,
      "serial": 100462
    },
    {
      "stopDate": "2017-12-09T08:59:59Z",
      "active": false,
      "serial": 20655
    }
    ]
}
 
Suggest Edits

Contract Usage

Returns the usage information for a particular device over a period of time

 

Query Auth

 Authentication is required for this endpoint.
gethttps://core.rock7.com/API3/Contract/deviceSerial/Usage
curl --request GET \
  --url https://core.rock7.com/API3/Contract/deviceSerial/Usage
var request = require("request");

var options = { method: 'GET',
  url:
   'https://core.rock7.com/API3/Contract/deviceSerial/Usage' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://core.rock7.com/API3/Contract/deviceSerial/Usage")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://core.rock7.com/API3/Contract/deviceSerial/Usage");

xhr.send(data);
import requests

url = "https://core.rock7.com/API3/Contract/deviceSerial/Usage"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{"to":"2018-01-01T00:00:00.000Z","from":"2017-01-01T00:00:00.000Z","credit": 101,"serial":"50075"}

Path Params

deviceSerial
int32
required

The serial number of the device

Query Params

from
string

Datetime for start of usage period. e.g. 2017-01-01T00:00:00Z

to
string

Datetime for end of usage period. e.g. 2018-01-01T00:00:00Z

 
Suggest Edits

Extending a Contract

Allows you to extend the line rental of a device by 1 month or more.

 

Query Auth

 Authentication is required for this endpoint.
posthttps://core.rock7.com/API3/Contract/deviceSerial/Extend
curl --request POST \
  --url https://core.rock7.com/API3/Contract/deviceSerial/Extend
var request = require("request");

var options = { method: 'POST',
  url:
   'https://core.rock7.com/API3/Contract/deviceSerial/Extend' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://core.rock7.com/API3/Contract/deviceSerial/Extend")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://core.rock7.com/API3/Contract/deviceSerial/Extend");

xhr.send(data);
import requests

url = "https://core.rock7.com/API3/Contract/deviceSerial/Extend"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{"stopDate":"2017-09-04T00:00:00Z","charge":"ch_1AfTfo2agw2xbxg6flvIEAQx","active":true,"serial" :"50075","success":true}

Path Params

deviceSerial
int32
required

The serial number of the device to extend the contract for

Query Params

months
int32

The number of months to extend the contract by. e.g. 1