Finance Clearing API

1. Introduction

The HORISEN Finance Clearing API is used by HORISEN applications for Invoice Clearing, establishing available payment types, etc.

It supports Oauth 2 authentication. An example on how to Implement Oauth 2 and obtain access token as wel as an example of using a HORISEN API service is available at Oauth2 Authentication Guidelines

2. Method's Overview

2.1 Invoice

Invoice endpoints.

GET/payable-invoices
Returns a list of all payable Invoices.Read More

2.2 Clearing

InvoiceClearingRecord endpoints.

GET/invoices/{invoiceid}/clearingrecords
Returns a list of all InvoiceClearingRecords for given InvoiceId.Read More
POST/invoices/{invoiceid}/clearingrecords
Adds InvoiceClearingRecord for given InvoiceId.Read More
GET/invoices-by-number/{invoiceNumber}/clearingrecords
Returns a list of all InvoiceClearingRecords for given InvoiceNumber.Read More
POST/invoices-by-number/{invoiceNumber}/clearingrecords
Adds an InvoiceClearingRecord for given InvoiceNumber.Read More
GET/invoices-by-uid/{invoiceUid}/clearingrecords
Returns a list of InvoiceClearingRecords for given invoiceUid.Read More
POST/invoices-by-uid/{invoiceUid}/clearingrecords
Adds InvoiceClearingRecord for given InvoiceUid.Read More

2.3 PaymentType

Payment type endpoints

GET/payment-types
Returns a list of Payment Types.Read More

2.4 PlatformOwnerBankAccounts

Endpoints for working with data of platform owner bank accounts

GET/platform-owner-bank-accounts
Returns a list of bank accounts of platform owner.Read More

3. Method Details

GET/payable-invoices
Returns a list payable Invoices.Up

Method Overview

Returns list of payable Invoices. This endpoint accepts query parameters for filtering payable Invoices. For more information refer to URL Filtering Guidelines|

URL Parameters

Name Type Description
page_size integer (query) Page size. Default value : 10
page_number integer (query) Page number. Default value : 1
paging string (query) Paging options in form of &paging=page_num page_size eg. paging=1,10
operator(fieldName) string (query) Search criteria using following operators : isnull,isnotnull,isempty,isnotempty,eq,neq,startswith, contains,endswith, doesnotcontain, lt,lte,gt, gte, in, notin , between, notbetween and by following attributes: custName, custShortName, invNumber, invDate, invDueDate, overDueDate, total, totalUnpaid, totalPaid, invType, invTypeName, invPeriod, invPeriodStart, invPeriodEnd, invoicingDate, invoicingDatePolicy, classCodeName, currency, id,disputeStatus, statusDt, dataSourceCodeName, custID, processingStatus,collectionLeadId, collectionMode, vat, amountNoVat, amountVat, domainCodeName, custCountry, nettingInvoiceStatus,nettingInvoicePaymentStatus,rounding, dtsSelectorId, dtsSelectorCodeName, invUid, custPOBox, docsDeliveryStatus, selfBilling, customerType, domainName, syncStatus, syncStatusDt, syncMode, collectionLeadNumber, ownerId, ownerBpName, ownerBpBriefName if operator is one of isnull,isnotnull,isempty,isnotempty field value can be ommited.if operator is in or notin field value must be coma separated list of values.if operator is between or notbetween field value must be coma separated list of two values representing beginng and the end of range. Operator can be ommited and in that case it will be treated as operator is eq (Eg:fieldName=fieldValue) Example: startswith(clientName)=hor, starts with hor in field clientName if fieldName is q and operator is eq or ommited, field value will be used in general search across multiple attributes.
q string (query) General search criteria: available fields: custShortName, custName, invNumber, invDate, invoicingDate, invoicingDatePolicy, invDueDate, invTypeName, invPeriod, isputeStatus, ownerId, ownerBpName, ownerBpBriefName'
sort string (query) Sort options in form of sort=-attribute1,attribute2,-attribute3

