BitNinja.io Reseller API

LicenseKeys

createLicenseKey

Create a license key

Customer support creates a license key directly for a server (e.g. based on IP address)


/licensekeys

Usage and SDK Samples

curl -X POST "https://reseller-api.bitninja.io/v1/licensekeys"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LicenseKeysApi;

import java.io.File;
import java.util.*;

public class LicenseKeysApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: reseller_api_auth
        OAuth reseller_api_auth = (OAuth) defaultClient.getAuthentication("reseller_api_auth");
        reseller_api_auth.setAccessToken("YOUR ACCESS TOKEN");

        LicenseKeysApi apiInstance = new LicenseKeysApi();
        NewLicenseKey body = ; // NewLicenseKey | Server whom the license has to be attached
        try {
            apiInstance.createLicenseKey(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseKeysApi#createLicenseKey");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LicenseKeysApi;

public class LicenseKeysApiExample {

    public static void main(String[] args) {
        LicenseKeysApi apiInstance = new LicenseKeysApi();
        NewLicenseKey body = ; // NewLicenseKey | Server whom the license has to be attached
        try {
            apiInstance.createLicenseKey(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseKeysApi#createLicenseKey");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: reseller_api_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

NewLicenseKey *body = ; // Server whom the license has to be attached

LicenseKeysApi *apiInstance = [[LicenseKeysApi alloc] init];

// Create a license key
[apiInstance createLicenseKeyWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BitNinjaioResellerApi = require('bit_ninjaio_reseller_api');
var defaultClient = BitNinjaioResellerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: reseller_api_auth
var reseller_api_auth = defaultClient.authentications['reseller_api_auth'];
reseller_api_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new BitNinjaioResellerApi.LicenseKeysApi()

var body = ; // {NewLicenseKey} Server whom the license has to be attached


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createLicenseKey(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createLicenseKeyExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: reseller_api_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LicenseKeysApi();
            var body = new NewLicenseKey(); // NewLicenseKey | Server whom the license has to be attached

            try
            {
                // Create a license key
                apiInstance.createLicenseKey(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LicenseKeysApi.createLicenseKey: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: reseller_api_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\LicenseKeysApi();
$body = ; // NewLicenseKey | Server whom the license has to be attached

try {
    $api_instance->createLicenseKey($body);
} catch (Exception $e) {
    echo 'Exception when calling LicenseKeysApi->createLicenseKey: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LicenseKeysApi;

# Configure OAuth2 access token for authorization: reseller_api_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::LicenseKeysApi->new();
my $body = WWW::SwaggerClient::Object::NewLicenseKey->new(); # NewLicenseKey | Server whom the license has to be attached

eval { 
    $api_instance->createLicenseKey(body => $body);
};
if ($@) {
    warn "Exception when calling LicenseKeysApi->createLicenseKey: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: reseller_api_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.LicenseKeysApi()
body =  # NewLicenseKey | Server whom the license has to be attached

try: 
    # Create a license key
    api_instance.create_license_key(body)
except ApiException as e:
    print("Exception when calling LicenseKeysApi->createLicenseKey: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Successful attach

Status: 405 - Invalid input

Status: 500 - Internal server error

Status: default - Unexpected error


listAllLicenseKeys

List license keys

The LicenseKeys endpoint returns information about special license key informations e.g. IP based licenses.


/licensekeys

Usage and SDK Samples

curl -X GET "https://reseller-api.bitninja.io/v1/licensekeys"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LicenseKeysApi;

import java.io.File;
import java.util.*;

public class LicenseKeysApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: reseller_api_auth
        OAuth reseller_api_auth = (OAuth) defaultClient.getAuthentication("reseller_api_auth");
        reseller_api_auth.setAccessToken("YOUR ACCESS TOKEN");

        LicenseKeysApi apiInstance = new LicenseKeysApi();
        try {
            array[LicenseKey] result = apiInstance.listAllLicenseKeys();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseKeysApi#listAllLicenseKeys");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LicenseKeysApi;

public class LicenseKeysApiExample {

    public static void main(String[] args) {
        LicenseKeysApi apiInstance = new LicenseKeysApi();
        try {
            array[LicenseKey] result = apiInstance.listAllLicenseKeys();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseKeysApi#listAllLicenseKeys");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: reseller_api_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


LicenseKeysApi *apiInstance = [[LicenseKeysApi alloc] init];

// List license keys
[apiInstance listAllLicenseKeysWithCompletionHandler: 
              ^(array[LicenseKey] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BitNinjaioResellerApi = require('bit_ninjaio_reseller_api');
var defaultClient = BitNinjaioResellerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: reseller_api_auth
var reseller_api_auth = defaultClient.authentications['reseller_api_auth'];
reseller_api_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new BitNinjaioResellerApi.LicenseKeysApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listAllLicenseKeys(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class listAllLicenseKeysExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: reseller_api_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LicenseKeysApi();

            try
            {
                // List license keys
                array[LicenseKey] result = apiInstance.listAllLicenseKeys();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LicenseKeysApi.listAllLicenseKeys: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: reseller_api_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\LicenseKeysApi();

try {
    $result = $api_instance->listAllLicenseKeys();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LicenseKeysApi->listAllLicenseKeys: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LicenseKeysApi;

# Configure OAuth2 access token for authorization: reseller_api_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::LicenseKeysApi->new();

eval { 
    my $result = $api_instance->listAllLicenseKeys();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LicenseKeysApi->listAllLicenseKeys: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: reseller_api_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.LicenseKeysApi()

try: 
    # List license keys
    api_response = api_instance.list_all_license_keys()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LicenseKeysApi->listAllLicenseKeys: %s\n" % e)

Parameters

Responses

Status: 200 - An array of license keys

Status: 500 - Internal server error

Status: default - Unexpected error


renewLicenseKey

renew a license key

Customer support renew a special license key e.g. an IP based.


/licensekeys/renew/{license_key}

Usage and SDK Samples

curl -X POST "https://reseller-api.bitninja.io/v1/licensekeys/renew/{license_key}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LicenseKeysApi;

import java.io.File;
import java.util.*;

public class LicenseKeysApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: reseller_api_auth
        OAuth reseller_api_auth = (OAuth) defaultClient.getAuthentication("reseller_api_auth");
        reseller_api_auth.setAccessToken("YOUR ACCESS TOKEN");

        LicenseKeysApi apiInstance = new LicenseKeysApi();
        String licenseKey = licenseKey_example; // String | License Key
        try {
            apiInstance.renewLicenseKey(licenseKey);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseKeysApi#renewLicenseKey");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LicenseKeysApi;

public class LicenseKeysApiExample {

    public static void main(String[] args) {
        LicenseKeysApi apiInstance = new LicenseKeysApi();
        String licenseKey = licenseKey_example; // String | License Key
        try {
            apiInstance.renewLicenseKey(licenseKey);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseKeysApi#renewLicenseKey");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: reseller_api_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *licenseKey = licenseKey_example; // License Key

LicenseKeysApi *apiInstance = [[LicenseKeysApi alloc] init];

// renew a license key
[apiInstance renewLicenseKeyWith:licenseKey
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BitNinjaioResellerApi = require('bit_ninjaio_reseller_api');
var defaultClient = BitNinjaioResellerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: reseller_api_auth
var reseller_api_auth = defaultClient.authentications['reseller_api_auth'];
reseller_api_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new BitNinjaioResellerApi.LicenseKeysApi()

var licenseKey = licenseKey_example; // {String} License Key


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.renewLicenseKey(licenseKey, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class renewLicenseKeyExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: reseller_api_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LicenseKeysApi();
            var licenseKey = licenseKey_example;  // String | License Key

            try
            {
                // renew a license key
                apiInstance.renewLicenseKey(licenseKey);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LicenseKeysApi.renewLicenseKey: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: reseller_api_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\LicenseKeysApi();
$licenseKey = licenseKey_example; // String | License Key

try {
    $api_instance->renewLicenseKey($licenseKey);
} catch (Exception $e) {
    echo 'Exception when calling LicenseKeysApi->renewLicenseKey: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LicenseKeysApi;

# Configure OAuth2 access token for authorization: reseller_api_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::LicenseKeysApi->new();
my $licenseKey = licenseKey_example; # String | License Key

eval { 
    $api_instance->renewLicenseKey(licenseKey => $licenseKey);
};
if ($@) {
    warn "Exception when calling LicenseKeysApi->renewLicenseKey: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: reseller_api_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.LicenseKeysApi()
licenseKey = licenseKey_example # String | License Key

try: 
    # renew a license key
    api_instance.renew_license_key(licenseKey)
except ApiException as e:
    print("Exception when calling LicenseKeysApi->renewLicenseKey: %s\n" % e)

Parameters

Path parameters
Name Description
license_key*
String
License Key
Required

Responses

Status: 200 - Successful renewal

Status: 500 - Internal server error

Status: default - Unexpected error


terminateLicenseKey

Terminate a license key

Customer support terminates a special license key e.g. an IP based.


/licensekeys/{license_key}

Usage and SDK Samples

curl -X DELETE "https://reseller-api.bitninja.io/v1/licensekeys/{license_key}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LicenseKeysApi;

import java.io.File;
import java.util.*;

public class LicenseKeysApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: reseller_api_auth
        OAuth reseller_api_auth = (OAuth) defaultClient.getAuthentication("reseller_api_auth");
        reseller_api_auth.setAccessToken("YOUR ACCESS TOKEN");

        LicenseKeysApi apiInstance = new LicenseKeysApi();
        String licenseKey = licenseKey_example; // String | License Key
        try {
            apiInstance.terminateLicenseKey(licenseKey);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseKeysApi#terminateLicenseKey");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LicenseKeysApi;

public class LicenseKeysApiExample {

    public static void main(String[] args) {
        LicenseKeysApi apiInstance = new LicenseKeysApi();
        String licenseKey = licenseKey_example; // String | License Key
        try {
            apiInstance.terminateLicenseKey(licenseKey);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseKeysApi#terminateLicenseKey");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: reseller_api_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *licenseKey = licenseKey_example; // License Key

LicenseKeysApi *apiInstance = [[LicenseKeysApi alloc] init];

// Terminate a license key
[apiInstance terminateLicenseKeyWith:licenseKey
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BitNinjaioResellerApi = require('bit_ninjaio_reseller_api');
var defaultClient = BitNinjaioResellerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: reseller_api_auth
var reseller_api_auth = defaultClient.authentications['reseller_api_auth'];
reseller_api_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new BitNinjaioResellerApi.LicenseKeysApi()

var licenseKey = licenseKey_example; // {String} License Key


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.terminateLicenseKey(licenseKey, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class terminateLicenseKeyExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: reseller_api_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LicenseKeysApi();
            var licenseKey = licenseKey_example;  // String | License Key

            try
            {
                // Terminate a license key
                apiInstance.terminateLicenseKey(licenseKey);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LicenseKeysApi.terminateLicenseKey: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: reseller_api_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\LicenseKeysApi();
$licenseKey = licenseKey_example; // String | License Key

try {
    $api_instance->terminateLicenseKey($licenseKey);
} catch (Exception $e) {
    echo 'Exception when calling LicenseKeysApi->terminateLicenseKey: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LicenseKeysApi;

# Configure OAuth2 access token for authorization: reseller_api_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::LicenseKeysApi->new();
my $licenseKey = licenseKey_example; # String | License Key

eval { 
    $api_instance->terminateLicenseKey(licenseKey => $licenseKey);
};
if ($@) {
    warn "Exception when calling LicenseKeysApi->terminateLicenseKey: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: reseller_api_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.LicenseKeysApi()
licenseKey = licenseKey_example # String | License Key

try: 
    # Terminate a license key
    api_instance.terminate_license_key(licenseKey)
except ApiException as e:
    print("Exception when calling LicenseKeysApi->terminateLicenseKey: %s\n" % e)

Parameters

Path parameters
Name Description
license_key*
String
License Key
Required

Responses

Status: 200 - Successful termination

Status: 500 - Internal server error

Status: default - Unexpected error


Licenses

attachLicense

Attach a license to a server

Customer support attaches a license to the selected server


/licenses

Usage and SDK Samples

curl -X POST "https://reseller-api.bitninja.io/v1/licenses"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LicensesApi;

import java.io.File;
import java.util.*;

public class LicensesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: reseller_api_auth
        OAuth reseller_api_auth = (OAuth) defaultClient.getAuthentication("reseller_api_auth");
        reseller_api_auth.setAccessToken("YOUR ACCESS TOKEN");

        LicensesApi apiInstance = new LicensesApi();
        NewLicense body = ; // NewLicense | Server whom the license has to be attached
        try {
            apiInstance.attachLicense(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicensesApi#attachLicense");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LicensesApi;

public class LicensesApiExample {

    public static void main(String[] args) {
        LicensesApi apiInstance = new LicensesApi();
        NewLicense body = ; // NewLicense | Server whom the license has to be attached
        try {
            apiInstance.attachLicense(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicensesApi#attachLicense");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: reseller_api_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

NewLicense *body = ; // Server whom the license has to be attached

LicensesApi *apiInstance = [[LicensesApi alloc] init];

// Attach a license to a server
[apiInstance attachLicenseWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BitNinjaioResellerApi = require('bit_ninjaio_reseller_api');
var defaultClient = BitNinjaioResellerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: reseller_api_auth
var reseller_api_auth = defaultClient.authentications['reseller_api_auth'];
reseller_api_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new BitNinjaioResellerApi.LicensesApi()

var body = ; // {NewLicense} Server whom the license has to be attached


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.attachLicense(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class attachLicenseExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: reseller_api_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LicensesApi();
            var body = new NewLicense(); // NewLicense | Server whom the license has to be attached

            try
            {
                // Attach a license to a server
                apiInstance.attachLicense(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LicensesApi.attachLicense: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: reseller_api_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\LicensesApi();
$body = ; // NewLicense | Server whom the license has to be attached

try {
    $api_instance->attachLicense($body);
} catch (Exception $e) {
    echo 'Exception when calling LicensesApi->attachLicense: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LicensesApi;

# Configure OAuth2 access token for authorization: reseller_api_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::LicensesApi->new();
my $body = WWW::SwaggerClient::Object::NewLicense->new(); # NewLicense | Server whom the license has to be attached

eval { 
    $api_instance->attachLicense(body => $body);
};
if ($@) {
    warn "Exception when calling LicensesApi->attachLicense: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: reseller_api_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.LicensesApi()
body =  # NewLicense | Server whom the license has to be attached

try: 
    # Attach a license to a server
    api_instance.attach_license(body)
except ApiException as e:
    print("Exception when calling LicensesApi->attachLicense: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Successful attach

Status: 405 - Invalid input

Status: 500 - Internal server error

Status: default - Unexpected error


detachLicense

Detach a license

Detach a license belonging to the customer's server.


/licenses/{server_id}

Usage and SDK Samples

curl -X DELETE "https://reseller-api.bitninja.io/v1/licenses/{server_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LicensesApi;

import java.io.File;
import java.util.*;

public class LicensesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: reseller_api_auth
        OAuth reseller_api_auth = (OAuth) defaultClient.getAuthentication("reseller_api_auth");
        reseller_api_auth.setAccessToken("YOUR ACCESS TOKEN");

        LicensesApi apiInstance = new LicensesApi();
        Long serverId = 789; // Long | Server ID
        try {
            apiInstance.detachLicense(serverId);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicensesApi#detachLicense");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LicensesApi;

public class LicensesApiExample {

    public static void main(String[] args) {
        LicensesApi apiInstance = new LicensesApi();
        Long serverId = 789; // Long | Server ID
        try {
            apiInstance.detachLicense(serverId);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicensesApi#detachLicense");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: reseller_api_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *serverId = 789; // Server ID

LicensesApi *apiInstance = [[LicensesApi alloc] init];

// Detach a license
[apiInstance detachLicenseWith:serverId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BitNinjaioResellerApi = require('bit_ninjaio_reseller_api');
var defaultClient = BitNinjaioResellerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: reseller_api_auth
var reseller_api_auth = defaultClient.authentications['reseller_api_auth'];
reseller_api_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new BitNinjaioResellerApi.LicensesApi()

var serverId = 789; // {Long} Server ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.detachLicense(serverId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class detachLicenseExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: reseller_api_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LicensesApi();
            var serverId = 789;  // Long | Server ID

            try
            {
                // Detach a license
                apiInstance.detachLicense(serverId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LicensesApi.detachLicense: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: reseller_api_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\LicensesApi();
$serverId = 789; // Long | Server ID

try {
    $api_instance->detachLicense($serverId);
} catch (Exception $e) {
    echo 'Exception when calling LicensesApi->detachLicense: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LicensesApi;

# Configure OAuth2 access token for authorization: reseller_api_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::LicensesApi->new();
my $serverId = 789; # Long | Server ID

eval { 
    $api_instance->detachLicense(serverId => $serverId);
};
if ($@) {
    warn "Exception when calling LicensesApi->detachLicense: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: reseller_api_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.LicensesApi()
serverId = 789 # Long | Server ID

try: 
    # Detach a license
    api_instance.detach_license(serverId)
except ApiException as e:
    print("Exception when calling LicensesApi->detachLicense: %s\n" % e)

Parameters

Path parameters
Name Description
server_id*
Long (int64)
Server ID
Required

Responses

Status: 200 - Successful detach

Status: 500 - Internal server error

Status: default - Unexpected error


listAllLicenses

List reseller's licenses

The Licenses endpoint returns information about all licenses belonging to the reseller's customers.


/licenses

Usage and SDK Samples

curl -X GET "https://reseller-api.bitninja.io/v1/licenses"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LicensesApi;

import java.io.File;
import java.util.*;

public class LicensesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: reseller_api_auth
        OAuth reseller_api_auth = (OAuth) defaultClient.getAuthentication("reseller_api_auth");
        reseller_api_auth.setAccessToken("YOUR ACCESS TOKEN");

        LicensesApi apiInstance = new LicensesApi();
        try {
            array[License] result = apiInstance.listAllLicenses();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicensesApi#listAllLicenses");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LicensesApi;

public class LicensesApiExample {

    public static void main(String[] args) {
        LicensesApi apiInstance = new LicensesApi();
        try {
            array[License] result = apiInstance.listAllLicenses();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicensesApi#listAllLicenses");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: reseller_api_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


LicensesApi *apiInstance = [[LicensesApi alloc] init];

// List reseller's licenses
[apiInstance listAllLicensesWithCompletionHandler: 
              ^(array[License] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BitNinjaioResellerApi = require('bit_ninjaio_reseller_api');
var defaultClient = BitNinjaioResellerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: reseller_api_auth
var reseller_api_auth = defaultClient.authentications['reseller_api_auth'];
reseller_api_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new BitNinjaioResellerApi.LicensesApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listAllLicenses(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class listAllLicensesExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: reseller_api_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LicensesApi();

            try
            {
                // List reseller's licenses
                array[License] result = apiInstance.listAllLicenses();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LicensesApi.listAllLicenses: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: reseller_api_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\LicensesApi();

try {
    $result = $api_instance->listAllLicenses();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LicensesApi->listAllLicenses: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LicensesApi;

# Configure OAuth2 access token for authorization: reseller_api_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::LicensesApi->new();

eval { 
    my $result = $api_instance->listAllLicenses();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LicensesApi->listAllLicenses: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: reseller_api_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.LicensesApi()

try: 
    # List reseller's licenses
    api_response = api_instance.list_all_licenses()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LicensesApi->listAllLicenses: %s\n" % e)

Parameters

Responses

Status: 200 - An array of licenses

Status: 500 - Internal server error

Status: default - Unexpected error


Servers

listAllServers

List reseller's servers

Information about all servers belonging to the reseller.


/servers

Usage and SDK Samples

curl -X GET "https://reseller-api.bitninja.io/v1/servers"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServersApi;

import java.io.File;
import java.util.*;

public class ServersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: reseller_api_auth
        OAuth reseller_api_auth = (OAuth) defaultClient.getAuthentication("reseller_api_auth");
        reseller_api_auth.setAccessToken("YOUR ACCESS TOKEN");

        ServersApi apiInstance = new ServersApi();
        try {
            array[Server] result = apiInstance.listAllServers();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServersApi#listAllServers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServersApi;

public class ServersApiExample {

    public static void main(String[] args) {
        ServersApi apiInstance = new ServersApi();
        try {
            array[Server] result = apiInstance.listAllServers();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServersApi#listAllServers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: reseller_api_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


ServersApi *apiInstance = [[ServersApi alloc] init];

// List reseller's servers
[apiInstance listAllServersWithCompletionHandler: 
              ^(array[Server] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BitNinjaioResellerApi = require('bit_ninjaio_reseller_api');
var defaultClient = BitNinjaioResellerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: reseller_api_auth
var reseller_api_auth = defaultClient.authentications['reseller_api_auth'];
reseller_api_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new BitNinjaioResellerApi.ServersApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listAllServers(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class listAllServersExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: reseller_api_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ServersApi();

            try
            {
                // List reseller's servers
                array[Server] result = apiInstance.listAllServers();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServersApi.listAllServers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: reseller_api_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\ServersApi();

try {
    $result = $api_instance->listAllServers();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ServersApi->listAllServers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ServersApi;

# Configure OAuth2 access token for authorization: reseller_api_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ServersApi->new();

eval { 
    my $result = $api_instance->listAllServers();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ServersApi->listAllServers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: reseller_api_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ServersApi()

try: 
    # List reseller's servers
    api_response = api_instance.list_all_servers()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ServersApi->listAllServers: %s\n" % e)

Parameters

Responses

Status: 200 - An array of servers

Status: 500 - Internal server error

Status: default - Unexpected error


listUsersServers

List customer's servers

Customer support gets a list of customer servers, so can select one of them to buy subscription for that server.


/users/{user_id}/servers

Usage and SDK Samples

curl -X GET "https://reseller-api.bitninja.io/v1/users/{user_id}/servers"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServersApi;

import java.io.File;
import java.util.*;

public class ServersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: reseller_api_auth
        OAuth reseller_api_auth = (OAuth) defaultClient.getAuthentication("reseller_api_auth");
        reseller_api_auth.setAccessToken("YOUR ACCESS TOKEN");

        ServersApi apiInstance = new ServersApi();
        Long userId = 789; // Long | User ID
        try {
            array[Server] result = apiInstance.listUsersServers(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServersApi#listUsersServers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServersApi;

public class ServersApiExample {

    public static void main(String[] args) {
        ServersApi apiInstance = new ServersApi();
        Long userId = 789; // Long | User ID
        try {
            array[Server] result = apiInstance.listUsersServers(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServersApi#listUsersServers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: reseller_api_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *userId = 789; // User ID

ServersApi *apiInstance = [[ServersApi alloc] init];

// List customer's servers
[apiInstance listUsersServersWith:userId
              completionHandler: ^(array[Server] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BitNinjaioResellerApi = require('bit_ninjaio_reseller_api');
var defaultClient = BitNinjaioResellerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: reseller_api_auth
var reseller_api_auth = defaultClient.authentications['reseller_api_auth'];
reseller_api_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new BitNinjaioResellerApi.ServersApi()

var userId = 789; // {Long} User ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listUsersServers(userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class listUsersServersExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: reseller_api_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ServersApi();
            var userId = 789;  // Long | User ID

            try
            {
                // List customer's servers
                array[Server] result = apiInstance.listUsersServers(userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServersApi.listUsersServers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: reseller_api_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\ServersApi();
$userId = 789; // Long | User ID

try {
    $result = $api_instance->listUsersServers($userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ServersApi->listUsersServers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ServersApi;

# Configure OAuth2 access token for authorization: reseller_api_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ServersApi->new();
my $userId = 789; # Long | User ID

eval { 
    my $result = $api_instance->listUsersServers(userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ServersApi->listUsersServers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: reseller_api_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ServersApi()
userId = 789 # Long | User ID

try: 
    # List customer's servers
    api_response = api_instance.list_users_servers(userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ServersApi->listUsersServers: %s\n" % e)

Parameters

Path parameters
Name Description
user_id*
Long (int64)
User ID
Required

Responses

Status: 200 - An array of servers

Status: 500 - Internal server error

Status: default - Unexpected error


Users

detachUser

Detach a customer

Detach customer from reseller


/users/{user_id}

Usage and SDK Samples

curl -X DELETE "https://reseller-api.bitninja.io/v1/users/{user_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: reseller_api_auth
        OAuth reseller_api_auth = (OAuth) defaultClient.getAuthentication("reseller_api_auth");
        reseller_api_auth.setAccessToken("YOUR ACCESS TOKEN");

        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | User ID
        try {
            apiInstance.detachUser(userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#detachUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | User ID
        try {
            apiInstance.detachUser(userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#detachUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: reseller_api_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *userId = 789; // User ID

UsersApi *apiInstance = [[UsersApi alloc] init];

// Detach a customer
[apiInstance detachUserWith:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BitNinjaioResellerApi = require('bit_ninjaio_reseller_api');
var defaultClient = BitNinjaioResellerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: reseller_api_auth
var reseller_api_auth = defaultClient.authentications['reseller_api_auth'];
reseller_api_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new BitNinjaioResellerApi.UsersApi()

var userId = 789; // {Long} User ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.detachUser(userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class detachUserExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: reseller_api_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UsersApi();
            var userId = 789;  // Long | User ID

            try
            {
                // Detach a customer
                apiInstance.detachUser(userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.detachUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: reseller_api_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\UsersApi();
$userId = 789; // Long | User ID

try {
    $api_instance->detachUser($userId);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->detachUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# Configure OAuth2 access token for authorization: reseller_api_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = 789; # Long | User ID

eval { 
    $api_instance->detachUser(userId => $userId);
};
if ($@) {
    warn "Exception when calling UsersApi->detachUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: reseller_api_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = 789 # Long | User ID

try: 
    # Detach a customer
    api_instance.detach_user(userId)
except ApiException as e:
    print("Exception when calling UsersApi->detachUser: %s\n" % e)

Parameters

Path parameters
Name Description
user_id*
Long (int64)
User ID
Required

Responses

Status: 200 - Successful detach

Status: 500 - Internal server error

Status: default - Unexpected error


getInstructions

Get installation instructions for the customer

Installation instructions mean the command of universal installer in this case.


/users/{user_id}/install

Usage and SDK Samples

curl -X GET "https://reseller-api.bitninja.io/v1/users/{user_id}/install"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: reseller_api_auth
        OAuth reseller_api_auth = (OAuth) defaultClient.getAuthentication("reseller_api_auth");
        reseller_api_auth.setAccessToken("YOUR ACCESS TOKEN");

        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | User ID
        try {
            array[Install] result = apiInstance.getInstructions(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getInstructions");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | User ID
        try {
            array[Install] result = apiInstance.getInstructions(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getInstructions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: reseller_api_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *userId = 789; // User ID

UsersApi *apiInstance = [[UsersApi alloc] init];

// Get installation instructions for the customer
[apiInstance getInstructionsWith:userId
              completionHandler: ^(array[Install] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BitNinjaioResellerApi = require('bit_ninjaio_reseller_api');
var defaultClient = BitNinjaioResellerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: reseller_api_auth
var reseller_api_auth = defaultClient.authentications['reseller_api_auth'];
reseller_api_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new BitNinjaioResellerApi.UsersApi()

var userId = 789; // {Long} User ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getInstructions(userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getInstructionsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: reseller_api_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UsersApi();
            var userId = 789;  // Long | User ID

            try
            {
                // Get installation instructions for the customer
                array[Install] result = apiInstance.getInstructions(userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.getInstructions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: reseller_api_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\UsersApi();
$userId = 789; // Long | User ID

try {
    $result = $api_instance->getInstructions($userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->getInstructions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# Configure OAuth2 access token for authorization: reseller_api_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = 789; # Long | User ID

eval { 
    my $result = $api_instance->getInstructions(userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->getInstructions: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: reseller_api_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = 789 # Long | User ID

try: 
    # Get installation instructions for the customer
    api_response = api_instance.get_instructions(userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->getInstructions: %s\n" % e)

Parameters

Path parameters
Name Description
user_id*
Long (int64)
User ID
Required

Responses

Status: 200 - Array of installation instructions

Status: 500 - Internal server error

Status: default - Unexpected error


getToken

Get token for the user

To initiate a secure and passwordless login, utilize the token provided in this URL: https://admin.bitninja.io/site/login?token=token_placeholder

Please note, that this passwordless login method is effective only for users with activated accounts. Account activation can be achieved by either providing a password during user registration via the API or by validating the account through an activation email.

Also the activation email will only be sent out by BitNinja, if a password was not provided during registration. If you’d prefer that only you communicate with your customers, please always set a password via API when creating the users.

Handle this sensitive information with utmost care, ensuring accessibility only by authorized users.


/users/{user_id}/token

Usage and SDK Samples

curl -X GET "https://reseller-api.bitninja.io/v1/users/{user_id}/token"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: reseller_api_auth
        OAuth reseller_api_auth = (OAuth) defaultClient.getAuthentication("reseller_api_auth");
        reseller_api_auth.setAccessToken("YOUR ACCESS TOKEN");

        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | User ID
        try {
            array[Token] result = apiInstance.getToken(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getToken");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | User ID
        try {
            array[Token] result = apiInstance.getToken(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getToken");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: reseller_api_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *userId = 789; // User ID

UsersApi *apiInstance = [[UsersApi alloc] init];

// Get token for user
[apiInstance getTokenWith:userId
              completionHandler: ^(array[Token] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BitNinjaioResellerApi = require('bit_ninjaio_reseller_api');
var defaultClient = BitNinjaioResellerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: reseller_api_auth
var reseller_api_auth = defaultClient.authentications['reseller_api_auth'];
reseller_api_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new BitNinjaioResellerApi.UsersApi()

var userId = 789; // {Long} User ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getToken(userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTokenExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: reseller_api_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UsersApi();
            var userId = 789;  // Long | User ID

            try
            {
                // Get token for user
                array[Token] result = apiInstance.getToken(userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.getToken: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: reseller_api_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\UsersApi();
$userId = 789; // Long | User ID

try {
    $result = $api_instance->getToken($userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->getToken: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# Configure OAuth2 access token for authorization: reseller_api_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = 789; # Long | User ID

eval { 
    my $result = $api_instance->getToken(userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->getToken: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: reseller_api_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = 789 # Long | User ID

try: 
    # Get token for user
    api_response = api_instance.get_token(userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->getToken: %s\n" % e)

Parameters

Path parameters
Name Description
user_id*
Long (int64)
User ID
Required

Responses

Status: 200 - Array of token

Status: 500 - Internal server error

Status: default - Unexpected error


listAllUsers

Get a list of all users

Information about all customers of the reseller.


/users

Usage and SDK Samples

curl -X GET "https://reseller-api.bitninja.io/v1/users"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: reseller_api_auth
        OAuth reseller_api_auth = (OAuth) defaultClient.getAuthentication("reseller_api_auth");
        reseller_api_auth.setAccessToken("YOUR ACCESS TOKEN");

        UsersApi apiInstance = new UsersApi();
        try {
            array[User] result = apiInstance.listAllUsers();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#listAllUsers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        try {
            array[User] result = apiInstance.listAllUsers();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#listAllUsers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: reseller_api_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


UsersApi *apiInstance = [[UsersApi alloc] init];

// Get a list of all users
[apiInstance listAllUsersWithCompletionHandler: 
              ^(array[User] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BitNinjaioResellerApi = require('bit_ninjaio_reseller_api');
var defaultClient = BitNinjaioResellerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: reseller_api_auth
var reseller_api_auth = defaultClient.authentications['reseller_api_auth'];
reseller_api_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new BitNinjaioResellerApi.UsersApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listAllUsers(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class listAllUsersExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: reseller_api_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UsersApi();

            try
            {
                // Get a list of all users
                array[User] result = apiInstance.listAllUsers();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.listAllUsers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: reseller_api_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\UsersApi();

try {
    $result = $api_instance->listAllUsers();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->listAllUsers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# Configure OAuth2 access token for authorization: reseller_api_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UsersApi->new();

eval { 
    my $result = $api_instance->listAllUsers();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->listAllUsers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: reseller_api_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi()

try: 
    # Get a list of all users
    api_response = api_instance.list_all_users()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->listAllUsers: %s\n" % e)

Parameters

Responses

Status: 200 - An array of users

Status: 500 - Internal server error

Status: default - Unexpected error


registerUser

Register a BitNinja user account under reseller

Creates a new account in BitNinja and the user receives an email to do a password reset.


/users

Usage and SDK Samples

curl -X POST "https://reseller-api.bitninja.io/v1/users"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: reseller_api_auth
        OAuth reseller_api_auth = (OAuth) defaultClient.getAuthentication("reseller_api_auth");
        reseller_api_auth.setAccessToken("YOUR ACCESS TOKEN");

        UsersApi apiInstance = new UsersApi();
        NewUser body = ; // NewUser | User who needs to be registered as reseller's customer.
        try {
            apiInstance.registerUser(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#registerUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        NewUser body = ; // NewUser | User who needs to be registered as reseller's customer.
        try {
            apiInstance.registerUser(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#registerUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: reseller_api_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

NewUser *body = ; // User who needs to be registered as reseller's customer.

UsersApi *apiInstance = [[UsersApi alloc] init];

// Register a BitNinja user account under reseller
[apiInstance registerUserWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BitNinjaioResellerApi = require('bit_ninjaio_reseller_api');
var defaultClient = BitNinjaioResellerApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: reseller_api_auth
var reseller_api_auth = defaultClient.authentications['reseller_api_auth'];
reseller_api_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new BitNinjaioResellerApi.UsersApi()

var body = ; // {NewUser} User who needs to be registered as reseller's customer.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.registerUser(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class registerUserExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: reseller_api_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UsersApi();
            var body = new NewUser(); // NewUser | User who needs to be registered as reseller's customer.

            try
            {
                // Register a BitNinja user account under reseller
                apiInstance.registerUser(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.registerUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: reseller_api_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\UsersApi();
$body = ; // NewUser | User who needs to be registered as reseller's customer.

try {
    $api_instance->registerUser($body);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->registerUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

# Configure OAuth2 access token for authorization: reseller_api_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $body = WWW::SwaggerClient::Object::NewUser->new(); # NewUser | User who needs to be registered as reseller's customer.

eval { 
    $api_instance->registerUser(body => $body);
};
if ($@) {
    warn "Exception when calling UsersApi->registerUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: reseller_api_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
body =  # NewUser | User who needs to be registered as reseller's customer.

try: 
    # Register a BitNinja user account under reseller
    api_instance.register_user(body)
except ApiException as e:
    print("Exception when calling UsersApi->registerUser: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Successful registration

Status: 405 - Invalid input

Status: 500 - Internal server error

Status: default - Unexpected error