Sub User API

Default

addSubUser

Add new sub user.


/add

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://gopi.apix.fi/subuser/add?TraID=&t=&d=SHA-256:<digest>="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        SubUser body = {
  "username" : "tester@firma.fi",
  "createPurchaseInvoice" : true,
  "createSellInvoice" : true,
  "adminSelector" : false,
  "payslip" : false
}; // SubUser | Sub user to add
        String traID = traID_example; // String | pass authenticating user transfer ID
        String t = t_example; // String | timestamp in YYYYMMDDHHmmss format (UTC)
        String d=SHA256 = d=SHA256_example; // String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'
        try {
            SubUser result = apiInstance.addSubUser(body, traID, t, d=SHA256);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#addSubUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        SubUser body = {
  "username" : "tester@firma.fi",
  "createPurchaseInvoice" : true,
  "createSellInvoice" : true,
  "adminSelector" : false,
  "payslip" : false
}; // SubUser | Sub user to add
        String traID = traID_example; // String | pass authenticating user transfer ID
        String t = t_example; // String | timestamp in YYYYMMDDHHmmss format (UTC)
        String d=SHA256 = d=SHA256_example; // String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'
        try {
            SubUser result = apiInstance.addSubUser(body, traID, t, d=SHA256);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#addSubUser");
            e.printStackTrace();
        }
    }
}
SubUser *body = {
  "username" : "tester@firma.fi",
  "createPurchaseInvoice" : true,
  "createSellInvoice" : true,
  "adminSelector" : false,
  "payslip" : false
}; // Sub user to add
String *traID = traID_example; // pass authenticating user transfer ID
String *t = t_example; // timestamp in YYYYMMDDHHmmss format (UTC)
String *d=SHA256<digest> = d=SHA256_example; // SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

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