Sort available fields:custName, custShortName, invNumber, invDate, invDueDate, overDueDate, total, totalUnpaid, totalPaid, invType, invTypeName, invPeriod, invPeriodStart, invPeriodEnd, invoicingDate, invoicingDatePolicy,classCodeName,currency,id,disputeStatus, statusDt, dataSourceCodeName, custID,processingStatus,collectionLeadId,collectionMode,vat,amountNoVat,amountVat, domainCodeName, custCountry, nettingInvoiceStatus,nettingInvoicePaymentStatus,rounding,dtsSelectorId,dtsSelectorCodeName, invUid, custPOBox, docsDeliveryStatus, selfBilling, customerType, domainName, syncStatus, syncStatusDt, syncMode, collectionLeadNumber, ownerId, ownerBpName, ownerBpBriefName

Success Response 200: Returns list of invoices

{
  "data": [
    {
      "id": 0,
      "invUid": "string",
      "instanceID": 0,
      "custID": 0,
      "custName": "string",
      "custShortName": "string",
      "custAttn": "string",
      "custAddress": "string",
      "custAddress2": "string",
      "custPost": "string",
      "custCity": "string",
      "custCountry": 0,
      "custPOBox": "string",
      "customerType": "string",
      "custVatNumber": "string",
      "invType": 0,
      "invTypeName": "string",
      "templateID": 0,
      "invDate": "2021-03-11",
      "invoicingDate": "2021-03-11",
      "invoicingDatePolicy": "delivery",
      "invNumberFix": "string",
      "invNumberNum": 0,
      "invNumber": "string",
      "invPeriod": "string",
      "invDueDate": "2021-03-11",
      "overDueDate": 0,
      "ownerVatNumber": "string",
      "currency": 0,
      "currencyCode": "string",
      "amountNoVat": 0,
      "amountVat": 0,
      "vatPercent": 0,
      "vat": 0,
      "rounding": 0,
      "total": 0,
      "totalUnpaid": 0,
      "totalPaid": 0,
      "vatInPrice": 0,
      "vatInTotal": 0,
      "status": "draft",
      "insertDt": "2021-03-11T08:24:24.459Z",
      "statusDt": "2021-03-11T08:24:24.459Z",
      "deliveryDate": "2021-03-11",
      "invPeriodStart": "2021-03-11",
      "invPeriodEnd": "2021-03-11",
      "docsDeliveryStatus": "string",
      "docsDeliveryStatusDate": "2021-03-11T08:24:24.459Z",
      "docsDeliveryDlrStatus": "string",
      "docsDeliveryDlrStatusDate": "2021-03-11T08:24:24.459Z",
      "classCodeName": "string",
      "classDomain": "string",
      "classArea": "string",
      "lang": "string",
      "paymentStatus": "none",
      "paymentStatusDate": "2021-03-11T08:24:24.459Z",
      "disputeStatus": "string",
      "disputeStatusDate": "2021-03-11T08:24:24.459Z",
      "dataSourceId": 0,
      "dataSourceCodeName": "string",
      "nettingInvoiceId": 0,
      "nettingInvoiceNumber": "string",
      "selfBilling": "yes",
      "domainId": 0,
      "domainCodeName": "string",
      "domainName": "string",
      "disputeNextId": 0,
      "collectionMode": "none",
      "collectionLeadId": 0,
      "collectionLeadNumber": "string",
      "collectionLeadNettingInvoiceId": 0,
      "collectionLeadNettingInvoiceNumber": "string",
      "collectionLeadNettingInvoiceStatus": "string",
      "collectionLeadNettingInvoicePaymentStatus": "string",
      "collectionLeadNettingInvoiceTotal": "string",
      "collectionLeadNettingInvoiceTotalPaid": "string",
      "collectionLeadNettingInvoiceTotalUnpaid": "string",
      "processingStatus": "none",
      "comment": "string",
      "nettingInvoiceStatus": "draft",
      "nettingPaymentStatus": "none",
      "nettingTotal": 0,
      "nettingTotalUnpaid": 0,
      "nettingTotalPaid": 0,
      "dtsSelectorId": 0,
      "dtsSelectorCodeName": "string",
      "sitInvoiceEmailImportId": 0,
      "billingTypeName": "string",
      "smsCount": 0,
      "syncStatus": "none",
      "syncStatusDt": "2021-03-11T08:24:24.460Z",
      "syncMode": "disabled",
      "reminderStatus": "enabled",
      "domesticCurrency": 0,
      "domesticCurrencyCode": "string",
      "domesticCurrencyAmountNoVAT": 0,
      "domesticCurrencyAmountVAT": 0,
      "domesticCurrencyTotal": 0,
      "domesticCurrencyRounding": 0,
      "domesticCurrencyRate": 0,
      "industryName": "string",
      "ownerName": "string",
      "ownerId": 0,
      "ownerBpName": "string",
      "ownerBpBriefName": "string"
    }
  ],
  "meta": {
    "pagination": {}
  }
}

