The Ascora Accounting API allows businesses to automate the transfer of invoices and payments between Ascora and their accounting systems, ensuring seamless financial reconciliation. This eliminates the need for manual data entry, reducing errors and saving time.
By leveraging the API functions, businesses can:
This guide provides an in-depth overview of API functions, covering authentication, invoice and payment retrieval, and best practices for integration.
Overview
This document provides a high level detail on the API functions available for Accounts Integration. A separate document exists for details on the Enquiry submission API.
The general process is that the InvoiceDetails are retrieved up to a specified date (for example Invoices may have been reviewed up to Friday 14^{th} June. Once the invoices are processed successfully, the MarkInvoice function allows the calling system to record that the specified invoices have been successfully pushed to the Accounting System. Similarly Payments can be retrieved and processed then marked as sent to Accounts.
API Connection
Connection to the Ascora is achieved utilising Basic Authentication with an Ascora Account. This must be added to the headers in the HTTP Get/Post operations.
Invoice Functions
| [Route("/invoicedetails")] [Route("/invoicedetails/{CompanyId}")] public classInvoiceDetails : InvoiceDetailResponse { public DateTime InvoicesPriorToDate { get; set; } } | Retrieves all Invoices prior to the specified Date which have not yet been marked as sent to the Accounting System. |
|---|---|
|
[Route("/MarkInvoice", "POST")]
public classMarkInvoice
{
public List | Marks the specified Invoices as having been successfully pushed to the Accounting System. |
Invoice Response Data
This represents the data returned from the Invoice Details request.
public class InvoiceDetailResponse
{
public List
Invoice Details
public class InvoiceHeader { public Guid Id { get; set; } public DateTime InvoiceDate { get; set; }
public DateTime InvoiceDueDate { get; set; }
public string InvoiceNumber { get; set; }
public decimal AmountExTax { get; set; } public decimal AdjustedAmountExTax { get; set; }
public decimal Tax { get; set; } public bool SentToMyob { get; set; }
public Guid? BillingCustomerId { get; set; }
public string CompanyName { get; set; }
public string ContactFirstName { get; set; }
public string ContactLastName { get; set; }
public string EmailAddress { get; set; }
public string Phone { get; set; } public string Mobile { get; set; }
public string Fax { get; set; } public string Description { get; set; }
public string JobNumber { get; set; }
public string LeadSource { get; set; } public string StreetAddressLine1 { get; set; }
public string StreetAddressLine2 { get; set; }
public string StreetAddressSuburb { get; set; }
public string StreetAddressCountry { get; set; }
public string StreetAddressPostcode { get; set; }
public string StreetAddressState { get; set; }
public string BillingAddressLine1 { get; set; }
public string BillingAddressLine2 { get; set; }
public string BillingAddressSuburb { get; set; }
public string BillingAddressCountry { get; set; }
public string BillingAddressPostcode { get; set; }
public string BillingAddressState { get; set; }
public string PurchaseOrderNumber { get; set; }
public List
Invoice Detail Lines
public class InvoiceDetailLine { public string PartNumber { get; set; }
public string Description { get; set; }
public decimal Quantity { get; set; }
///
///
///
Payment Functions
| [Route("/payments")] public classPayments { public List<Payment> Results { get; set; } } | Retrieves all Payments that have not yet been sent to the Accounting Package but are linked to Invoices that are already marked as sent. |
|---|---|
|
[Route("/MarkPayment", "POST")]
public classMarkPayment
{
public List | Marks the specified Payments as having been successfully pushed to the Accounting System. |
Payment Details
public class Payment { public Guid PaymentId { get; set; }
public DateTime PaymentDate { get; set; }
public decimal PaymentAmount { get; set; }
public string InvoiceNumber { get; set; }
public DateTime InvoiceDate { get; set; }
public string CompanyName { get; set; } public string ContactFirstName { get; set; } public string ContactLastName { get; set; } }
Got a question?
Submit an Idea 💡 Go to Ideas Portal