Spenda.Services.Authorisation

Default

authorisationApprove

Performs authorisation approval

If no authorisation code has been generated but one is required, the first call to this endpoint will generate a code and send it to the user as an alert. Subsequent calls require the code to be submitted in the request body. If the user fails to enter the code correctly after three attempts, a new code will be required.Once the Authorisation status reaches Approved, Rejected or Complete the user will no longer be able to submit an approval.


/Spenda/Authorisations/{authorisationID}/Approve

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Authorisations/{authorisationID}/Approve" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer authorisationID = 56; // Integer | Identifier of the authorisation to approve.
        SubmitApprovalCodeRequest submitApprovalCodeRequest = {"approvalCode":"string"}; // SubmitApprovalCodeRequest | 

        try {
            authorisationResponse result = apiInstance.authorisationApprove(authorisationID, submitApprovalCodeRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#authorisationApprove");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer authorisationID = new Integer(); // Integer | Identifier of the authorisation to approve.
final SubmitApprovalCodeRequest submitApprovalCodeRequest = new SubmitApprovalCodeRequest(); // SubmitApprovalCodeRequest | 

try {
    final result = await api_instance.authorisationApprove(authorisationID, submitApprovalCodeRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->authorisationApprove: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer authorisationID = 56; // Integer | Identifier of the authorisation to approve.
        SubmitApprovalCodeRequest submitApprovalCodeRequest = {"approvalCode":"string"}; // SubmitApprovalCodeRequest | 

        try {
            authorisationResponse result = apiInstance.authorisationApprove(authorisationID, submitApprovalCodeRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#authorisationApprove");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *authorisationID = 56; // Identifier of the authorisation to approve. (default to null)
SubmitApprovalCodeRequest *submitApprovalCodeRequest = {"approvalCode":"string"}; //  (optional)

// Performs authorisation approval
[apiInstance authorisationApproveWith:authorisationID
    submitApprovalCodeRequest:submitApprovalCodeRequest
              completionHandler: ^(authorisationResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAuthorisation = require('spenda_services_authorisation');

// Create an instance of the API class
var api = new SpendaServicesAuthorisation.DefaultApi()
var authorisationID = 56; // {Integer} Identifier of the authorisation to approve.
var opts = {
  'submitApprovalCodeRequest': {"approvalCode":"string"} // {SubmitApprovalCodeRequest} 
};

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

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

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var authorisationID = 56;  // Integer | Identifier of the authorisation to approve. (default to null)
            var submitApprovalCodeRequest = new SubmitApprovalCodeRequest(); // SubmitApprovalCodeRequest |  (optional) 

            try {
                // Performs authorisation approval
                authorisationResponse result = apiInstance.authorisationApprove(authorisationID, submitApprovalCodeRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.authorisationApprove: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$authorisationID = 56; // Integer | Identifier of the authorisation to approve.
$submitApprovalCodeRequest = {"approvalCode":"string"}; // SubmitApprovalCodeRequest | 

try {
    $result = $api_instance->authorisationApprove($authorisationID, $submitApprovalCodeRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->authorisationApprove: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $authorisationID = 56; # Integer | Identifier of the authorisation to approve.
my $submitApprovalCodeRequest = WWW::OPenAPIClient::Object::SubmitApprovalCodeRequest->new(); # SubmitApprovalCodeRequest | 

eval {
    my $result = $api_instance->authorisationApprove(authorisationID => $authorisationID, submitApprovalCodeRequest => $submitApprovalCodeRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->authorisationApprove: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
authorisationID = 56 # Integer | Identifier of the authorisation to approve. (default to null)
submitApprovalCodeRequest = {"approvalCode":"string"} # SubmitApprovalCodeRequest |  (optional)

try:
    # Performs authorisation approval
    api_response = api_instance.authorisation_approve(authorisationID, submitApprovalCodeRequest=submitApprovalCodeRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->authorisationApprove: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let authorisationID = 56; // Integer
    let submitApprovalCodeRequest = {"approvalCode":"string"}; // SubmitApprovalCodeRequest

    let mut context = DefaultApi::Context::default();
    let result = client.authorisationApprove(authorisationID, submitApprovalCodeRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
authorisationID*
Integer (int32)
Identifier of the authorisation to approve.
Required
Body parameters
Name Description
submitApprovalCodeRequest

Request containing the approval code, if known.

Responses


authorisationGet

Gets an Authorisation by ID

Returns the Authorisation with details such as status and number of approval code attempts remaining specific to the current user.


/Spenda/Authorisations/{authorisationID}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Authorisations/{authorisationID}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer authorisationID = 56; // Integer | Identifier of the authorisation to get.

        try {
            authorisationResponse result = apiInstance.authorisationGet(authorisationID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#authorisationGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer authorisationID = new Integer(); // Integer | Identifier of the authorisation to get.

try {
    final result = await api_instance.authorisationGet(authorisationID);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->authorisationGet: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer authorisationID = 56; // Integer | Identifier of the authorisation to get.

        try {
            authorisationResponse result = apiInstance.authorisationGet(authorisationID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#authorisationGet");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *authorisationID = 56; // Identifier of the authorisation to get. (default to null)

// Gets an Authorisation by ID
[apiInstance authorisationGetWith:authorisationID
              completionHandler: ^(authorisationResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAuthorisation = require('spenda_services_authorisation');

// Create an instance of the API class
var api = new SpendaServicesAuthorisation.DefaultApi()
var authorisationID = 56; // {Integer} Identifier of the authorisation to get.

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

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

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var authorisationID = 56;  // Integer | Identifier of the authorisation to get. (default to null)

            try {
                // Gets an Authorisation by ID
                authorisationResponse result = apiInstance.authorisationGet(authorisationID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.authorisationGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$authorisationID = 56; // Integer | Identifier of the authorisation to get.

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $authorisationID = 56; # Integer | Identifier of the authorisation to get.

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

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
authorisationID = 56 # Integer | Identifier of the authorisation to get. (default to null)

try:
    # Gets an Authorisation by ID
    api_response = api_instance.authorisation_get(authorisationID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->authorisationGet: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let authorisationID = 56; // Integer

    let mut context = DefaultApi::Context::default();
    let result = client.authorisationGet(authorisationID, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
authorisationID*
Integer (int32)
Identifier of the authorisation to get.
Required

Responses


authorisationNewCode

Generates a new authorisation code and sends it to the user as an alert

Any previous code is invalidated. Only three codes can be generated per user for each Authorisation. Once the Authorisation status reaches Approved, Rejected or Complete the user will no longer be able to request a new code.


/Spenda/Authorisations/{authorisationID}/NewCode

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Authorisations/{authorisationID}/NewCode"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer authorisationID = 56; // Integer | Identifier of the authorisation to reset.

        try {
            authorisationResponse result = apiInstance.authorisationNewCode(authorisationID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#authorisationNewCode");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer authorisationID = new Integer(); // Integer | Identifier of the authorisation to reset.

try {
    final result = await api_instance.authorisationNewCode(authorisationID);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->authorisationNewCode: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer authorisationID = 56; // Integer | Identifier of the authorisation to reset.

        try {
            authorisationResponse result = apiInstance.authorisationNewCode(authorisationID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#authorisationNewCode");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *authorisationID = 56; // Identifier of the authorisation to reset. (default to null)

// Generates a new authorisation code and sends it to the user as an alert
[apiInstance authorisationNewCodeWith:authorisationID
              completionHandler: ^(authorisationResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAuthorisation = require('spenda_services_authorisation');

// Create an instance of the API class
var api = new SpendaServicesAuthorisation.DefaultApi()
var authorisationID = 56; // {Integer} Identifier of the authorisation to reset.

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

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

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var authorisationID = 56;  // Integer | Identifier of the authorisation to reset. (default to null)

            try {
                // Generates a new authorisation code and sends it to the user as an alert
                authorisationResponse result = apiInstance.authorisationNewCode(authorisationID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.authorisationNewCode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$authorisationID = 56; // Integer | Identifier of the authorisation to reset.

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $authorisationID = 56; # Integer | Identifier of the authorisation to reset.

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

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
authorisationID = 56 # Integer | Identifier of the authorisation to reset. (default to null)

try:
    # Generates a new authorisation code and sends it to the user as an alert
    api_response = api_instance.authorisation_new_code(authorisationID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->authorisationNewCode: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let authorisationID = 56; // Integer

    let mut context = DefaultApi::Context::default();
    let result = client.authorisationNewCode(authorisationID, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
authorisationID*
Integer (int32)
Identifier of the authorisation to reset.
Required

Responses


authorisationReject

Rejects an authorisation

Once the Authorisation status reaches Approved, Rejected or Complete the user will no longer be able to submit a rejection.


/Spenda/Authorisations/{authorisationID}/Reject

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Authorisations/{authorisationID}/Reject" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer authorisationID = 56; // Integer | Identifier of the authorisation to reject.
        RejectAuthorisationRequest rejectAuthorisationRequest = {"rejectionReason":"string"}; // RejectAuthorisationRequest | 

        try {
            authorisationResponse result = apiInstance.authorisationReject(authorisationID, rejectAuthorisationRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#authorisationReject");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer authorisationID = new Integer(); // Integer | Identifier of the authorisation to reject.
final RejectAuthorisationRequest rejectAuthorisationRequest = new RejectAuthorisationRequest(); // RejectAuthorisationRequest | 

try {
    final result = await api_instance.authorisationReject(authorisationID, rejectAuthorisationRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->authorisationReject: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer authorisationID = 56; // Integer | Identifier of the authorisation to reject.
        RejectAuthorisationRequest rejectAuthorisationRequest = {"rejectionReason":"string"}; // RejectAuthorisationRequest | 

        try {
            authorisationResponse result = apiInstance.authorisationReject(authorisationID, rejectAuthorisationRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#authorisationReject");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *authorisationID = 56; // Identifier of the authorisation to reject. (default to null)
RejectAuthorisationRequest *rejectAuthorisationRequest = {"rejectionReason":"string"}; //  (optional)

// Rejects an authorisation
[apiInstance authorisationRejectWith:authorisationID
    rejectAuthorisationRequest:rejectAuthorisationRequest
              completionHandler: ^(authorisationResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAuthorisation = require('spenda_services_authorisation');

// Create an instance of the API class
var api = new SpendaServicesAuthorisation.DefaultApi()
var authorisationID = 56; // {Integer} Identifier of the authorisation to reject.
var opts = {
  'rejectAuthorisationRequest': {"rejectionReason":"string"} // {RejectAuthorisationRequest} 
};

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

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

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var authorisationID = 56;  // Integer | Identifier of the authorisation to reject. (default to null)
            var rejectAuthorisationRequest = new RejectAuthorisationRequest(); // RejectAuthorisationRequest |  (optional) 

            try {
                // Rejects an authorisation
                authorisationResponse result = apiInstance.authorisationReject(authorisationID, rejectAuthorisationRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.authorisationReject: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$authorisationID = 56; // Integer | Identifier of the authorisation to reject.
$rejectAuthorisationRequest = {"rejectionReason":"string"}; // RejectAuthorisationRequest | 

try {
    $result = $api_instance->authorisationReject($authorisationID, $rejectAuthorisationRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->authorisationReject: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $authorisationID = 56; # Integer | Identifier of the authorisation to reject.
my $rejectAuthorisationRequest = WWW::OPenAPIClient::Object::RejectAuthorisationRequest->new(); # RejectAuthorisationRequest | 

eval {
    my $result = $api_instance->authorisationReject(authorisationID => $authorisationID, rejectAuthorisationRequest => $rejectAuthorisationRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->authorisationReject: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
authorisationID = 56 # Integer | Identifier of the authorisation to reject. (default to null)
rejectAuthorisationRequest = {"rejectionReason":"string"} # RejectAuthorisationRequest |  (optional)

try:
    # Rejects an authorisation
    api_response = api_instance.authorisation_reject(authorisationID, rejectAuthorisationRequest=rejectAuthorisationRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->authorisationReject: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let authorisationID = 56; // Integer
    let rejectAuthorisationRequest = {"rejectionReason":"string"}; // RejectAuthorisationRequest

    let mut context = DefaultApi::Context::default();
    let result = client.authorisationReject(authorisationID, rejectAuthorisationRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
authorisationID*
Integer (int32)
Identifier of the authorisation to reject.
Required
Body parameters
Name Description
rejectAuthorisationRequest

Request containing the rejection reason.

Responses


authorisationReminder

Generates an authorisation reminder and sends it to the user as an alert

Generates an authorisation reminder and sends it to the user as an alert.


/Spenda/Authorisations/{authorisationID}/Reminder

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Authorisations/{authorisationID}/Reminder"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer authorisationID = 56; // Integer | Identifier of the authorisation for the reminder.

        try {
            authorisationResponse result = apiInstance.authorisationReminder(authorisationID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#authorisationReminder");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer authorisationID = new Integer(); // Integer | Identifier of the authorisation for the reminder.

try {
    final result = await api_instance.authorisationReminder(authorisationID);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->authorisationReminder: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer authorisationID = 56; // Integer | Identifier of the authorisation for the reminder.

        try {
            authorisationResponse result = apiInstance.authorisationReminder(authorisationID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#authorisationReminder");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *authorisationID = 56; // Identifier of the authorisation for the reminder. (default to null)

// Generates an authorisation reminder and sends it to the user as an alert
[apiInstance authorisationReminderWith:authorisationID
              completionHandler: ^(authorisationResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAuthorisation = require('spenda_services_authorisation');

// Create an instance of the API class
var api = new SpendaServicesAuthorisation.DefaultApi()
var authorisationID = 56; // {Integer} Identifier of the authorisation for the reminder.

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

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

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var authorisationID = 56;  // Integer | Identifier of the authorisation for the reminder. (default to null)

            try {
                // Generates an authorisation reminder and sends it to the user as an alert
                authorisationResponse result = apiInstance.authorisationReminder(authorisationID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.authorisationReminder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$authorisationID = 56; // Integer | Identifier of the authorisation for the reminder.

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $authorisationID = 56; # Integer | Identifier of the authorisation for the reminder.

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

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
authorisationID = 56 # Integer | Identifier of the authorisation for the reminder. (default to null)

try:
    # Generates an authorisation reminder and sends it to the user as an alert
    api_response = api_instance.authorisation_reminder(authorisationID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->authorisationReminder: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let authorisationID = 56; // Integer

    let mut context = DefaultApi::Context::default();
    let result = client.authorisationReminder(authorisationID, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
authorisationID*
Integer (int32)
Identifier of the authorisation for the reminder.
Required

Responses


authorisationReset

Changes the status of an approved Authorisation back to InProgress and invalidates any existing authorisation code

Once the Authorisation status reaches Rejected or Complete the user will no longer be able to reset the status.


/Spenda/Authorisations/{authorisationID}/Reset

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Authorisations/{authorisationID}/Reset"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer authorisationID = 56; // Integer | Identifier of the authorisation to reset.

        try {
            authorisationResponse result = apiInstance.authorisationReset(authorisationID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#authorisationReset");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer authorisationID = new Integer(); // Integer | Identifier of the authorisation to reset.

try {
    final result = await api_instance.authorisationReset(authorisationID);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->authorisationReset: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer authorisationID = 56; // Integer | Identifier of the authorisation to reset.

        try {
            authorisationResponse result = apiInstance.authorisationReset(authorisationID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#authorisationReset");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *authorisationID = 56; // Identifier of the authorisation to reset. (default to null)

// Changes the status of an approved Authorisation back to InProgress and invalidates any existing authorisation code
[apiInstance authorisationResetWith:authorisationID
              completionHandler: ^(authorisationResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAuthorisation = require('spenda_services_authorisation');

// Create an instance of the API class
var api = new SpendaServicesAuthorisation.DefaultApi()
var authorisationID = 56; // {Integer} Identifier of the authorisation to reset.

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

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

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var authorisationID = 56;  // Integer | Identifier of the authorisation to reset. (default to null)

            try {
                // Changes the status of an approved Authorisation back to InProgress and invalidates any existing authorisation code
                authorisationResponse result = apiInstance.authorisationReset(authorisationID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.authorisationReset: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$authorisationID = 56; // Integer | Identifier of the authorisation to reset.

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $authorisationID = 56; # Integer | Identifier of the authorisation to reset.

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

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
authorisationID = 56 # Integer | Identifier of the authorisation to reset. (default to null)

try:
    # Changes the status of an approved Authorisation back to InProgress and invalidates any existing authorisation code
    api_response = api_instance.authorisation_reset(authorisationID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->authorisationReset: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let authorisationID = 56; // Integer

    let mut context = DefaultApi::Context::default();
    let result = client.authorisationReset(authorisationID, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
authorisationID*
Integer (int32)
Identifier of the authorisation to reset.
Required

Responses