Error Response: Unexpected Error (Default)

{
  "Code": 0,
  "Message": "string"
}
GET/invoices/{invoiceid}/clearingrecords
Returns a list od all InvoiceClearingRecords for given invoiceid.Up

Method Overview

Authorization privilege needed for this endpoint:finance-invoices.view optional: privilege used in this endpoint:finance-invoices-own.view List of all InvoiceClearingRecords that belongs to InvoiceClearing. InvoiceClearing is created when Invoice status is changed to approved and payment status is set to 'open'. By default, only clearing records with active status will be returned. This endpoint accepts query parameters for filtering described at URL Filtering Guidelines|. If Clearing records with other statuses should be returned, use query parameter status with operator 'in' and value containing comma separated list of statuses ( in(status)=active,canceled ). For the time being only active and canceled status are available as clearing record status value.

URL Parameters

Name Type Description
invoiceid (required) integer (path) Invoice id to get ClearingRecords
page_size integer (query) Page size. Default value : 10
page_number integer (query) Page number. Default value : 1
paging string (query) Paging options in form of &paging=page_num page_size eg. paging=1,10
operator(fieldName) string (query) Search criteria using following operators : isnull,isnotnull,isempty,isnotempty,eq,neq,startswith, contains,endswith, doesnotcontain, lt,lte,gt, gte, in, notin , between, notbetween and by following attributes: custName, custShortName, invNumber, invDate, invDueDate, overDueDate, total, totalUnpaid, totalPaid, invType, invTypeName, invPeriod, invPeriodStart, invPeriodEnd, invoicingDate, invoicingDatePolicy, classCodeName, currency, id,disputeStatus, statusDt, dataSourceCodeName, custID, processingStatus,collectionLeadId, collectionMode, vat, amountNoVat, amountVat, domainCodeName, custCountry, nettingInvoiceStatus,nettingInvoicePaymentStatus,rounding, dtsSelectorId, dtsSelectorCodeName, invUid, custPOBox, docsDeliveryStatus, selfBilling, customerType, domainName, syncStatus, syncStatusDt, syncMode, collectionLeadNumber, ownerId, ownerBpName, ownerBpBriefName if operator is one of isnull,isnotnull,isempty,isnotempty field value can be ommited.if operator is in or notin field value must be coma separated list of values.if operator is between or notbetween field value must be coma separated list of two values representing beginng and the end of range. Operator can be ommited and in that case it will be treated as operator is eq (Eg:fieldName=fieldValue) Example: startswith(clientName)=hor, starts with hor in field clientName if fieldName is q and operator is eq or ommited, field value will be used in general search across multiple attributes.
q string (query) General search criteria: available fields: status, paymentReference, comment, revokeUserId, revokeUserName, revokeComment, clearingTypeCodeName, paymentTypeName, bankAccountName, bankAccountNumber, bankAccountIban, bankAccountSwiftBic'
sort string (query) Sort options in form of sort=-attribute1,attribute2,-attribute3 Sort available fields: id, clearingId, clearingTypeId, clearingTypeCodeName, recordDate, paymentTypeId, paymentTypeName, amountIncrement, paidAmount, paymentReference, comment, status, statusDate, bankAccountId, bankAccountName, bankAccountNumber, bankAccountIban, bankAccountSwiftBic, revokeUserId,revokeUserName, revokeComment

Success Response 200: List of InvoiceClearingRecords

