HyperTrack REST API

The HyperTrack API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors. To make API calls, you can use our helper libraries or use any HTTP client. The base API URL is https://api.hypertrack.com/api/v1/.

We use built-in HTTP features, like HTTP authentication and HTTP verbs, which can be understood by off-the-shelf HTTP clients. JSON will be returned in all responses from the API, including errors (though if you’re using API bindings, we will convert the response to the appropriate language-specific object).

You can use our Postman collection to try out the APIs. Set your key as a global variable to simplify authentication. You can also view our Postman tutorial video for a quick walkthrough.

Helper libraries

To make your server-side integration easier, you can use one of our following helpers libraries. These can be directly imported to your application. If your language of choice is not listed, you can use any HTTP requests library to make API calls.

Python

The hypertrack-python library can be installed using pip.

$ pip install hypertrack
import hypertrack
# Initialize the library with the secret token
hypertrack.secret_key = 'YOUR_SK_TOKEN'

Java

The hypertrack-java library can be installed using maven.

<dependency>
  <groupId>io.hypertrack</groupId>
  <artifactId>hypertrack-java</artifactId>
  <version>1.0.0</version>
</dependency>
import io.hypertrack.net.HyperTrackClient;

public class SimpleExample {
    public static void main( String[] args ) throws Exception
    {
        /* Create client instance with secret token. */
        HyperTrackClient client = new HyperTrackClient("YOUR_SK_TOKEN");
    }
}

Node.js

The hypertrack-node library can be installed using npm.

$ npm install hypertrack
var hypertrack = require('hypertrack')('<YOUR_SK_TOKEN>');

Ruby

The hypertrack-ruby library can be installed using gem.

$ gem install hypertrack
require 'hypertrack'
HyperTrack.secret_key = "<YOUR_SK_TOKEN>"

HTTP request headers

In case you are not using a helper library, you will need to add these keys to your request headers.

Authorization

The API follows HTTP basic auth to authenticate API calls with a token. Every API call needs to have the Authorization key sent in the request header with the token, as shown below.

Authorization: token sk_1234567890abcde

Content type

While sending POST requests with a JSON body, remember to add the Content-Type header to define input format.

Content-Type: application/json

API error codes

The HyperTrack REST API uses the following error codes. For each error response, the response content contains information on what is wrong.

Error code Meaning
400 Missing or invalid parameters in API call
401 Missing or invalid API token
402 You are accessing a paid resource without billing setup
403 You don’t have permission to access the resource, verify your token
404 The resource does not exist, check the URL
405 You tried to access a resource with an invalid HTTP method
5xx There was an error on the server and we have been notified

results matching ""

    No results matching ""