Spenda.Services.DocumentAnalyser

FSCO

fSCOWebhook

Receive multiple events coming from FSCO for every document uploaded by Spenda user

Receive multiple events to track the state of each document uploaded by the user


/Spenda/DocumentAnalyser/FSCO/Webhook

Usage and SDK Samples

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

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

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

        // Create an instance of the API class
        FSCOApi apiInstance = new FSCOApi();
        WebhookEventRequest webhookEventRequest = {"data":{"object":{}},"type":"string","userId":"string","organisationId":"string","signature":"string"}; // WebhookEventRequest | 

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

final api_instance = DefaultApi();

final WebhookEventRequest webhookEventRequest = new WebhookEventRequest(); // WebhookEventRequest | 

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

import org.openapitools.client.api.FSCOApi;

public class FSCOApiExample {
    public static void main(String[] args) {
        FSCOApi apiInstance = new FSCOApi();
        WebhookEventRequest webhookEventRequest = {"data":{"object":{}},"type":"string","userId":"string","organisationId":"string","signature":"string"}; // WebhookEventRequest | 

        try {
            httpActionResult result = apiInstance.fSCOWebhook(webhookEventRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FSCOApi#fSCOWebhook");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
FSCOApi *apiInstance = [[FSCOApi alloc] init];
WebhookEventRequest *webhookEventRequest = {"data":{"object":{}},"type":"string","userId":"string","organisationId":"string","signature":"string"}; //  (optional)

// Receive multiple events coming from FSCO for every document uploaded by Spenda user
[apiInstance fSCOWebhookWith:webhookEventRequest
              completionHandler: ^(httpActionResult output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesDocumentAnalyser = require('spenda_services_document_analyser');

// Create an instance of the API class
var api = new SpendaServicesDocumentAnalyser.FSCOApi()
var opts = {
  'webhookEventRequest': {"data":{"object":{}},"type":"string","userId":"string","organisationId":"string","signature":"string"} // {WebhookEventRequest} 
};

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

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

            // Create an instance of the API class
            var apiInstance = new FSCOApi();
            var webhookEventRequest = new WebhookEventRequest(); // WebhookEventRequest |  (optional) 

            try {
                // Receive multiple events coming from FSCO for every document uploaded by Spenda user
                httpActionResult result = apiInstance.fSCOWebhook(webhookEventRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling FSCOApi.fSCOWebhook: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\FSCOApi();
$webhookEventRequest = {"data":{"object":{}},"type":"string","userId":"string","organisationId":"string","signature":"string"}; // WebhookEventRequest | 

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::FSCOApi->new();
my $webhookEventRequest = WWW::OPenAPIClient::Object::WebhookEventRequest->new(); # WebhookEventRequest | 

eval {
    my $result = $api_instance->fSCOWebhook(webhookEventRequest => $webhookEventRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FSCOApi->fSCOWebhook: $@\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.FSCOApi()
webhookEventRequest = {"data":{"object":{}},"type":"string","userId":"string","organisationId":"string","signature":"string"} # WebhookEventRequest |  (optional)

try:
    # Receive multiple events coming from FSCO for every document uploaded by Spenda user
    api_response = api_instance.f_sco_webhook(webhookEventRequest=webhookEventRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FSCOApi->fSCOWebhook: %s\n" % e)
extern crate FSCOApi;

pub fn main() {
    let webhookEventRequest = {"data":{"object":{}},"type":"string","userId":"string","organisationId":"string","signature":"string"}; // WebhookEventRequest

    let mut context = FSCOApi::Context::default();
    let result = client.fSCOWebhook(webhookEventRequest, &context).wait();

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

Scopes

Parameters

Body parameters
Name Description
webhookEventRequest

Responses


fetchDocumentsHttpTrigger

Manually Fetch all documents details that havent received any event in the last day

Get all documents details from FSCO which have not received any event and are still in Analysing state


/Spenda/DocumentAnalyser/FSCO/FetchDocuments

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/DocumentAnalyser/FSCO/FetchDocuments"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.FSCOApi;

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

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

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

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

final api_instance = DefaultApi();


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

import org.openapitools.client.api.FSCOApi;

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

        try {
            httpActionResult result = apiInstance.fetchDocumentsHttpTrigger();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FSCOApi#fetchDocumentsHttpTrigger");
            e.printStackTrace();
        }
    }
}


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

// Manually Fetch all documents details that havent received any event in the last day
[apiInstance fetchDocumentsHttpTriggerWithCompletionHandler: 
              ^(httpActionResult output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesDocumentAnalyser = require('spenda_services_document_analyser');

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

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

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

            try {
                // Manually Fetch all documents details that havent received any event in the last day
                httpActionResult result = apiInstance.fetchDocumentsHttpTrigger();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling FSCOApi.fetchDocumentsHttpTrigger: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try:
    # Manually Fetch all documents details that havent received any event in the last day
    api_response = api_instance.fetch_documents_http_trigger()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FSCOApi->fetchDocumentsHttpTrigger: %s\n" % e)
extern crate FSCOApi;

pub fn main() {

    let mut context = FSCOApi::Context::default();
    let result = client.fetchDocumentsHttpTrigger(&context).wait();

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

Scopes

Parameters

Responses


OCR

deleteDocuments

Deletes Document

Allows a tenant to delete uploaded documents and its data.


/Spenda/DocumentAnalyser/Documents

Usage and SDK Samples

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

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

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

        // Create an instance of the API class
        OCRApi apiInstance = new OCRApi();
        DeleteDocumentsRequest deleteDocumentsRequest = {"documentImportIDs":[0]}; // DeleteDocumentsRequest | 

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

final api_instance = DefaultApi();

final DeleteDocumentsRequest deleteDocumentsRequest = new DeleteDocumentsRequest(); // DeleteDocumentsRequest | 

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

import org.openapitools.client.api.OCRApi;

public class OCRApiExample {
    public static void main(String[] args) {
        OCRApi apiInstance = new OCRApi();
        DeleteDocumentsRequest deleteDocumentsRequest = {"documentImportIDs":[0]}; // DeleteDocumentsRequest | 

        try {
            httpActionResult result = apiInstance.deleteDocuments(deleteDocumentsRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OCRApi#deleteDocuments");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
OCRApi *apiInstance = [[OCRApi alloc] init];
DeleteDocumentsRequest *deleteDocumentsRequest = {"documentImportIDs":[0]}; //  (optional)

// Deletes Document
[apiInstance deleteDocumentsWith:deleteDocumentsRequest
              completionHandler: ^(httpActionResult output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesDocumentAnalyser = require('spenda_services_document_analyser');

// Create an instance of the API class
var api = new SpendaServicesDocumentAnalyser.OCRApi()
var opts = {
  'deleteDocumentsRequest': {"documentImportIDs":[0]} // {DeleteDocumentsRequest} 
};

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

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

            // Create an instance of the API class
            var apiInstance = new OCRApi();
            var deleteDocumentsRequest = new DeleteDocumentsRequest(); // DeleteDocumentsRequest |  (optional) 

            try {
                // Deletes Document
                httpActionResult result = apiInstance.deleteDocuments(deleteDocumentsRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OCRApi.deleteDocuments: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\OCRApi();
$deleteDocumentsRequest = {"documentImportIDs":[0]}; // DeleteDocumentsRequest | 

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::OCRApi->new();
my $deleteDocumentsRequest = WWW::OPenAPIClient::Object::DeleteDocumentsRequest->new(); # DeleteDocumentsRequest | 

eval {
    my $result = $api_instance->deleteDocuments(deleteDocumentsRequest => $deleteDocumentsRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OCRApi->deleteDocuments: $@\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.OCRApi()
deleteDocumentsRequest = {"documentImportIDs":[0]} # DeleteDocumentsRequest |  (optional)

try:
    # Deletes Document
    api_response = api_instance.delete_documents(deleteDocumentsRequest=deleteDocumentsRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OCRApi->deleteDocuments: %s\n" % e)
extern crate OCRApi;

pub fn main() {
    let deleteDocumentsRequest = {"documentImportIDs":[0]}; // DeleteDocumentsRequest

    let mut context = OCRApi::Context::default();
    let result = client.deleteDocuments(deleteDocumentsRequest, &context).wait();

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

Scopes

Parameters

Body parameters
Name Description
deleteDocumentsRequest

Responses


getDocuments

Get all documents the user has uploaded

it will describe the state of every document the user has uploaded


/Spenda/DocumentAnalyser/Documents

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/DocumentAnalyser/Documents?status=status_example&datTypeID=56&documentImportID=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OCRApi;

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

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

        // Create an instance of the API class
        OCRApi apiInstance = new OCRApi();
        String status = status_example; // String | Document Status
        Integer datTypeID = 56; // Integer | Document Type Identifier
        Integer documentImportID = 56; // Integer | Document Import Unique Identifier

        try {
            httpActionResult_documentImportResponse result = apiInstance.getDocuments(status, datTypeID, documentImportID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OCRApi#getDocuments");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String status = new String(); // String | Document Status
final Integer datTypeID = new Integer(); // Integer | Document Type Identifier
final Integer documentImportID = new Integer(); // Integer | Document Import Unique Identifier

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

import org.openapitools.client.api.OCRApi;

public class OCRApiExample {
    public static void main(String[] args) {
        OCRApi apiInstance = new OCRApi();
        String status = status_example; // String | Document Status
        Integer datTypeID = 56; // Integer | Document Type Identifier
        Integer documentImportID = 56; // Integer | Document Import Unique Identifier

        try {
            httpActionResult_documentImportResponse result = apiInstance.getDocuments(status, datTypeID, documentImportID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OCRApi#getDocuments");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
OCRApi *apiInstance = [[OCRApi alloc] init];
String *status = status_example; // Document Status (optional) (default to unknown)
Integer *datTypeID = 56; // Document Type Identifier (optional) (default to null)
Integer *documentImportID = 56; // Document Import Unique Identifier (optional) (default to null)

// Get all documents the user has uploaded
[apiInstance getDocumentsWith:status
    datTypeID:datTypeID
    documentImportID:documentImportID
              completionHandler: ^(httpActionResult_documentImportResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesDocumentAnalyser = require('spenda_services_document_analyser');

// Create an instance of the API class
var api = new SpendaServicesDocumentAnalyser.OCRApi()
var opts = {
  'status': status_example, // {String} Document Status
  'datTypeID': 56, // {Integer} Document Type Identifier
  'documentImportID': 56 // {Integer} Document Import Unique Identifier
};

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

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

            // Create an instance of the API class
            var apiInstance = new OCRApi();
            var status = status_example;  // String | Document Status (optional)  (default to unknown)
            var datTypeID = 56;  // Integer | Document Type Identifier (optional)  (default to null)
            var documentImportID = 56;  // Integer | Document Import Unique Identifier (optional)  (default to null)

            try {
                // Get all documents the user has uploaded
                httpActionResult_documentImportResponse result = apiInstance.getDocuments(status, datTypeID, documentImportID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OCRApi.getDocuments: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\OCRApi();
$status = status_example; // String | Document Status
$datTypeID = 56; // Integer | Document Type Identifier
$documentImportID = 56; // Integer | Document Import Unique Identifier

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::OCRApi->new();
my $status = status_example; # String | Document Status
my $datTypeID = 56; # Integer | Document Type Identifier
my $documentImportID = 56; # Integer | Document Import Unique Identifier

eval {
    my $result = $api_instance->getDocuments(status => $status, datTypeID => $datTypeID, documentImportID => $documentImportID);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OCRApi->getDocuments: $@\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.OCRApi()
status = status_example # String | Document Status (optional) (default to unknown)
datTypeID = 56 # Integer | Document Type Identifier (optional) (default to null)
documentImportID = 56 # Integer | Document Import Unique Identifier (optional) (default to null)

try:
    # Get all documents the user has uploaded
    api_response = api_instance.get_documents(status=status, datTypeID=datTypeID, documentImportID=documentImportID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OCRApi->getDocuments: %s\n" % e)
extern crate OCRApi;

pub fn main() {
    let status = status_example; // String
    let datTypeID = 56; // Integer
    let documentImportID = 56; // Integer

    let mut context = OCRApi::Context::default();
    let result = client.getDocuments(status, datTypeID, documentImportID, &context).wait();

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

Scopes

Parameters

Query parameters
Name Description
status
String
Document Status
datTypeID
Integer (int32)
Document Type Identifier
documentImportID
Integer (int32)
Document Import Unique Identifier

Responses


uploadDocument

Post documents to extract the data contain in it

uploading any type of document so it can be analysed and its data transform into a spenda financial document


/Spenda/DocumentAnalyser/Upload/{datTypeID}

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: multipart/form-data" \
 "https://api.dev.spenda.co/api/Spenda/DocumentAnalyser/Upload/{datTypeID}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OCRApi;

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

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

        // Create an instance of the API class
        OCRApi apiInstance = new OCRApi();
        Integer datTypeID = 56; // Integer | Document type unique identifier. e.i. PurchaseInvoice = 72

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

final api_instance = DefaultApi();

final Integer datTypeID = new Integer(); // Integer | Document type unique identifier. e.i. PurchaseInvoice = 72

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

import org.openapitools.client.api.OCRApi;

public class OCRApiExample {
    public static void main(String[] args) {
        OCRApi apiInstance = new OCRApi();
        Integer datTypeID = 56; // Integer | Document type unique identifier. e.i. PurchaseInvoice = 72

        try {
            httpActionResult_documentAnalyserResponse result = apiInstance.uploadDocument(datTypeID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OCRApi#uploadDocument");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
OCRApi *apiInstance = [[OCRApi alloc] init];
Integer *datTypeID = 56; // Document type unique identifier. e.i. PurchaseInvoice = 72 (default to null)

// Post documents to extract the data contain in it
[apiInstance uploadDocumentWith:datTypeID
              completionHandler: ^(httpActionResult_documentAnalyserResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesDocumentAnalyser = require('spenda_services_document_analyser');

// Create an instance of the API class
var api = new SpendaServicesDocumentAnalyser.OCRApi()
var datTypeID = 56; // {Integer} Document type unique identifier. e.i. PurchaseInvoice = 72

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

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

            // Create an instance of the API class
            var apiInstance = new OCRApi();
            var datTypeID = 56;  // Integer | Document type unique identifier. e.i. PurchaseInvoice = 72 (default to null)

            try {
                // Post documents to extract the data contain in it
                httpActionResult_documentAnalyserResponse result = apiInstance.uploadDocument(datTypeID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OCRApi.uploadDocument: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\OCRApi();
$datTypeID = 56; // Integer | Document type unique identifier. e.i. PurchaseInvoice = 72

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::OCRApi->new();
my $datTypeID = 56; # Integer | Document type unique identifier. e.i. PurchaseInvoice = 72

eval {
    my $result = $api_instance->uploadDocument(datTypeID => $datTypeID);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OCRApi->uploadDocument: $@\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.OCRApi()
datTypeID = 56 # Integer | Document type unique identifier. e.i. PurchaseInvoice = 72 (default to null)

try:
    # Post documents to extract the data contain in it
    api_response = api_instance.upload_document(datTypeID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OCRApi->uploadDocument: %s\n" % e)
extern crate OCRApi;

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

    let mut context = OCRApi::Context::default();
    let result = client.uploadDocument(datTypeID, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
datTypeID*
Integer (int32)
Document type unique identifier. e.i. PurchaseInvoice = 72
Required

Responses


Public

fSCOWebhook

Receive multiple events coming from FSCO for every document uploaded by Spenda user

Receive multiple events to track the state of each document uploaded by the user


/Spenda/DocumentAnalyser/FSCO/Webhook

Usage and SDK Samples

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

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

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

        // Create an instance of the API class
        PublicApi apiInstance = new PublicApi();
        WebhookEventRequest webhookEventRequest = {"data":{"object":{}},"type":"string","userId":"string","organisationId":"string","signature":"string"}; // WebhookEventRequest | 

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

final api_instance = DefaultApi();

final WebhookEventRequest webhookEventRequest = new WebhookEventRequest(); // WebhookEventRequest | 

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

import org.openapitools.client.api.PublicApi;

public class PublicApiExample {
    public static void main(String[] args) {
        PublicApi apiInstance = new PublicApi();
        WebhookEventRequest webhookEventRequest = {"data":{"object":{}},"type":"string","userId":"string","organisationId":"string","signature":"string"}; // WebhookEventRequest | 

        try {
            httpActionResult result = apiInstance.fSCOWebhook(webhookEventRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicApi#fSCOWebhook");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
PublicApi *apiInstance = [[PublicApi alloc] init];
WebhookEventRequest *webhookEventRequest = {"data":{"object":{}},"type":"string","userId":"string","organisationId":"string","signature":"string"}; //  (optional)

// Receive multiple events coming from FSCO for every document uploaded by Spenda user
[apiInstance fSCOWebhookWith:webhookEventRequest
              completionHandler: ^(httpActionResult output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesDocumentAnalyser = require('spenda_services_document_analyser');

// Create an instance of the API class
var api = new SpendaServicesDocumentAnalyser.PublicApi()
var opts = {
  'webhookEventRequest': {"data":{"object":{}},"type":"string","userId":"string","organisationId":"string","signature":"string"} // {WebhookEventRequest} 
};

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

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

            // Create an instance of the API class
            var apiInstance = new PublicApi();
            var webhookEventRequest = new WebhookEventRequest(); // WebhookEventRequest |  (optional) 

            try {
                // Receive multiple events coming from FSCO for every document uploaded by Spenda user
                httpActionResult result = apiInstance.fSCOWebhook(webhookEventRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PublicApi.fSCOWebhook: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PublicApi();
$webhookEventRequest = {"data":{"object":{}},"type":"string","userId":"string","organisationId":"string","signature":"string"}; // WebhookEventRequest | 

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PublicApi->new();
my $webhookEventRequest = WWW::OPenAPIClient::Object::WebhookEventRequest->new(); # WebhookEventRequest | 

eval {
    my $result = $api_instance->fSCOWebhook(webhookEventRequest => $webhookEventRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PublicApi->fSCOWebhook: $@\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.PublicApi()
webhookEventRequest = {"data":{"object":{}},"type":"string","userId":"string","organisationId":"string","signature":"string"} # WebhookEventRequest |  (optional)

try:
    # Receive multiple events coming from FSCO for every document uploaded by Spenda user
    api_response = api_instance.f_sco_webhook(webhookEventRequest=webhookEventRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PublicApi->fSCOWebhook: %s\n" % e)
extern crate PublicApi;

pub fn main() {
    let webhookEventRequest = {"data":{"object":{}},"type":"string","userId":"string","organisationId":"string","signature":"string"}; // WebhookEventRequest

    let mut context = PublicApi::Context::default();
    let result = client.fSCOWebhook(webhookEventRequest, &context).wait();

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

Scopes

Parameters

Body parameters
Name Description
webhookEventRequest

Responses