{
  "data": [
    {
      "id": 0,
      "clearingId": 0,
      "clearingTypeId": 0,
      "clearingTypeCodeName": "string",
      "recordDate": "2021-03-11",
      "paymentTypeId": 0,
      "paymentTypeName": "string",
      "amountIncrement": 0,
      "paidAmount": 0,
      "paymentReference": "string",
      "comment": "string",
      "status": "string",
      "statusDate": "2021-03-11T10:35:26.862Z",
      "revokeUserId": "string",
      "revokeUserName": "string",
      "revokeComment": "string",
      "bankAccountId": 0,
      "bankAccountName": "string",
      "bankAccountNumber": "string",
      "bankAccountIban": "string",
      "bankAccountSwiftBic": "string"
    }
  ],
  "meta": {
    "pagination": {}
  }
}

Error Response: Unexpected Error (Default)

{
  "Code": 0,
  "Message": "string"
}
GET​/invoices/{invoiceid}/clearingrecords
Adds InvoiceClearingRecord.Up

Method Overview

Authorization privilege needed for this endpoint:finance-invoices.manage or finance-cust-invoices.manage or finance-supplier-invoices.manage or finance-netting-invoices.manage InvoiceClearing is created when Invoice status is changed to approved and payment status is set to 'open'. Approved supplier invoices with payment status 'on-hold' do not have clearing created. Clearing record for supplier invoice's are created when a supplier invoice is approved for payment. Invoice clearing record can not be added if invoice do not have Clearing created. When totalUnpaid is 0, invoice.paymentStatus is set to closed.

'clearingType type can be:' 1 - Invoice = amount increment, is auto-generated when invoice status is changed to approved 2 - Payment = paidAmount - must be <> 0 3 - Interest = amount increment - must be <> 0 4 - Reminder = amount increment - must be <> 0

'paymentType type can be:' 1 - Bank Transfer 2 - Credit Card 3 - Paypal 4 - Cash If paymentType is '1 - Bank Transfer' bankAccountId greater than 0 must be sent, in other cases it should not be sent or can be 0.

status is set to 'active' comment is set to name of clearingType if omitted recordDate must be in format 2006-01-02 If clearing record represents payment and invoice is document class code name is CUSTOMER_INVOICE payment will be automatically applied to billing balance.

Data Parameters

{
  "clearingTypeId": 0,
  "recordDate": "2021-03-11",
  "paymentTypeId": 0,
  "amountIncrement": 0,
  "paidAmount": 0,
  "paymentReference": "string",
  "comment": "string",
  "bankAccountId": 0
}

URL Parameters

Name Type Description
invoiceID (required) integer (path) Invoice id to get ClearingRecords
post data (required) object (body) If used status must be in (active,deleted). The recordDate must be in format YYYY-MM-DD

Success Response 200: InvoiceClearingRecord added

{
  "id": 0,
  "clearingId": 0,
  "clearingTypeId": 0,
  "clearingTypeCodeName": "string",
  "recordDate": "2021-03-11",
  "paymentTypeId": 0,
  "paymentTypeName": "string",
  "amountIncrement": 0,
  "paidAmount": 0,
  "paymentReference": "string",
  "comment": "string",
  "status": "string",
  "statusDate": "2021-03-11T10:11:27.765Z",
  "revokeUserId": "string",
  "revokeUserName": "string",
  "revokeComment": "string",
  "bankAccountId": 0,
  "bankAccountName": "string",
  "bankAccountNumber": "string",
  "bankAccountIban": "string",
  "bankAccountSwiftBic": "string"
}

Error Response: Unexpected Error (Default)

{
  "Code": 0,
  "Message": "string"
}
GET/invoices-by-number/{invoiceNumber}/clearingrecords
Returns a list od all InvoiceClearingRecords for given invoiceNumber.Up

Method Overview

Authorization privilege needed for this endpoint:finance-invoices.view optional: privilege used in this endpoint:finance-invoices-own.view List of all InvoiceClearingRecords that belongs to InvoiceClearing. InvoiceClearing is created when Invoice status is changed to approved and payment status is set to 'open'. By default, only clearing records with active status will be returned. This endpoint accepts query parameters for filtering described at URL Filtering Guidelines|. If Clearing records with other statuses should be returned, use query parameter status with operator 'in' and value containing comma separated list of statuses ( in(status)=active,canceled ). For the time being only active and canceled status are available as clearing record status value.

URL Parameters

