Spenda.Services.Alerts

Documents

getDocument

Get document

Allows a user to get document link


/Spenda/Alerts/GetDocument

Usage and SDK Samples

curl -X PUT \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Alerts/GetDocument" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DocumentsApi;

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

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

        // Create an instance of the API class
        DocumentsApi apiInstance = new DocumentsApi();
        GetDocumentRequest getDocumentRequest = {"docIDs":[0],"datTypeID":22,"alertType":"string","websiteID":1,"accountCustomerID":0,"linkedSupplierID":0}; // GetDocumentRequest | 

        try {
            getDocumentResponse result = apiInstance.getDocument(getDocumentRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DocumentsApi#getDocument");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final GetDocumentRequest getDocumentRequest = new GetDocumentRequest(); // GetDocumentRequest | 

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

import org.openapitools.client.api.DocumentsApi;

public class DocumentsApiExample {
    public static void main(String[] args) {
        DocumentsApi apiInstance = new DocumentsApi();
        GetDocumentRequest getDocumentRequest = {"docIDs":[0],"datTypeID":22,"alertType":"string","websiteID":1,"accountCustomerID":0,"linkedSupplierID":0}; // GetDocumentRequest | 

        try {
            getDocumentResponse result = apiInstance.getDocument(getDocumentRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DocumentsApi#getDocument");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DocumentsApi *apiInstance = [[DocumentsApi alloc] init];
GetDocumentRequest *getDocumentRequest = {"docIDs":[0],"datTypeID":22,"alertType":"string","websiteID":1,"accountCustomerID":0,"linkedSupplierID":0}; //  (optional)

// Get document
[apiInstance getDocumentWith:getDocumentRequest
              completionHandler: ^(getDocumentResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAlerts = require('spenda_services_alerts');

// Create an instance of the API class
var api = new SpendaServicesAlerts.DocumentsApi()
var opts = {
  'getDocumentRequest': {"docIDs":[0],"datTypeID":22,"alertType":"string","websiteID":1,"accountCustomerID":0,"linkedSupplierID":0} // {GetDocumentRequest} 
};

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

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

            // Create an instance of the API class
            var apiInstance = new DocumentsApi();
            var getDocumentRequest = new GetDocumentRequest(); // GetDocumentRequest |  (optional) 

            try {
                // Get document
                getDocumentResponse result = apiInstance.getDocument(getDocumentRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DocumentsApi.getDocument: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DocumentsApi();
$getDocumentRequest = {"docIDs":[0],"datTypeID":22,"alertType":"string","websiteID":1,"accountCustomerID":0,"linkedSupplierID":0}; // GetDocumentRequest | 

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DocumentsApi->new();
my $getDocumentRequest = WWW::OPenAPIClient::Object::GetDocumentRequest->new(); # GetDocumentRequest | 

eval {
    my $result = $api_instance->getDocument(getDocumentRequest => $getDocumentRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DocumentsApi->getDocument: $@\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.DocumentsApi()
getDocumentRequest = {"docIDs":[0],"datTypeID":22,"alertType":"string","websiteID":1,"accountCustomerID":0,"linkedSupplierID":0} # GetDocumentRequest |  (optional)

try:
    # Get document
    api_response = api_instance.get_document(getDocumentRequest=getDocumentRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DocumentsApi->getDocument: %s\n" % e)
extern crate DocumentsApi;

pub fn main() {
    let getDocumentRequest = {"docIDs":[0],"datTypeID":22,"alertType":"string","websiteID":1,"accountCustomerID":0,"linkedSupplierID":0}; // GetDocumentRequest

    let mut context = DocumentsApi::Context::default();
    let result = client.getDocument(getDocumentRequest, &context).wait();

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

Scopes

Parameters

Body parameters
Name Description
getDocumentRequest

Request body containing the details of document.

Responses


Notifications

notificationsAcknowledge

Acknowledges Notifications

Marks notifications as acknowledged. The notifications to acknowledge are passed as part of the request body. If empty array is passed, all unacknowledged notifications except those with the IsAcknowledgementRequired flag will be marked as acknowledged. An updated list of notifications will be returned.


/Spenda/Alerts/Notifications

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Alerts/Notifications" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.NotificationsApi;

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

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

        // Create an instance of the API class
        NotificationsApi apiInstance = new NotificationsApi();
        AcknowledgeNotificationsRequest acknowledgeNotificationsRequest = {"notificationIDs":[0],"contentFormat":"Html"}; // AcknowledgeNotificationsRequest | 

        try {
            getNotificationsResponse result = apiInstance.notificationsAcknowledge(acknowledgeNotificationsRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NotificationsApi#notificationsAcknowledge");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final AcknowledgeNotificationsRequest acknowledgeNotificationsRequest = new AcknowledgeNotificationsRequest(); // AcknowledgeNotificationsRequest | 

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

import org.openapitools.client.api.NotificationsApi;

public class NotificationsApiExample {
    public static void main(String[] args) {
        NotificationsApi apiInstance = new NotificationsApi();
        AcknowledgeNotificationsRequest acknowledgeNotificationsRequest = {"notificationIDs":[0],"contentFormat":"Html"}; // AcknowledgeNotificationsRequest | 

        try {
            getNotificationsResponse result = apiInstance.notificationsAcknowledge(acknowledgeNotificationsRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NotificationsApi#notificationsAcknowledge");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
NotificationsApi *apiInstance = [[NotificationsApi alloc] init];
AcknowledgeNotificationsRequest *acknowledgeNotificationsRequest = {"notificationIDs":[0],"contentFormat":"Html"}; //  (optional)

// Acknowledges Notifications
[apiInstance notificationsAcknowledgeWith:acknowledgeNotificationsRequest
              completionHandler: ^(getNotificationsResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAlerts = require('spenda_services_alerts');

// Create an instance of the API class
var api = new SpendaServicesAlerts.NotificationsApi()
var opts = {
  'acknowledgeNotificationsRequest': {"notificationIDs":[0],"contentFormat":"Html"} // {AcknowledgeNotificationsRequest} 
};

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

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

            // Create an instance of the API class
            var apiInstance = new NotificationsApi();
            var acknowledgeNotificationsRequest = new AcknowledgeNotificationsRequest(); // AcknowledgeNotificationsRequest |  (optional) 

            try {
                // Acknowledges Notifications
                getNotificationsResponse result = apiInstance.notificationsAcknowledge(acknowledgeNotificationsRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling NotificationsApi.notificationsAcknowledge: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\NotificationsApi();
$acknowledgeNotificationsRequest = {"notificationIDs":[0],"contentFormat":"Html"}; // AcknowledgeNotificationsRequest | 

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::NotificationsApi->new();
my $acknowledgeNotificationsRequest = WWW::OPenAPIClient::Object::AcknowledgeNotificationsRequest->new(); # AcknowledgeNotificationsRequest | 

eval {
    my $result = $api_instance->notificationsAcknowledge(acknowledgeNotificationsRequest => $acknowledgeNotificationsRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NotificationsApi->notificationsAcknowledge: $@\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.NotificationsApi()
acknowledgeNotificationsRequest = {"notificationIDs":[0],"contentFormat":"Html"} # AcknowledgeNotificationsRequest |  (optional)

try:
    # Acknowledges Notifications
    api_response = api_instance.notifications_acknowledge(acknowledgeNotificationsRequest=acknowledgeNotificationsRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NotificationsApi->notificationsAcknowledge: %s\n" % e)
extern crate NotificationsApi;

pub fn main() {
    let acknowledgeNotificationsRequest = {"notificationIDs":[0],"contentFormat":"Html"}; // AcknowledgeNotificationsRequest

    let mut context = NotificationsApi::Context::default();
    let result = client.notificationsAcknowledge(acknowledgeNotificationsRequest, &context).wait();

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

Scopes

Parameters

Body parameters
Name Description
acknowledgeNotificationsRequest

Responses


notificationsGet

Gets a collection of recent notifications

Returns a collection of recent Notifications. Unacknowledged notifications with the IsAcknowledgementRequired flag set to true will be at the top of the list, followed by the most recent records ordered by creation date descending.


/Spenda/Alerts/Notifications

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Alerts/Notifications?contentFormat=contentFormat_example&startDateUtc=startDateUtc_example&endDateUtc=endDateUtc_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.NotificationsApi;

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

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

        // Create an instance of the API class
        NotificationsApi apiInstance = new NotificationsApi();
        String contentFormat = contentFormat_example; // String | Indicates the desired content format to return. The default is HTML.
        String startDateUtc = startDateUtc_example; // String | Start Date in UTC for the filter of the data returned. Default => UTC now - 2 months, eg: 2023-01-01T12:00:44.141
        String endDateUtc = endDateUtc_example; // String | End Date in UTC for the filter of the data returned. Default is UTC now, eg: 2023-03-01T12:00:44.141

        try {
            getNotificationsResponse result = apiInstance.notificationsGet(contentFormat, startDateUtc, endDateUtc);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NotificationsApi#notificationsGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String contentFormat = new String(); // String | Indicates the desired content format to return. The default is HTML.
final String startDateUtc = new String(); // String | Start Date in UTC for the filter of the data returned. Default => UTC now - 2 months, eg: 2023-01-01T12:00:44.141
final String endDateUtc = new String(); // String | End Date in UTC for the filter of the data returned. Default is UTC now, eg: 2023-03-01T12:00:44.141

try {
    final result = await api_instance.notificationsGet(contentFormat, startDateUtc, endDateUtc);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->notificationsGet: $e\n');
}

import org.openapitools.client.api.NotificationsApi;

public class NotificationsApiExample {
    public static void main(String[] args) {
        NotificationsApi apiInstance = new NotificationsApi();
        String contentFormat = contentFormat_example; // String | Indicates the desired content format to return. The default is HTML.
        String startDateUtc = startDateUtc_example; // String | Start Date in UTC for the filter of the data returned. Default => UTC now - 2 months, eg: 2023-01-01T12:00:44.141
        String endDateUtc = endDateUtc_example; // String | End Date in UTC for the filter of the data returned. Default is UTC now, eg: 2023-03-01T12:00:44.141

        try {
            getNotificationsResponse result = apiInstance.notificationsGet(contentFormat, startDateUtc, endDateUtc);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NotificationsApi#notificationsGet");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
NotificationsApi *apiInstance = [[NotificationsApi alloc] init];
String *contentFormat = contentFormat_example; // Indicates the desired content format to return. The default is HTML. (optional) (default to html)
String *startDateUtc = startDateUtc_example; // Start Date in UTC for the filter of the data returned. Default => UTC now - 2 months, eg: 2023-01-01T12:00:44.141 (optional) (default to null)
String *endDateUtc = endDateUtc_example; // End Date in UTC for the filter of the data returned. Default is UTC now, eg: 2023-03-01T12:00:44.141 (optional) (default to null)

// Gets a collection of recent notifications
[apiInstance notificationsGetWith:contentFormat
    startDateUtc:startDateUtc
    endDateUtc:endDateUtc
              completionHandler: ^(getNotificationsResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAlerts = require('spenda_services_alerts');

// Create an instance of the API class
var api = new SpendaServicesAlerts.NotificationsApi()
var opts = {
  'contentFormat': contentFormat_example, // {String} Indicates the desired content format to return. The default is HTML.
  'startDateUtc': startDateUtc_example, // {String} Start Date in UTC for the filter of the data returned. Default => UTC now - 2 months, eg: 2023-01-01T12:00:44.141
  'endDateUtc': endDateUtc_example // {String} End Date in UTC for the filter of the data returned. Default is UTC now, eg: 2023-03-01T12:00:44.141
};

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

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

            // Create an instance of the API class
            var apiInstance = new NotificationsApi();
            var contentFormat = contentFormat_example;  // String | Indicates the desired content format to return. The default is HTML. (optional)  (default to html)
            var startDateUtc = startDateUtc_example;  // String | Start Date in UTC for the filter of the data returned. Default => UTC now - 2 months, eg: 2023-01-01T12:00:44.141 (optional)  (default to null)
            var endDateUtc = endDateUtc_example;  // String | End Date in UTC for the filter of the data returned. Default is UTC now, eg: 2023-03-01T12:00:44.141 (optional)  (default to null)

            try {
                // Gets a collection of recent notifications
                getNotificationsResponse result = apiInstance.notificationsGet(contentFormat, startDateUtc, endDateUtc);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling NotificationsApi.notificationsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\NotificationsApi();
$contentFormat = contentFormat_example; // String | Indicates the desired content format to return. The default is HTML.
$startDateUtc = startDateUtc_example; // String | Start Date in UTC for the filter of the data returned. Default => UTC now - 2 months, eg: 2023-01-01T12:00:44.141
$endDateUtc = endDateUtc_example; // String | End Date in UTC for the filter of the data returned. Default is UTC now, eg: 2023-03-01T12:00:44.141

try {
    $result = $api_instance->notificationsGet($contentFormat, $startDateUtc, $endDateUtc);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NotificationsApi->notificationsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::NotificationsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::NotificationsApi->new();
my $contentFormat = contentFormat_example; # String | Indicates the desired content format to return. The default is HTML.
my $startDateUtc = startDateUtc_example; # String | Start Date in UTC for the filter of the data returned. Default => UTC now - 2 months, eg: 2023-01-01T12:00:44.141
my $endDateUtc = endDateUtc_example; # String | End Date in UTC for the filter of the data returned. Default is UTC now, eg: 2023-03-01T12:00:44.141

eval {
    my $result = $api_instance->notificationsGet(contentFormat => $contentFormat, startDateUtc => $startDateUtc, endDateUtc => $endDateUtc);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NotificationsApi->notificationsGet: $@\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.NotificationsApi()
contentFormat = contentFormat_example # String | Indicates the desired content format to return. The default is HTML. (optional) (default to html)
startDateUtc = startDateUtc_example # String | Start Date in UTC for the filter of the data returned. Default => UTC now - 2 months, eg: 2023-01-01T12:00:44.141 (optional) (default to null)
endDateUtc = endDateUtc_example # String | End Date in UTC for the filter of the data returned. Default is UTC now, eg: 2023-03-01T12:00:44.141 (optional) (default to null)

try:
    # Gets a collection of recent notifications
    api_response = api_instance.notifications_get(contentFormat=contentFormat, startDateUtc=startDateUtc, endDateUtc=endDateUtc)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NotificationsApi->notificationsGet: %s\n" % e)
extern crate NotificationsApi;

pub fn main() {
    let contentFormat = contentFormat_example; // String
    let startDateUtc = startDateUtc_example; // String
    let endDateUtc = endDateUtc_example; // String

    let mut context = NotificationsApi::Context::default();
    let result = client.notificationsGet(contentFormat, startDateUtc, endDateUtc, &context).wait();

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

Scopes

Parameters

Query parameters
Name Description
contentFormat
String
Indicates the desired content format to return. The default is HTML.
startDateUtc
String
Start Date in UTC for the filter of the data returned. Default => UTC now - 2 months, eg: 2023-01-01T12:00:44.141
endDateUtc
String
End Date in UTC for the filter of the data returned. Default is UTC now, eg: 2023-03-01T12:00:44.141

Responses


notificationsSignalRNegotiate

Negotiates a SignalR connection

Negotiates a SignalR connection, returning a token the client can use to connect to the SignalR service.


/Spenda/Alerts/Notifications/negotiate

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Alerts/Notifications/negotiate"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.NotificationsApi;

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

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

        // Create an instance of the API class
        NotificationsApi apiInstance = new NotificationsApi();

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

final api_instance = DefaultApi();


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

import org.openapitools.client.api.NotificationsApi;

public class NotificationsApiExample {
    public static void main(String[] args) {
        NotificationsApi apiInstance = new NotificationsApi();

        try {
            signalRConnectionInfo result = apiInstance.notificationsSignalRNegotiate();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NotificationsApi#notificationsSignalRNegotiate");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
NotificationsApi *apiInstance = [[NotificationsApi alloc] init];

// Negotiates a SignalR connection
[apiInstance notificationsSignalRNegotiateWithCompletionHandler: 
              ^(signalRConnectionInfo output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAlerts = require('spenda_services_alerts');

// Create an instance of the API class
var api = new SpendaServicesAlerts.NotificationsApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.notificationsSignalRNegotiate(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

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

            // Create an instance of the API class
            var apiInstance = new NotificationsApi();

            try {
                // Negotiates a SignalR connection
                signalRConnectionInfo result = apiInstance.notificationsSignalRNegotiate();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling NotificationsApi.notificationsSignalRNegotiate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\NotificationsApi();

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::NotificationsApi->new();

eval {
    my $result = $api_instance->notificationsSignalRNegotiate();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NotificationsApi->notificationsSignalRNegotiate: $@\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.NotificationsApi()

try:
    # Negotiates a SignalR connection
    api_response = api_instance.notifications_signal_r_negotiate()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NotificationsApi->notificationsSignalRNegotiate: %s\n" % e)
extern crate NotificationsApi;

pub fn main() {

    let mut context = NotificationsApi::Context::default();
    let result = client.notificationsSignalRNegotiate(&context).wait();

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

Scopes

Parameters

Responses


PushNotificationsDeregister

notificationsDeregister

De-register a device from push notifications.

De-register a device from push notifications.


/Spenda/Alerts/Notifications/deregister

Usage and SDK Samples

curl -X PUT \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Alerts/Notifications/deregister" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PushNotificationsDeregisterApi;

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

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

        // Create an instance of the API class
        PushNotificationsDeregisterApi apiInstance = new PushNotificationsDeregisterApi();
        PushNotificationsRequest pushNotificationsRequest = {"deviceToken":"44E22F511191DC153D9FD5E7D767203FCC799EF70C75A52A64FEE67442E70C91","platform":"Apple","appType":"SpendaWallet"}; // PushNotificationsRequest | 

        try {
            pushNotificationsBaseResponse result = apiInstance.notificationsDeregister(pushNotificationsRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PushNotificationsDeregisterApi#notificationsDeregister");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final PushNotificationsRequest pushNotificationsRequest = new PushNotificationsRequest(); // PushNotificationsRequest | 

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

import org.openapitools.client.api.PushNotificationsDeregisterApi;

public class PushNotificationsDeregisterApiExample {
    public static void main(String[] args) {
        PushNotificationsDeregisterApi apiInstance = new PushNotificationsDeregisterApi();
        PushNotificationsRequest pushNotificationsRequest = {"deviceToken":"44E22F511191DC153D9FD5E7D767203FCC799EF70C75A52A64FEE67442E70C91","platform":"Apple","appType":"SpendaWallet"}; // PushNotificationsRequest | 

        try {
            pushNotificationsBaseResponse result = apiInstance.notificationsDeregister(pushNotificationsRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PushNotificationsDeregisterApi#notificationsDeregister");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
PushNotificationsDeregisterApi *apiInstance = [[PushNotificationsDeregisterApi alloc] init];
PushNotificationsRequest *pushNotificationsRequest = {"deviceToken":"44E22F511191DC153D9FD5E7D767203FCC799EF70C75A52A64FEE67442E70C91","platform":"Apple","appType":"SpendaWallet"}; //  (optional)

// De-register a device from push notifications.
[apiInstance notificationsDeregisterWith:pushNotificationsRequest
              completionHandler: ^(pushNotificationsBaseResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAlerts = require('spenda_services_alerts');

// Create an instance of the API class
var api = new SpendaServicesAlerts.PushNotificationsDeregisterApi()
var opts = {
  'pushNotificationsRequest': {"deviceToken":"44E22F511191DC153D9FD5E7D767203FCC799EF70C75A52A64FEE67442E70C91","platform":"Apple","appType":"SpendaWallet"} // {PushNotificationsRequest} 
};

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

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

            // Create an instance of the API class
            var apiInstance = new PushNotificationsDeregisterApi();
            var pushNotificationsRequest = new PushNotificationsRequest(); // PushNotificationsRequest |  (optional) 

            try {
                // De-register a device from push notifications.
                pushNotificationsBaseResponse result = apiInstance.notificationsDeregister(pushNotificationsRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PushNotificationsDeregisterApi.notificationsDeregister: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PushNotificationsDeregisterApi();
$pushNotificationsRequest = {"deviceToken":"44E22F511191DC153D9FD5E7D767203FCC799EF70C75A52A64FEE67442E70C91","platform":"Apple","appType":"SpendaWallet"}; // PushNotificationsRequest | 

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PushNotificationsDeregisterApi->new();
my $pushNotificationsRequest = WWW::OPenAPIClient::Object::PushNotificationsRequest->new(); # PushNotificationsRequest | 

eval {
    my $result = $api_instance->notificationsDeregister(pushNotificationsRequest => $pushNotificationsRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PushNotificationsDeregisterApi->notificationsDeregister: $@\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.PushNotificationsDeregisterApi()
pushNotificationsRequest = {"deviceToken":"44E22F511191DC153D9FD5E7D767203FCC799EF70C75A52A64FEE67442E70C91","platform":"Apple","appType":"SpendaWallet"} # PushNotificationsRequest |  (optional)

try:
    # De-register a device from push notifications.
    api_response = api_instance.notifications_deregister(pushNotificationsRequest=pushNotificationsRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PushNotificationsDeregisterApi->notificationsDeregister: %s\n" % e)
extern crate PushNotificationsDeregisterApi;

pub fn main() {
    let pushNotificationsRequest = {"deviceToken":"44E22F511191DC153D9FD5E7D767203FCC799EF70C75A52A64FEE67442E70C91","platform":"Apple","appType":"SpendaWallet"}; // PushNotificationsRequest

    let mut context = PushNotificationsDeregisterApi::Context::default();
    let result = client.notificationsDeregister(pushNotificationsRequest, &context).wait();

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

Scopes

Parameters

Body parameters
Name Description
pushNotificationsRequest

Responses


PushNotificationsRegister

notificationsRegister

Register an Apple or Goolge (Andriod) device to receive push notifications.

Register an Apple or Goolge (Andriod) device to receive push notifications.


/Spenda/Alerts/Notifications/register

Usage and SDK Samples

curl -X PUT \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Alerts/Notifications/register" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PushNotificationsRegisterApi;

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

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

        // Create an instance of the API class
        PushNotificationsRegisterApi apiInstance = new PushNotificationsRegisterApi();
        PushNotificationsRequest pushNotificationsRequest = {"deviceToken":"44E22F511191DC153D9FD5E7D767203FCC799EF70C75A52A64FEE67442E70C91","platform":"Apple","appType":"SpendaWallet"}; // PushNotificationsRequest | 

        try {
            pushNotificationsRegisterResponse result = apiInstance.notificationsRegister(pushNotificationsRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PushNotificationsRegisterApi#notificationsRegister");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final PushNotificationsRequest pushNotificationsRequest = new PushNotificationsRequest(); // PushNotificationsRequest | 

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

import org.openapitools.client.api.PushNotificationsRegisterApi;

public class PushNotificationsRegisterApiExample {
    public static void main(String[] args) {
        PushNotificationsRegisterApi apiInstance = new PushNotificationsRegisterApi();
        PushNotificationsRequest pushNotificationsRequest = {"deviceToken":"44E22F511191DC153D9FD5E7D767203FCC799EF70C75A52A64FEE67442E70C91","platform":"Apple","appType":"SpendaWallet"}; // PushNotificationsRequest | 

        try {
            pushNotificationsRegisterResponse result = apiInstance.notificationsRegister(pushNotificationsRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PushNotificationsRegisterApi#notificationsRegister");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
PushNotificationsRegisterApi *apiInstance = [[PushNotificationsRegisterApi alloc] init];
PushNotificationsRequest *pushNotificationsRequest = {"deviceToken":"44E22F511191DC153D9FD5E7D767203FCC799EF70C75A52A64FEE67442E70C91","platform":"Apple","appType":"SpendaWallet"}; //  (optional)

// Register an Apple or Goolge (Andriod) device to receive push notifications.
[apiInstance notificationsRegisterWith:pushNotificationsRequest
              completionHandler: ^(pushNotificationsRegisterResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAlerts = require('spenda_services_alerts');

// Create an instance of the API class
var api = new SpendaServicesAlerts.PushNotificationsRegisterApi()
var opts = {
  'pushNotificationsRequest': {"deviceToken":"44E22F511191DC153D9FD5E7D767203FCC799EF70C75A52A64FEE67442E70C91","platform":"Apple","appType":"SpendaWallet"} // {PushNotificationsRequest} 
};

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

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

            // Create an instance of the API class
            var apiInstance = new PushNotificationsRegisterApi();
            var pushNotificationsRequest = new PushNotificationsRequest(); // PushNotificationsRequest |  (optional) 

            try {
                // Register an Apple or Goolge (Andriod) device to receive push notifications.
                pushNotificationsRegisterResponse result = apiInstance.notificationsRegister(pushNotificationsRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PushNotificationsRegisterApi.notificationsRegister: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PushNotificationsRegisterApi();
$pushNotificationsRequest = {"deviceToken":"44E22F511191DC153D9FD5E7D767203FCC799EF70C75A52A64FEE67442E70C91","platform":"Apple","appType":"SpendaWallet"}; // PushNotificationsRequest | 

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PushNotificationsRegisterApi->new();
my $pushNotificationsRequest = WWW::OPenAPIClient::Object::PushNotificationsRequest->new(); # PushNotificationsRequest | 

eval {
    my $result = $api_instance->notificationsRegister(pushNotificationsRequest => $pushNotificationsRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PushNotificationsRegisterApi->notificationsRegister: $@\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.PushNotificationsRegisterApi()
pushNotificationsRequest = {"deviceToken":"44E22F511191DC153D9FD5E7D767203FCC799EF70C75A52A64FEE67442E70C91","platform":"Apple","appType":"SpendaWallet"} # PushNotificationsRequest |  (optional)

try:
    # Register an Apple or Goolge (Andriod) device to receive push notifications.
    api_response = api_instance.notifications_register(pushNotificationsRequest=pushNotificationsRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PushNotificationsRegisterApi->notificationsRegister: %s\n" % e)
extern crate PushNotificationsRegisterApi;

pub fn main() {
    let pushNotificationsRequest = {"deviceToken":"44E22F511191DC153D9FD5E7D767203FCC799EF70C75A52A64FEE67442E70C91","platform":"Apple","appType":"SpendaWallet"}; // PushNotificationsRequest

    let mut context = PushNotificationsRegisterApi::Context::default();
    let result = client.notificationsRegister(pushNotificationsRequest, &context).wait();

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

Scopes

Parameters

Body parameters
Name Description
pushNotificationsRequest

Responses


Templates

createOrUpdateAlert

Create Or Update Templates

Allows a user to create a new alert template or update an existing one


/Spenda/Alerts/Alerts

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Alerts/Alerts" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TemplatesApi;

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

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

        // Create an instance of the API class
        TemplatesApi apiInstance = new TemplatesApi();
        CreateOrUpdateAlertTemplateRequest createOrUpdateAlertTemplateRequest = {"alertID":0,"alertType":"Unknown","datTypeID":0,"name":"string","description":"string","subject":"string","template":"string","templateDataType":"string","attachmentTemplate":"string","attachmentTemplateDataType":"string","colourCode":"string","attachmentFooterTemplate":"string","attachmentFooterTemplateDataType":"string"}; // CreateOrUpdateAlertTemplateRequest | 

        try {
            alertTemplateSummary result = apiInstance.createOrUpdateAlert(createOrUpdateAlertTemplateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#createOrUpdateAlert");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final CreateOrUpdateAlertTemplateRequest createOrUpdateAlertTemplateRequest = new CreateOrUpdateAlertTemplateRequest(); // CreateOrUpdateAlertTemplateRequest | 

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

import org.openapitools.client.api.TemplatesApi;

public class TemplatesApiExample {
    public static void main(String[] args) {
        TemplatesApi apiInstance = new TemplatesApi();
        CreateOrUpdateAlertTemplateRequest createOrUpdateAlertTemplateRequest = {"alertID":0,"alertType":"Unknown","datTypeID":0,"name":"string","description":"string","subject":"string","template":"string","templateDataType":"string","attachmentTemplate":"string","attachmentTemplateDataType":"string","colourCode":"string","attachmentFooterTemplate":"string","attachmentFooterTemplateDataType":"string"}; // CreateOrUpdateAlertTemplateRequest | 

        try {
            alertTemplateSummary result = apiInstance.createOrUpdateAlert(createOrUpdateAlertTemplateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#createOrUpdateAlert");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
TemplatesApi *apiInstance = [[TemplatesApi alloc] init];
CreateOrUpdateAlertTemplateRequest *createOrUpdateAlertTemplateRequest = {"alertID":0,"alertType":"Unknown","datTypeID":0,"name":"string","description":"string","subject":"string","template":"string","templateDataType":"string","attachmentTemplate":"string","attachmentTemplateDataType":"string","colourCode":"string","attachmentFooterTemplate":"string","attachmentFooterTemplateDataType":"string"}; //  (optional)

// Create Or Update Templates
[apiInstance createOrUpdateAlertWith:createOrUpdateAlertTemplateRequest
              completionHandler: ^(alertTemplateSummary output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAlerts = require('spenda_services_alerts');

// Create an instance of the API class
var api = new SpendaServicesAlerts.TemplatesApi()
var opts = {
  'createOrUpdateAlertTemplateRequest': {"alertID":0,"alertType":"Unknown","datTypeID":0,"name":"string","description":"string","subject":"string","template":"string","templateDataType":"string","attachmentTemplate":"string","attachmentTemplateDataType":"string","colourCode":"string","attachmentFooterTemplate":"string","attachmentFooterTemplateDataType":"string"} // {CreateOrUpdateAlertTemplateRequest} 
};

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

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

            // Create an instance of the API class
            var apiInstance = new TemplatesApi();
            var createOrUpdateAlertTemplateRequest = new CreateOrUpdateAlertTemplateRequest(); // CreateOrUpdateAlertTemplateRequest |  (optional) 

            try {
                // Create Or Update Templates
                alertTemplateSummary result = apiInstance.createOrUpdateAlert(createOrUpdateAlertTemplateRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TemplatesApi.createOrUpdateAlert: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\TemplatesApi();
$createOrUpdateAlertTemplateRequest = {"alertID":0,"alertType":"Unknown","datTypeID":0,"name":"string","description":"string","subject":"string","template":"string","templateDataType":"string","attachmentTemplate":"string","attachmentTemplateDataType":"string","colourCode":"string","attachmentFooterTemplate":"string","attachmentFooterTemplateDataType":"string"}; // CreateOrUpdateAlertTemplateRequest | 

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::TemplatesApi->new();
my $createOrUpdateAlertTemplateRequest = WWW::OPenAPIClient::Object::CreateOrUpdateAlertTemplateRequest->new(); # CreateOrUpdateAlertTemplateRequest | 

eval {
    my $result = $api_instance->createOrUpdateAlert(createOrUpdateAlertTemplateRequest => $createOrUpdateAlertTemplateRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TemplatesApi->createOrUpdateAlert: $@\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.TemplatesApi()
createOrUpdateAlertTemplateRequest = {"alertID":0,"alertType":"Unknown","datTypeID":0,"name":"string","description":"string","subject":"string","template":"string","templateDataType":"string","attachmentTemplate":"string","attachmentTemplateDataType":"string","colourCode":"string","attachmentFooterTemplate":"string","attachmentFooterTemplateDataType":"string"} # CreateOrUpdateAlertTemplateRequest |  (optional)

try:
    # Create Or Update Templates
    api_response = api_instance.create_or_update_alert(createOrUpdateAlertTemplateRequest=createOrUpdateAlertTemplateRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TemplatesApi->createOrUpdateAlert: %s\n" % e)
extern crate TemplatesApi;

pub fn main() {
    let createOrUpdateAlertTemplateRequest = {"alertID":0,"alertType":"Unknown","datTypeID":0,"name":"string","description":"string","subject":"string","template":"string","templateDataType":"string","attachmentTemplate":"string","attachmentTemplateDataType":"string","colourCode":"string","attachmentFooterTemplate":"string","attachmentFooterTemplateDataType":"string"}; // CreateOrUpdateAlertTemplateRequest

    let mut context = TemplatesApi::Context::default();
    let result = client.createOrUpdateAlert(createOrUpdateAlertTemplateRequest, &context).wait();

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

Scopes

Parameters

Body parameters
Name Description
createOrUpdateAlertTemplateRequest

Request body containing the details of Alert Template.

Responses


deleteAlert

Delete Template

Allows a user to remove a tenanted alert from its collection


/Spenda/Alerts/Alerts/{alertID}

Usage and SDK Samples

curl -X DELETE \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Alerts/Alerts/{alertID}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TemplatesApi;

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

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

        // Create an instance of the API class
        TemplatesApi apiInstance = new TemplatesApi();
        Integer alertID = 56; // Integer | Alert identifier for the requested Alert template

        try {
            deleteAlertResponse result = apiInstance.deleteAlert(alertID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#deleteAlert");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer alertID = new Integer(); // Integer | Alert identifier for the requested Alert template

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

import org.openapitools.client.api.TemplatesApi;

public class TemplatesApiExample {
    public static void main(String[] args) {
        TemplatesApi apiInstance = new TemplatesApi();
        Integer alertID = 56; // Integer | Alert identifier for the requested Alert template

        try {
            deleteAlertResponse result = apiInstance.deleteAlert(alertID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#deleteAlert");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
TemplatesApi *apiInstance = [[TemplatesApi alloc] init];
Integer *alertID = 56; // Alert identifier for the requested Alert template (default to null)

// Delete Template
[apiInstance deleteAlertWith:alertID
              completionHandler: ^(deleteAlertResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAlerts = require('spenda_services_alerts');

// Create an instance of the API class
var api = new SpendaServicesAlerts.TemplatesApi()
var alertID = 56; // {Integer} Alert identifier for the requested Alert template

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

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

            // Create an instance of the API class
            var apiInstance = new TemplatesApi();
            var alertID = 56;  // Integer | Alert identifier for the requested Alert template (default to null)

            try {
                // Delete Template
                deleteAlertResponse result = apiInstance.deleteAlert(alertID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TemplatesApi.deleteAlert: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\TemplatesApi();
$alertID = 56; // Integer | Alert identifier for the requested Alert template

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::TemplatesApi->new();
my $alertID = 56; # Integer | Alert identifier for the requested Alert template

eval {
    my $result = $api_instance->deleteAlert(alertID => $alertID);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TemplatesApi->deleteAlert: $@\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.TemplatesApi()
alertID = 56 # Integer | Alert identifier for the requested Alert template (default to null)

try:
    # Delete Template
    api_response = api_instance.delete_alert(alertID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TemplatesApi->deleteAlert: %s\n" % e)
extern crate TemplatesApi;

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

    let mut context = TemplatesApi::Context::default();
    let result = client.deleteAlert(alertID, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
alertID*
Integer (int32)
Alert identifier for the requested Alert template
Required

Responses


getAlert

Get Templates

Allows a user to get a set of requested templates


/Spenda/Alerts/Alerts

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Alerts/Alerts?datTypeID=56&websiteID=56&alertID=56&isMasterTemplate=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TemplatesApi;

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

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

        // Create an instance of the API class
        TemplatesApi apiInstance = new TemplatesApi();
        Integer datTypeID = 56; // Integer | Identifier of the Alerts DatType
        Integer websiteID = 56; // Integer | Identifier of the website from the request is requested from
        Integer alertID = 56; // Integer | Alert identifier for the requested Alert template
        Integer isMasterTemplate = 56; // Integer | only will select the base template where tenant can create its own template from

        try {
            array[alertTemplateSummary] result = apiInstance.getAlert(datTypeID, websiteID, alertID, isMasterTemplate);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#getAlert");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer datTypeID = new Integer(); // Integer | Identifier of the Alerts DatType
final Integer websiteID = new Integer(); // Integer | Identifier of the website from the request is requested from
final Integer alertID = new Integer(); // Integer | Alert identifier for the requested Alert template
final Integer isMasterTemplate = new Integer(); // Integer | only will select the base template where tenant can create its own template from

try {
    final result = await api_instance.getAlert(datTypeID, websiteID, alertID, isMasterTemplate);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getAlert: $e\n');
}

import org.openapitools.client.api.TemplatesApi;

public class TemplatesApiExample {
    public static void main(String[] args) {
        TemplatesApi apiInstance = new TemplatesApi();
        Integer datTypeID = 56; // Integer | Identifier of the Alerts DatType
        Integer websiteID = 56; // Integer | Identifier of the website from the request is requested from
        Integer alertID = 56; // Integer | Alert identifier for the requested Alert template
        Integer isMasterTemplate = 56; // Integer | only will select the base template where tenant can create its own template from

        try {
            array[alertTemplateSummary] result = apiInstance.getAlert(datTypeID, websiteID, alertID, isMasterTemplate);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#getAlert");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
TemplatesApi *apiInstance = [[TemplatesApi alloc] init];
Integer *datTypeID = 56; // Identifier of the Alerts DatType (default to null)
Integer *websiteID = 56; // Identifier of the website from the request is requested from (default to null)
Integer *alertID = 56; // Alert identifier for the requested Alert template (optional) (default to null)
Integer *isMasterTemplate = 56; // only will select the base template where tenant can create its own template from (optional) (default to null)

// Get Templates
[apiInstance getAlertWith:datTypeID
    websiteID:websiteID
    alertID:alertID
    isMasterTemplate:isMasterTemplate
              completionHandler: ^(array[alertTemplateSummary] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAlerts = require('spenda_services_alerts');

// Create an instance of the API class
var api = new SpendaServicesAlerts.TemplatesApi()
var datTypeID = 56; // {Integer} Identifier of the Alerts DatType
var websiteID = 56; // {Integer} Identifier of the website from the request is requested from
var opts = {
  'alertID': 56, // {Integer} Alert identifier for the requested Alert template
  'isMasterTemplate': 56 // {Integer} only will select the base template where tenant can create its own template from
};

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

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

            // Create an instance of the API class
            var apiInstance = new TemplatesApi();
            var datTypeID = 56;  // Integer | Identifier of the Alerts DatType (default to null)
            var websiteID = 56;  // Integer | Identifier of the website from the request is requested from (default to null)
            var alertID = 56;  // Integer | Alert identifier for the requested Alert template (optional)  (default to null)
            var isMasterTemplate = 56;  // Integer | only will select the base template where tenant can create its own template from (optional)  (default to null)

            try {
                // Get Templates
                array[alertTemplateSummary] result = apiInstance.getAlert(datTypeID, websiteID, alertID, isMasterTemplate);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TemplatesApi.getAlert: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\TemplatesApi();
$datTypeID = 56; // Integer | Identifier of the Alerts DatType
$websiteID = 56; // Integer | Identifier of the website from the request is requested from
$alertID = 56; // Integer | Alert identifier for the requested Alert template
$isMasterTemplate = 56; // Integer | only will select the base template where tenant can create its own template from

try {
    $result = $api_instance->getAlert($datTypeID, $websiteID, $alertID, $isMasterTemplate);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TemplatesApi->getAlert: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::TemplatesApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::TemplatesApi->new();
my $datTypeID = 56; # Integer | Identifier of the Alerts DatType
my $websiteID = 56; # Integer | Identifier of the website from the request is requested from
my $alertID = 56; # Integer | Alert identifier for the requested Alert template
my $isMasterTemplate = 56; # Integer | only will select the base template where tenant can create its own template from

eval {
    my $result = $api_instance->getAlert(datTypeID => $datTypeID, websiteID => $websiteID, alertID => $alertID, isMasterTemplate => $isMasterTemplate);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TemplatesApi->getAlert: $@\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.TemplatesApi()
datTypeID = 56 # Integer | Identifier of the Alerts DatType (default to null)
websiteID = 56 # Integer | Identifier of the website from the request is requested from (default to null)
alertID = 56 # Integer | Alert identifier for the requested Alert template (optional) (default to null)
isMasterTemplate = 56 # Integer | only will select the base template where tenant can create its own template from (optional) (default to null)

try:
    # Get Templates
    api_response = api_instance.get_alert(datTypeID, websiteID, alertID=alertID, isMasterTemplate=isMasterTemplate)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TemplatesApi->getAlert: %s\n" % e)
extern crate TemplatesApi;

pub fn main() {
    let datTypeID = 56; // Integer
    let websiteID = 56; // Integer
    let alertID = 56; // Integer
    let isMasterTemplate = 56; // Integer

    let mut context = TemplatesApi::Context::default();
    let result = client.getAlert(datTypeID, websiteID, alertID, isMasterTemplate, &context).wait();

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

Scopes

Parameters

Query parameters
Name Description
datTypeID*
Integer (int32)
Identifier of the Alerts DatType
Required
websiteID*
Integer (int32)
Identifier of the website from the request is requested from
Required
alertID
Integer (int32)
Alert identifier for the requested Alert template
isMasterTemplate
Integer (int32)
only will select the base template where tenant can create its own template from

Responses


previewAlert

Preview Alerts

Allows a user to preview a set of requested templates


/Spenda/Alerts/Preview

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Alerts/Preview" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TemplatesApi;

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

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

        // Create an instance of the API class
        TemplatesApi apiInstance = new TemplatesApi();
        PreviewAlertRequest previewAlertRequest = {"alertRequestType":0,"alertType":22,"deliveryType":"Unknown","alertID":0,"request":{}}; // PreviewAlertRequest | 

        try {
            array[previewAlertResponse] result = apiInstance.previewAlert(previewAlertRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#previewAlert");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final PreviewAlertRequest previewAlertRequest = new PreviewAlertRequest(); // PreviewAlertRequest | 

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

import org.openapitools.client.api.TemplatesApi;

public class TemplatesApiExample {
    public static void main(String[] args) {
        TemplatesApi apiInstance = new TemplatesApi();
        PreviewAlertRequest previewAlertRequest = {"alertRequestType":0,"alertType":22,"deliveryType":"Unknown","alertID":0,"request":{}}; // PreviewAlertRequest | 

        try {
            array[previewAlertResponse] result = apiInstance.previewAlert(previewAlertRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#previewAlert");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
TemplatesApi *apiInstance = [[TemplatesApi alloc] init];
PreviewAlertRequest *previewAlertRequest = {"alertRequestType":0,"alertType":22,"deliveryType":"Unknown","alertID":0,"request":{}}; //  (optional)

// Preview Alerts
[apiInstance previewAlertWith:previewAlertRequest
              completionHandler: ^(array[previewAlertResponse] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAlerts = require('spenda_services_alerts');

// Create an instance of the API class
var api = new SpendaServicesAlerts.TemplatesApi()
var opts = {
  'previewAlertRequest': {"alertRequestType":0,"alertType":22,"deliveryType":"Unknown","alertID":0,"request":{}} // {PreviewAlertRequest} 
};

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

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

            // Create an instance of the API class
            var apiInstance = new TemplatesApi();
            var previewAlertRequest = new PreviewAlertRequest(); // PreviewAlertRequest |  (optional) 

            try {
                // Preview Alerts
                array[previewAlertResponse] result = apiInstance.previewAlert(previewAlertRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TemplatesApi.previewAlert: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\TemplatesApi();
$previewAlertRequest = {"alertRequestType":0,"alertType":22,"deliveryType":"Unknown","alertID":0,"request":{}}; // PreviewAlertRequest | 

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::TemplatesApi->new();
my $previewAlertRequest = WWW::OPenAPIClient::Object::PreviewAlertRequest->new(); # PreviewAlertRequest | 

eval {
    my $result = $api_instance->previewAlert(previewAlertRequest => $previewAlertRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TemplatesApi->previewAlert: $@\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.TemplatesApi()
previewAlertRequest = {"alertRequestType":0,"alertType":22,"deliveryType":"Unknown","alertID":0,"request":{}} # PreviewAlertRequest |  (optional)

try:
    # Preview Alerts
    api_response = api_instance.preview_alert(previewAlertRequest=previewAlertRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TemplatesApi->previewAlert: %s\n" % e)
extern crate TemplatesApi;

pub fn main() {
    let previewAlertRequest = {"alertRequestType":0,"alertType":22,"deliveryType":"Unknown","alertID":0,"request":{}}; // PreviewAlertRequest

    let mut context = TemplatesApi::Context::default();
    let result = client.previewAlert(previewAlertRequest, &context).wait();

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

Scopes

Parameters

Body parameters
Name Description
previewAlertRequest

Request body containing the details of Alert Template.

Responses