// Add new sub user.
[apiInstance addSubUserWith:body
    traID:traID
    t:t
    d=SHA256<digest>:d=SHA256<digest>
              completionHandler: ^(SubUser output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SubUserApi = require('sub_user_api');

var api = new SubUserApi.DefaultApi()
var body = {
  "username" : "tester@firma.fi",
  "createPurchaseInvoice" : true,
  "createSellInvoice" : true,
  "adminSelector" : false,
  "payslip" : false
}; // {{SubUser}} Sub user to add
var traID = traID_example; // {{String}} pass authenticating user transfer ID
var t = t_example; // {{String}} timestamp in YYYYMMDDHHmmss format (UTC)
var d=SHA256 = d=SHA256_example; // {{String}} SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

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

namespace Example
{
    public class addSubUserExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var body = new SubUser(); // SubUser | Sub user to add
            var traID = traID_example;  // String | pass authenticating user transfer ID
            var t = t_example;  // String | timestamp in YYYYMMDDHHmmss format (UTC)
            var d=SHA256<digest> = d=SHA256_example;  // String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

            try
            {
                // Add new sub user.
                SubUser result = apiInstance.addSubUser(body, traID, t, d=SHA256<digest>);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.addSubUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$body = {
  "username" : "tester@firma.fi",
  "createPurchaseInvoice" : true,
  "createSellInvoice" : true,
  "adminSelector" : false,
  "payslip" : false
}; // SubUser | Sub user to add
$traID = traID_example; // String | pass authenticating user transfer ID
$t = t_example; // String | timestamp in YYYYMMDDHHmmss format (UTC)
$d=SHA256<digest> = d=SHA256_example; // String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

try {
    $result = $api_instance->addSubUser($body, $traID, $t, $d=SHA256<digest>);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->addSubUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $body = WWW::SwaggerClient::Object::SubUser->new(); # SubUser | Sub user to add
my $traID = traID_example; # String | pass authenticating user transfer ID
my $t = t_example; # String | timestamp in YYYYMMDDHHmmss format (UTC)
my $d=SHA256<digest> = d=SHA256_example; # String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

eval { 
    my $result = $api_instance->addSubUser(body => $body, traID => $traID, t => $t, d=SHA256<digest> => $d=SHA256<digest>);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->addSubUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
body = {
  "username" : "tester@firma.fi",
  "createPurchaseInvoice" : true,
  "createSellInvoice" : true,
  "adminSelector" : false,
  "payslip" : false
} # SubUser | Sub user to add
traID = traID_example # String | pass authenticating user transfer ID
t = t_example # String | timestamp in YYYYMMDDHHmmss format (UTC)
d=SHA256<digest> = d=SHA256_example # String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

try: 
    # Add new sub user.
    api_response = api_instance.add_sub_user(body, traID, t, d=SHA256<digest>)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->addSubUser: %s\n" % e)

Parameters

Body parameters
Name Description
body *
Query parameters
Name Description
TraID*
String
pass authenticating user transfer ID
Required
t*
String
timestamp in YYYYMMDDHHmmss format (UTC)
Required
d=SHA-256:<digest>*
String
SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'
Required

Responses

Status: 200 - new added user

Status: 400 - bad request

Status: 403 - unauthorized

Status: 409 - conflict, username in use


deleteSubUser

Delete sub user.


/delete/{id}

Usage and SDK Samples

curl -X DELETE\
"https://gopi.apix.fi/subuser/delete/{id}?TraID=&t=&d=SHA-256:<digest>="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        Integer id = 56; // Integer | Id of the user
        String traID = traID_example; // String | pass authenticating user transfer ID
        String t = t_example; // String | timestamp in YYYYMMDDHHmmss format (UTC)
        String d=SHA256 = d=SHA256_example; // String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'
        try {
            apiInstance.deleteSubUser(id, traID, t, d=SHA256);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#deleteSubUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer id = 56; // Integer | Id of the user
        String traID = traID_example; // String | pass authenticating user transfer ID
        String t = t_example; // String | timestamp in YYYYMMDDHHmmss format (UTC)
        String d=SHA256 = d=SHA256_example; // String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'
        try {
            apiInstance.deleteSubUser(id, traID, t, d=SHA256);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#deleteSubUser");
            e.printStackTrace();
        }
    }
}
Integer *id = 56; // Id of the user
String *traID = traID_example; // pass authenticating user transfer ID
String *t = t_example; // timestamp in YYYYMMDDHHmmss format (UTC)
String *d=SHA256<digest> = d=SHA256_example; // SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

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

// Delete sub user.
[apiInstance deleteSubUserWith:id
    traID:traID
    t:t
    d=SHA256<digest>:d=SHA256<digest>
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SubUserApi = require('sub_user_api');

var api = new SubUserApi.DefaultApi()
var id = 56; // {{Integer}} Id of the user
var traID = traID_example; // {{String}} pass authenticating user transfer ID
var t = t_example; // {{String}} timestamp in YYYYMMDDHHmmss format (UTC)
var d=SHA256 = d=SHA256_example; // {{String}} SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteSubUser(id, traID, t, d=SHA256, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteSubUserExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var id = 56;  // Integer | Id of the user
            var traID = traID_example;  // String | pass authenticating user transfer ID
            var t = t_example;  // String | timestamp in YYYYMMDDHHmmss format (UTC)
            var d=SHA256<digest> = d=SHA256_example;  // String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

            try
            {
                // Delete sub user.
                apiInstance.deleteSubUser(id, traID, t, d=SHA256<digest>);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.deleteSubUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$id = 56; // Integer | Id of the user
$traID = traID_example; // String | pass authenticating user transfer ID
$t = t_example; // String | timestamp in YYYYMMDDHHmmss format (UTC)
$d=SHA256<digest> = d=SHA256_example; // String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

try {
    $api_instance->deleteSubUser($id, $traID, $t, $d=SHA256<digest>);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->deleteSubUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $id = 56; # Integer | Id of the user
my $traID = traID_example; # String | pass authenticating user transfer ID
my $t = t_example; # String | timestamp in YYYYMMDDHHmmss format (UTC)
my $d=SHA256<digest> = d=SHA256_example; # String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

eval { 
    $api_instance->deleteSubUser(id => $id, traID => $traID, t => $t, d=SHA256<digest> => $d=SHA256<digest>);
};
if ($@) {
    warn "Exception when calling DefaultApi->deleteSubUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
id = 56 # Integer | Id of the user
traID = traID_example # String | pass authenticating user transfer ID
t = t_example # String | timestamp in YYYYMMDDHHmmss format (UTC)
d=SHA256<digest> = d=SHA256_example # String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

try: 
    # Delete sub user.
    api_instance.delete_sub_user(id, traID, t, d=SHA256<digest>)
except ApiException as e:
    print("Exception when calling DefaultApi->deleteSubUser: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Integer
Id of the user
Required
Query parameters
Name Description
TraID*
String
pass authenticating user transfer ID
Required
t*
String
timestamp in YYYYMMDDHHmmss format (UTC)
Required
d=SHA-256:<digest>*
String
SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'
Required

Responses

Status: 200 - success

Status: 400 - bad request

Status: 403 - unauthorized


listSubUsers

List all subusers.


/list

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://gopi.apix.fi/subuser/list?TraID=&t=&d=SHA-256:<digest>="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String traID = traID_example; // String | pass authenticating user transfer ID
        String t = t_example; // String | timestamp in YYYYMMDDHHmmss format (UTC)
        String d=SHA256 = d=SHA256_example; // String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'
        try {
            AllSubUsers result = apiInstance.listSubUsers(traID, t, d=SHA256);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#listSubUsers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String traID = traID_example; // String | pass authenticating user transfer ID
        String t = t_example; // String | timestamp in YYYYMMDDHHmmss format (UTC)
        String d=SHA256 = d=SHA256_example; // String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'
        try {
            AllSubUsers result = apiInstance.listSubUsers(traID, t, d=SHA256);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#listSubUsers");
            e.printStackTrace();
        }
    }
}
String *traID = traID_example; // pass authenticating user transfer ID
String *t = t_example; // timestamp in YYYYMMDDHHmmss format (UTC)
String *d=SHA256<digest> = d=SHA256_example; // SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

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

// List all subusers.
[apiInstance listSubUsersWith:traID
    t:t
    d=SHA256<digest>:d=SHA256<digest>
              completionHandler: ^(AllSubUsers output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SubUserApi = require('sub_user_api');

var api = new SubUserApi.DefaultApi()
var traID = traID_example; // {{String}} pass authenticating user transfer ID
var t = t_example; // {{String}} timestamp in YYYYMMDDHHmmss format (UTC)
var d=SHA256 = d=SHA256_example; // {{String}} SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

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

namespace Example
{
    public class listSubUsersExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var traID = traID_example;  // String | pass authenticating user transfer ID
            var t = t_example;  // String | timestamp in YYYYMMDDHHmmss format (UTC)
            var d=SHA256<digest> = d=SHA256_example;  // String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

            try
            {
                // List all subusers.
                AllSubUsers result = apiInstance.listSubUsers(traID, t, d=SHA256<digest>);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.listSubUsers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$traID = traID_example; // String | pass authenticating user transfer ID
$t = t_example; // String | timestamp in YYYYMMDDHHmmss format (UTC)
$d=SHA256<digest> = d=SHA256_example; // String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

try {
    $result = $api_instance->listSubUsers($traID, $t, $d=SHA256<digest>);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->listSubUsers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $traID = traID_example; # String | pass authenticating user transfer ID
my $t = t_example; # String | timestamp in YYYYMMDDHHmmss format (UTC)
my $d=SHA256<digest> = d=SHA256_example; # String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

eval { 
    my $result = $api_instance->listSubUsers(traID => $traID, t => $t, d=SHA256<digest> => $d=SHA256<digest>);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->listSubUsers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
traID = traID_example # String | pass authenticating user transfer ID
t = t_example # String | timestamp in YYYYMMDDHHmmss format (UTC)
d=SHA256<digest> = d=SHA256_example # String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

try: 
    # List all subusers.
    api_response = api_instance.list_sub_users(traID, t, d=SHA256<digest>)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->listSubUsers: %s\n" % e)

Parameters

Query parameters
Name Description
TraID*
String
pass authenticating user transfer ID
Required
t*
String
timestamp in YYYYMMDDHHmmss format (UTC)
Required
d=SHA-256:<digest>*
String
SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'
Required

Responses

Status: 200 - list users

Status: 400 - bad request

Status: 403 - unauthorized


updateSubUser

Update user. Only password field and access rights are updatable. Subuser ID required


/update

Usage and SDK Samples

curl -X PUT\
-H "Content-Type: application/json"\
"https://gopi.apix.fi/subuser/update?TraID=&t=&d=SHA-256:<digest>="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        SubUser body = {
  "idSubUser" : 12,
  "password" : "newpass",
  "createPurchaseInvoice" : true,
  "createSellInvoice" : true,
  "adminSelector" : true,
  "payslip" : false
}; // SubUser | Sub user to update
        String traID = traID_example; // String | pass authenticating user transfer ID
        String t = t_example; // String | timestamp in YYYYMMDDHHmmss format (UTC)
        String d=SHA256 = d=SHA256_example; // String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'
        try {
            apiInstance.updateSubUser(body, traID, t, d=SHA256);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#updateSubUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        SubUser body = {
  "idSubUser" : 12,
  "password" : "newpass",
  "createPurchaseInvoice" : true,
  "createSellInvoice" : true,
  "adminSelector" : true,
  "payslip" : false
}; // SubUser | Sub user to update
        String traID = traID_example; // String | pass authenticating user transfer ID
        String t = t_example; // String | timestamp in YYYYMMDDHHmmss format (UTC)
        String d=SHA256 = d=SHA256_example; // String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'
        try {
            apiInstance.updateSubUser(body, traID, t, d=SHA256);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#updateSubUser");
            e.printStackTrace();
        }
    }
}
SubUser *body = {
  "idSubUser" : 12,
  "password" : "newpass",
  "createPurchaseInvoice" : true,
  "createSellInvoice" : true,
  "adminSelector" : true,
  "payslip" : false
}; // Sub user to update
String *traID = traID_example; // pass authenticating user transfer ID
String *t = t_example; // timestamp in YYYYMMDDHHmmss format (UTC)
String *d=SHA256<digest> = d=SHA256_example; // SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

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

// Update user. Only password field and access rights are updatable. Subuser ID required
[apiInstance updateSubUserWith:body
    traID:traID
    t:t
    d=SHA256<digest>:d=SHA256<digest>
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SubUserApi = require('sub_user_api');

var api = new SubUserApi.DefaultApi()
var body = {
  "idSubUser" : 12,
  "password" : "newpass",
  "createPurchaseInvoice" : true,
  "createSellInvoice" : true,
  "adminSelector" : true,
  "payslip" : false
}; // {{SubUser}} Sub user to update
var traID = traID_example; // {{String}} pass authenticating user transfer ID
var t = t_example; // {{String}} timestamp in YYYYMMDDHHmmss format (UTC)
var d=SHA256 = d=SHA256_example; // {{String}} SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

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

namespace Example
{
    public class updateSubUserExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var body = new SubUser(); // SubUser | Sub user to update
            var traID = traID_example;  // String | pass authenticating user transfer ID
            var t = t_example;  // String | timestamp in YYYYMMDDHHmmss format (UTC)
            var d=SHA256<digest> = d=SHA256_example;  // String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

            try
            {
                // Update user. Only password field and access rights are updatable. Subuser ID required
                apiInstance.updateSubUser(body, traID, t, d=SHA256<digest>);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.updateSubUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$body = {
  "idSubUser" : 12,
  "password" : "newpass",
  "createPurchaseInvoice" : true,
  "createSellInvoice" : true,
  "adminSelector" : true,
  "payslip" : false
}; // SubUser | Sub user to update
$traID = traID_example; // String | pass authenticating user transfer ID
$t = t_example; // String | timestamp in YYYYMMDDHHmmss format (UTC)
$d=SHA256<digest> = d=SHA256_example; // String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

try {
    $api_instance->updateSubUser($body, $traID, $t, $d=SHA256<digest>);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->updateSubUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $body = WWW::SwaggerClient::Object::SubUser->new(); # SubUser | Sub user to update
my $traID = traID_example; # String | pass authenticating user transfer ID
my $t = t_example; # String | timestamp in YYYYMMDDHHmmss format (UTC)
my $d=SHA256<digest> = d=SHA256_example; # String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

eval { 
    $api_instance->updateSubUser(body => $body, traID => $traID, t => $t, d=SHA256<digest> => $d=SHA256<digest>);
};
if ($@) {
    warn "Exception when calling DefaultApi->updateSubUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
body = {
  "idSubUser" : 12,
  "password" : "newpass",
  "createPurchaseInvoice" : true,
  "createSellInvoice" : true,
  "adminSelector" : true,
  "payslip" : false
} # SubUser | Sub user to update
traID = traID_example # String | pass authenticating user transfer ID
t = t_example # String | timestamp in YYYYMMDDHHmmss format (UTC)
d=SHA256<digest> = d=SHA256_example # String | SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'

try: 
    # Update user. Only password field and access rights are updatable. Subuser ID required
    api_instance.update_sub_user(body, traID, t, d=SHA256<digest>)
except ApiException as e:
    print("Exception when calling DefaultApi->updateSubUser: %s\n" % e)

Parameters

Body parameters
Name Description
body *
Query parameters
Name Description
TraID*
String
pass authenticating user transfer ID
Required
t*
String
timestamp in YYYYMMDDHHmmss format (UTC)
Required
d=SHA-256:<digest>*
String
SHA256 digest string of parameters and secret (TraID+t+TransferKey) prepended with 'SHA-256:'
Required

Responses

Status: 200 - success

Status: 400 - bad request

Status: 403 - unauthorized