Name Type Description
invoiceNumber (required) integer (path) Invoice number to get ClearingRecords. If invoice number contains slashes, it must be encoded. Example: For invoiceNumber = 00033/E/2021 value 00033%2FE%2F2021 should be in url as invoiceNumber parameter ( / = %2F ).
page_size integer (query) Page size. Default value : 10
page_number integer (query) Page number. Default value : 1
paging string (query) Paging options in form of &paging=page_num page_size eg. paging=1,10
operator(fieldName) string (query) Search criteria using following operators : isnull,isnotnull,isempty,isnotempty,eq,neq,startswith, contains,endswith, doesnotcontain, lt,lte,gt, gte, in, notin , between, notbetween and by following attributes: id, clearingId, clearingTypeId, clearingTypeCodeName, recordDate, paymentTypeId, paymentTypeName, amountIncrement, paidAmount, paymentReference, comment, status, statusDate, bankAccountId, bankAccountName, bankAccountNumber, bankAccountIban, bankAccountSwiftBic, revokeUserId, revokeUserName, revokeCommentif operator is one of isnull, isnotnull, isempty, isnotempty field value can be ommited.if operator is in or notin field value must be coma separated list of values. If operator is between or notbetween field value must be coma separated list oftwo values representing beginng and the end of range. Operator can be ommited and in that case it will be treated as operator is eq (Eg: fieldName=fieldValue) Example: startswith(clientName)=hor, starts with hor in field clientName if fieldName is q and operator is eq or ommited, field value will be used in general search across multiple attributes.
q string (query) General search criteria: available fields: status, paymentReference, comment, revokeUserId, revokeUserName, revokeComment, clearingTypeCodeName, paymentTypeName, bankAccountName, bankAccountNumber, bankAccountIban, bankAccountSwiftBic
sort string (query) Sort options in form of sort=-attribute1,attribute2,-attribute3 Sort available fields: id, clearingId, clearingTypeId, clearingTypeCodeName, recordDate, paymentTypeId, paymentTypeName, amountIncrement, paidAmount, paymentReference, comment, status, statusDate, bankAccountId, bankAccountName, bankAccountNumber, bankAccountIban, bankAccountSwiftBic, revokeUserId,revokeUserName, revokeComment

Success Response 200: List of InvoiceClearingRecords

{
  "data": [
    {
      "id": 0,
      "clearingId": 0,
      "clearingTypeId": 0,
      "clearingTypeCodeName": "string",
      "recordDate": "2021-03-11",
      "paymentTypeId": 0,
      "paymentTypeName": "string",
      "amountIncrement": 0,
      "paidAmount": 0,
      "paymentReference": "string",
      "comment": "string",
      "status": "string",
      "statusDate": "2021-03-11T10:50:05.688Z",
      "revokeUserId": "string",
      "revokeUserName": "string",
      "revokeComment": "string",
      "bankAccountId": 0,
      "bankAccountName": "string",
      "bankAccountNumber": "string",
      "bankAccountIban": "string",
      "bankAccountSwiftBic": "string"
    }
  ],
  "meta": {
    "pagination": {}
  }
}

Error Response: Unexpected Error (Default)

{
  "Code": 0,
  "Message": "string"
}
GET/invoices-by-number/{invoiceNumber}/clearingrecords
Add InvoiceClearingRecord.Up

Method Overview

Authorization privilege needed for this endpoint:finance-invoices.manage or finance-cust-invoices.manage or finance-supplier-invoices.manage or finance-netting-invoices.manage InvoiceClearing is created when Invoice status is changed to approved and payment status is set to 'open'. Approved supplier invoices with payment status 'on-hold' do not have clearing created. Clearing record for supplier invoice's are created when a supplier invoice is approved for payment. Invoice clearing record can not be added if invoice do not have Clearing created. When totalUnpaid is 0, invoice.paymentStatus is set to closed.

clearingType type can be: 1 - Invoice = amount increment, is auto-generated when invoice status is changed to approved 2 - Payment = paidAmount - must be <> 0 3 - Interest = amount increment - must be <> 0 4 - Reminder = amount increment - must be <> 0

'paymentType type can be:' 1 - Bank Transfer 2 - Credit Card 3 - Paypal 4 - Cash If paymentType is '1 - Bank Transfer' bankAccountId greater than 0 must be sent, in other cases it should not be sent or can be 0.

status is set to 'active' comment is set to name of clearingType if omitted recordDate must be in format 2006-01-02 If clearing record represents payment and invoice is document class code name is CUSTOMER_INVOICE payment will be automatically applied to billing balance.

Data Parameters

{
  "clearingTypeId": 0,
  "recordDate": "2021-03-11",
  "paymentTypeId": 0,
  "amountIncrement": 0,
  "paidAmount": 0,
  "paymentReference": "string",
  "comment": "string",
  "bankAccountId": 0
}

URL Parameters

Name Type Description
invoiceNumber (required) string (path) Invoice number to get ClearingRecords.If invoice number contains slashes, it must be encoded. Example: For invoiceNumber = 00033/E/2021 value 00033%2FE%2F2021 should be in url as invoiceNumber parameter ( / = %2F ).
post data (required) object (body) The recordDate must be in format YYYY-MM-DD

Success Response 200: InvoiceClearingRecord added

{
  "id": 0,
  "clearingId": 0,
  "clearingTypeId": 0,
  "clearingTypeCodeName": "string",
  "recordDate": "2021-03-11",
  "paymentTypeId": 0,
  "paymentTypeName": "string",
  "amountIncrement": 0,
  "paidAmount": 0,
  "paymentReference": "string",
  "comment": "string",
  "status": "string",
  "statusDate": "2021-03-11T10:56:49.498Z",
  "revokeUserId": "string",
  "revokeUserName": "string",
  "revokeComment": "string",
  "bankAccountId": 0,
  "bankAccountName": "string",
  "bankAccountNumber": "string",
  "bankAccountIban": "string",
  "bankAccountSwiftBic": "string"
}

Error Response: Unexpected Error (Default)

{
  "Code": 0,
  "Message": "string"
}
GET/invoices-by-uid/{invoiceUid}/clearingrecords
Returns a list of all InvoiceClearingRecords.Up

Method Overview

Authorization privilege needed for this endpoint:finance-invoices.view optional: privilege used in this endpoint:finance-invoices-own.view List of all InvoiceClearingRecords that belongs to InvoiceClearing. InvoiceClearing is created when Invoice status is changed to approved and payment status is set to 'open'. By default, only clearing records with active status will be returned. This endpoint accepts query parameters for filtering described at URL Filtering Guidelines If Clearing records with other statuses should be returned, use query parameter status with operator 'in' and value containing comma separated list of statuses ( in(status)=active,canceled ). For the time being only active and canceled status are available as clearing record status value.

URL Parameters

Name Type Description
invoiceUid (required) integer (path) Invoice uid to get ClearingRecords
page_size integer (query) Page size. Default value : 10
page_number integer (query) Page number. Default value : 1
paging string (query) Paging options in form of &paging=page_num page_size eg. paging=1,10
operator(fieldName) string (query) Search criteria using following operators : isnull,isnotnull,isempty,isnotempty,eq,neq,startswith, contains,endswith, doesnotcontain, lt,lte,gt, gte, in, notin , between, notbetween and by following attributes: id, clearingId, clearingTypeId, clearingTypeCodeName, recordDate, paymentTypeId, paymentTypeName, amountIncrement, paidAmount, paymentReference, comment, status, statusDate, bankAccountId, bankAccountName, bankAccountNumber, bankAccountIban, bankAccountSwiftBic, revokeUserId, revokeUserName, revokeComment If operator is one of isnull,isnotnull,isempty,isnotempty field value can be ommited. If operator is in or notin field value must be coma separated list of values. If operator is between or notbetween field value must be coma separated list of two values representing beginng and the end of range. Operator can be ommited and in that case it will be treated as operator is eq (Eg: fieldName=fieldValue) Example: startswith(clientName)=hor, starts with hor in field clientName if fieldName is q and operator is eq or ommited, field value will be used in general search across multiple attributes.
q string (query) General search criteria: available fields: status, paymentReference, comment, revokeUserId, revokeUserName, revokeComment, clearingTypeCodeName, paymentTypeName, bankAccountName, bankAccountNumber, bankAccountIban, bankAccountSwiftBic'
sort string (query) Sort options in form of sort=-attribute1,attribute2,-attribute3 Sort available fields: id, clearingId, clearingTypeId, clearingTypeCodeName, recordDate, paymentTypeId, paymentTypeName, amountIncrement, paidAmount, paymentReference, comment, status, statusDate, bankAccountId, bankAccountName, bankAccountNumber, bankAccountIban, bankAccountSwiftBic, revokeUserId,revokeUserName, revokeComment

Success Response 200: List of InvoiceClearingRecords

{
  "data": [
    {
      "id": 0,
      "clearingId": 0,
      "clearingTypeId": 0,
      "clearingTypeCodeName": "string",
      "recordDate": "2021-03-11",
      "paymentTypeId": 0,
      "paymentTypeName": "string",
      "amountIncrement": 0,
      "paidAmount": 0,
      "paymentReference": "string",
      "comment": "string",
      "status": "string",
      "statusDate": "2021-03-11T12:19:07.845Z",
      "revokeUserId": "string",
      "revokeUserName": "string",
      "revokeComment": "string",
      "bankAccountId": 0,
      "bankAccountName": "string",
      "bankAccountNumber": "string",
      "bankAccountIban": "string",
      "bankAccountSwiftBic": "string"
    }
  ],
  "meta": {
    "pagination": {}
  }
}

Error Response: Unexpected Error (Default)

{
  "Code": 0,
  "Message": "string"
}
POST​/invoices-by-uid/{invoiceUid}/clearingrecords
Adds InvoiceClearingRecord.Up

Method Overview

Authorization privilege needed for this endpoint:finance-invoices.manage or finance-cust-invoices.manage or finance-supplier-invoices.manage or finance-netting-invoices.manage InvoiceClearing is created when Invoice status is changed to approved and payment status is set to 'open'. Approved supplier invoices with payment status 'on-hold' do not have clearing created. Clearing record for supplier invoice's are created when a supplier invoice is approved for payment. Invoice clearing record can not be added if invoice do not have Clearing created. When totalUnpaid is 0, invoice.paymentStatus is set to closed.

'clearingType type can be:' 1 - Invoice = amount increment, is auto-generated when invoice status is changed to approved 2 - Payment = paidAmount - must be <> 0 3 - Interest = amount increment - must be <> 0 4 - Reminder = amount increment - must be <> 0

'paymentType type can be:' 1 - Bank Transfer 2 - Credit Card 3 - Paypal 4 - Cash If paymentType is '1 - Bank Transfer' bankAccountId greater than 0 must be sent, in other cases it should not be sent or can be 0.

status is set to 'active' comment is set to name of clearingType if omitted recordDate must be in format 2006-01-02 If clearing record represents payment and invoice document class code name is CUSTOMER_INVOICE payment will be automatically applied to billing balance.

Data Parameters

{
  "clearingTypeId": 0,
  "recordDate": "2021-03-11",
  "paymentTypeId": 0,
  "amountIncrement": 0,
  "paidAmount": 0,
  "paymentReference": "string",
  "comment": "string",
  "bankAccountId": 0
}

URL Parameters

Name Type Description
invoiceUID (required) integer (path) Invoice uid to get ClearingRecords
post data (required) object (body) If used status must be in (active,deleted). The recordDate must be in format YYYY-MM-DD

Success Response 200: InvoiceClearingRecord added

{
  "id": 0,
  "clearingId": 0,
  "clearingTypeId": 0,
  "clearingTypeCodeName": "string",
  "recordDate": "2021-03-11",
  "paymentTypeId": 0,
  "paymentTypeName": "string",
  "amountIncrement": 0,
  "paidAmount": 0,
  "paymentReference": "string",
  "comment": "string",
  "status": "string",
  "statusDate": "2021-03-11T12:26:30.255Z",
  "revokeUserId": "string",
  "revokeUserName": "string",
  "revokeComment": "string",
  "bankAccountId": 0,
  "bankAccountName": "string",
  "bankAccountNumber": "string",
  "bankAccountIban": "string",
  "bankAccountSwiftBic": "string"
}

Error Response: Unexpected Error (Default)

{
  "Code": 0,
  "Message": "string"
}
GET​/payment-types
Returns a list of Payment TypesUp

Method Overview

Authorization privilege needed for this endpoint:finance-invoices.view optional: privilege used in this endpoint:finance-invoices-own.view List of all available payment types. This endpoint accepts query parameters for filtering described at URL Filtering Guidelines|.

URL Parameters

Name Type Description
page_size integer (query) Page size. Default value : 10
page_number integer (query) Page number. Default value : 1
paging string (query) Paging options in form of &paging=page_num page_size eg. paging=1,10
operator(fieldName) string (query) Search criteria using following operators : isnull,isnotnull,isempty,isnotempty,eq,neq,startswith, contains,endswith, doesnotcontain, lt,lte,gt, gte, in, notin , between, notbetween and by following attributes: id, name, status, statusDt if operator is one of isnull,isnotnull,isempty,isnotempty field value can be ommited. if operator is in or notin field value must be coma separated list of values. if operator is between or notbetween field value must be coma separated list of two values representing beginng and the end of range. Operator can be ommited and in that case it will be treated as operator is eq (Eg: fieldName=fieldValue) Example:startswith(clientName)=hor, starts with hor in field clientName if fieldName is q and operator is eq or ommited, field value will be used in general search across multiple attributes.
q string (query) 'general search criteria: available fields: name, status
sort string (query) sort options in form of sort=-attribute1,attribute2,-attribute3 Sort available fields: id, name, status, statusDt

Success Response 200: List of Payment Types

{
  "data": [
    {
      "id": 0,
      "name": "string",
      "status": "active",
      "statusDt": "2021-03-11T12:29:43.054Z"
    }
  ],
  "meta": {
    "pagination": {}
  }
}

Error Response: Unexpected Error (Default)

{
  "Code": 0,
  "Message": "string"
}
GET/platform-owner-bank-accounts
Returns a List of bank accounts of platform owner.Up

Method Overview

Authorization privilege needed for this endpoint: biz-core.view Returns list of bank accounts of platform owner.This endpoint accepts query parameters for filtering described in URL Filtering Guidelines|.

URL Parameters

Name Type Description
all string (query) Return all data for given criteria. Available values : yes, no. Default value : no.
page_size integer (query) Page size. Default value : 10
page_number integer (query) Page number. Default value : 1
paging string (query) Paging options in form of &paging=page_num page_size eg. paging=1,10
operator(fieldName) string (query) Search criteria using following operators : isnull,isnotnull,isempty,isnotempty,eq,neq,startswith, contains,endswith, doesnotcontain, lt,lte,gt, gte, in, notin, between, notbetweenand by following attributes: id, bizPartnerId, bizPartnerName, bizPartnerBriefName,bizBankId, bizBankName, currency, currencyCode, currencyName,accountNumber, iban, isDefaultPerCurrency, status, name, swiftBic, accountType, countryNameif operator is one of isnull,isnotnull,isempty,isnotempty field value can be ommited. if operator is in or notin field value must be coma separated list of values.if operator is between or notbetween field value must be coma separated list oftwo values representing beginng and the end of range. Operator can be ommited and in that case it will be treated as operator is eq (Eg: fieldName=fieldValue)Example: startswith(clientName)=hor, starts with hor in field clientName if fieldName is q and operator is eq or ommited, field value will be used in general search across multiple attributes.

Success Response 200: List of bank accounts

{
  "data": [
    {
      "id": 0,
      "bizPartnerId": 0,
      "bizPartnerName": "string",
      "bizPartnerBriefName": "string",
      "bizBankId": 0,
      "bizBankName": "string",
      "currency": 0,
      "currencyCode": "string",
      "currencyName": "string",
      "accountNumber": "string",
      "iban": "string",
      "isDefaultPerCurrency": "yes",
      "status": "active",
      "statusDt": "2021-03-11T12:56:00.268Z",
      "name": "string",
      "swiftBic": "string",
      "accountType": "account number",
      "countryName": "string"
    }
  ],
  "meta": {
    "pagination": {
      "total": 0,
      "count": 0,
      "perPage": 0,
      "currentPage": 0,
      "totalPages": 0
    }
  }
}

Error Response: Unexpected Error (Default)

{
  "Code": 0,
  "Message": "string"
}