Skip to main content
Skip table of contents

Reference Data


Create Reference Data

The following endpoint URL style is used:

  • https://{server}/{instance name}/wsapi/2.5/Reference/{summary view}/{details view}

  • e.g. https://www.aqilla.net/ InstanceName/wsapi/2.5/Reference/Customers/Customer Edit

Create reference data - example

API Request

XML
PUT https://www.aqilla.net/InstanceName/wsapi/2.5/Reference/Customers/Customer Edit
Content-Type: application/xml

Body

XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dataentry>
  <entity>
    <attribute name="Customer Code">LUK001</attribute>
    <attribute name="Customer Name">Lukoil UK Ltd</attribute>
    <attribute name="Address Line 1">The House</attribute>
    <attribute name="Address Line 2">The Street</attribute>
    <attribute name="Address Line 3">The Town</attribute>
    <attribute name="Address Line 4">The County</attribute>
    <attribute name="Post Code">RH5 6HD</attribute>
    <attribute name="Country">UK</attribute>
    <attribute name="Web">lukoil.com</attribute>
    <attribute name="Invoice Recipient Email">ivan.bloggs@lukoil.com</attribute>
    <attribute name="Notes">Just free text</attribute>
    <attribute name="Account Code"></attribute>
  </entity>
</dataentry>

Response

XML
200 OK

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dataentry>
    <entity sguid="eb03oqppz2tEk9Q9aJtzqJlzgP">
        <attachments/>
    </entity>
    <subordinates/>
</dataentry>

Create reference subordinate data

Not currently supported by Aqilla API.

Attach file to reference data

See: Attachments


Read Reference Data

Reference data can be read from summary views - e.g. Customers - or detail views (e.g. Customer Edit).

Summary Views

The URL in this case can be qualified using:

  • page

  • pageSize

thus:

  • https://www.aqilla.net/ InstanceName/wsapi/2.5/Reference/Items?pageSize=20&page=2

Example: Customers List

API Request

XML
GET https://www.aqilla.net/InstanceName/wsapi/2.5/Reference/Customers

Response

XML
200 OK

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dataretrieval totalPages="1" pageSize="1000" page="1" callTimestamp="20160920133407915">
  <entities>
    <entity>
      <returnattribute name="Customer Name">Biomatic Choice</returnattribute>
      <returnattribute ubk="1" name="Customer Code">BIO/001</returnattribute>
      <returnattribute name="DR A/C">D00/725</returnattribute>
      <returnattribute name="Salesperson">John Stuart Mill</returnattribute>
      <returnattribute name="Address Line 1">12, Main St</returnattribute>
      <returnattribute name="Address Line 2">Awsworth</returnattribute>
      <returnattribute name="Address Line 3">Nottingham</returnattribute>
      <returnattribute name="Post Code">NG16 3RT</returnattribute>
      <returnattribute ubk="2" name="Old Code">BIO71878</returnattribute>
      <attachments/>
    </entity>
    <entity>
      <returnattribute name="Customer Name">Callan Barnebys</returnattribute>
      <returnattribute ubk="1" name="Customer Code">CAL001</returnattribute>
      <returnattribute name="DR A/C">D00727</returnattribute>
      <returnattribute name="Salesperson">Emanuel Kant</returnattribute>
      <returnattribute name="Address Line 1">Unit 9, McBride Avenue</returnattribute>
      <returnattribute name="Address Line 2">Kirkintilloch</returnattribute>
      <returnattribute name="Address Line 3">Glasgow</returnattribute>
      <returnattribute name="Post Code">G66 2XS</returnattribute>
      <returnattribute ubk="2" name="Old Code">CAL89288</returnattribute>
      <attachments/>
    </entity>
    <entity>
      <returnattribute name="Customer Name">Canford Services</returnattribute>
      <returnattribute ubk="1" name="Customer Code">CAN001</returnattribute>
      <returnattribute name="DR A/C">D00722</returnattribute>
      <returnattribute name="Salesperson">John Stuart Mill</returnattribute>
      <returnattribute name="Address Line 1">Ashford Road</returnattribute>
      <returnattribute name="Address Line 2">Kingsnorth</returnattribute>
      <returnattribute name="Address Line 3">Ashford</returnattribute>
      <returnattribute name="Post Code">TN26 1LJ</returnattribute>
      <returnattribute ubk="2" name="Old Code">CAN12345</returnattribute>
      <attachments/>
    </entity>
    <entity>
      <returnattribute name="Customer Name">Capitella</returnattribute>
      <returnattribute ubk="1" name="Customer Code">CAP001</returnattribute>
      <returnattribute name="DR A/C">D00721</returnattribute>
      <returnattribute name="Salesperson">John Stuart Mill</returnattribute>
      <returnattribute name="Address Line 1">71, Denmark St</returnattribute>
      <returnattribute name="Address Line 2">Bedford</returnattribute>
      <returnattribute name="Address Line 3">Bedfordshire</returnattribute>
      <returnattribute name="Post Code">MK40 9TG</returnattribute>
      <returnattribute ubk="2" name="Old Code">CAP89765</returnattribute>
      <attachments/>
    </entity>
    <entity>
      <returnattribute name="Customer Name">Guilders Medicals North</returnattribute>
      <returnattribute ubk="1" name="Customer Code">GUI001</returnattribute>
      <returnattribute name="DR A/C">D00730</returnattribute>
      <returnattribute name="Salesperson">René Descartes</returnattribute>
      <returnattribute name="Address Line 1">14, Birchall St</returnattribute>
      <returnattribute name="Address Line 2">Liverpool</returnattribute>
      <returnattribute name="Address Line 3">Merseyside</returnattribute>
      <returnattribute name="Post Code">L20 8PD</returnattribute>
      <returnattribute ubk="2" name="Old Code">GUI67520</returnattribute>
      <attachments/>
    </entity>
    <entity>
      <returnattribute name="Customer Name">Guilders Medicals South</returnattribute>
      <returnattribute ubk="1" name="Customer Code">GUI002</returnattribute>
      <returnattribute name="DR A/C">D00730</returnattribute>
      <returnattribute name="Salesperson">René Descartes</returnattribute>
      <returnattribute name="Address Line 1">8, Victoria Rd</returnattribute>
      <returnattribute name="Address Line 2">St.Philips</returnattribute>
      <returnattribute name="Address Line 3">Bristol</returnattribute>
      <returnattribute name="Post Code">BS2 0UV</returnattribute>
      <returnattribute ubk="2" name="Old Code">GUI89731</returnattribute>
      <attachments/>
    </entity>
    <entity>
      <returnattribute name="Customer Name">Ittacus Link</returnattribute>
      <returnattribute ubk="1" name="Customer Code">ITT001</returnattribute>
      <returnattribute name="DR A/C">D00728</returnattribute>
      <returnattribute name="Salesperson">Emanuel Kant</returnattribute>
      <returnattribute name="Address Line 1">1043 W Pike Street</returnattribute>
      <returnattribute name="Address Line 2">Seattle</returnattribute>
      <returnattribute name="Post Code">WA 98122</returnattribute>
      <returnattribute ubk="2" name="Old Code">ITT67511</returnattribute>
      <attachments/>
    </entity>
    <entity>
      <returnattribute name="Customer Name">Lukoil UK Ltd</returnattribute>
      <returnattribute ubk="1" name="Customer Code">LUK001</returnattribute>
      <returnattribute name="Salesperson">Emanuel Kant</returnattribute>
      <returnattribute name="Address Line 1">The House</returnattribute>
      <returnattribute name="Address Line 2">The Street</returnattribute>
      <returnattribute name="Address Line 3">The Town</returnattribute>
      <returnattribute name="Post Code">RH5 6HD</returnattribute>
      <attachments/>
    </entity>
    <entity>
      <returnattribute name="Customer Name">Merrill Page</returnattribute>
      <returnattribute ubk="1" name="Customer Code">MER001</returnattribute>
      <returnattribute name="DR A/C">D00720</returnattribute>
      <returnattribute name="Salesperson">René Descartes</returnattribute>
      <returnattribute name="Address Line 1">12, Westhorp</returnattribute>
      <returnattribute name="Address Line 2">Kings Sutton</returnattribute>
      <returnattribute name="Address Line 3">Banbury</returnattribute>
      <returnattribute name="Post Code">OX17 3EF</returnattribute>
      <returnattribute ubk="2" name="Old Code">MER76599</returnattribute>
      <attachments/>
    </entity>
    <entity>
      <returnattribute name="Customer Name">Micro Stone</returnattribute>
      <returnattribute ubk="1" name="Customer Code">MIC001</returnattribute>
      <returnattribute name="DR A/C">D00723</returnattribute>
      <returnattribute name="Salesperson">John Stuart Mill</returnattribute>
      <returnattribute name="Address Line 1">67 Great Eastern Street</returnattribute>
      <returnattribute name="Address Line 2">London</returnattribute>
      <returnattribute name="Post Code">EC2A 3HZ</returnattribute>
      <returnattribute ubk="2" name="Old Code">MIC65330</returnattribute>
      <attachments/>
    </entity>
    <entity>
      <returnattribute name="Customer Name">Nitia Communications</returnattribute>
      <returnattribute ubk="1" name="Customer Code">NIT001</returnattribute>
      <returnattribute name="DR A/C">D00724</returnattribute>
      <returnattribute name="Salesperson">Emanuel Kant</returnattribute>
      <returnattribute name="Address Line 1">Avda. de la Libertad</returnattribute>
      <returnattribute name="Address Line 2">23 Estepona</returnattribute>
      <returnattribute name="Post Code">29680</returnattribute>
      <returnattribute ubk="2" name="Old Code">NIT77328</returnattribute>
      <attachments/>
    </entity>
    <entity>
      <returnattribute name="Customer Name">Reath Financials</returnattribute>
      <returnattribute ubk="1" name="Customer Code">REA001</returnattribute>
      <returnattribute name="DR A/C">D00729</returnattribute>
      <returnattribute name="Salesperson">John Stuart Mill</returnattribute>
      <returnattribute name="Address Line 1">15 Benridge Park</returnattribute>
      <returnattribute name="Address Line 2">Holyrood Close</returnattribute>
      <returnattribute name="Address Line 3">Poole</returnattribute>
      <returnattribute name="Post Code">BH17 7BD</returnattribute>
      <returnattribute ubk="2" name="Old Code">REA56411</returnattribute>
      <attachments/>
    </entity>
    <entity>
      <returnattribute name="Customer Name">Sloughton Sound</returnattribute>
      <returnattribute ubk="1" name="Customer Code">SLO001</returnattribute>
      <returnattribute name="DR A/C">D00726</returnattribute>
      <returnattribute name="Salesperson">René Descartes</returnattribute>
      <returnattribute name="Address Line 1">Unit 12, Neville Rd</returnattribute>
      <returnattribute name="Address Line 2">Croydon</returnattribute>
      <returnattribute name="Address Line 3">Surrey</returnattribute>
      <returnattribute name="Post Code">CR0 2FD</returnattribute>
      <returnattribute ubk="2" name="Old Code">SLO89742</returnattribute>
      <attachments/>
    </entity>
  </entities>
</dataretrieval>

Customer Detail View

API Request

XML
GET https://www.aqilla.net/InstanceName/wsapi/2.5/Reference/Customers/Customer Edit/CAP001

Response

XML
200 OK

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dataentry>
  <entity sguid="R4GXzKwJz2S6X1BZ8wCLA10ebW">
    <returnattribute ubk="1" name="Customer Code">CAP001</returnattribute>
    <returnattribute name="Customer Name">Capitella</returnattribute>
    <returnattribute name="Account Code">D00721(Capitella)</returnattribute>
    <returnattribute name="Address Line 1">71, Denmark St</returnattribute>
    <returnattribute name="Address Line 2">Bedford</returnattribute>
    <returnattribute name="Address Line 3">Bedfordshire</returnattribute>
    <returnattribute name="Post Code">MK40 9TG</returnattribute>
    <returnattribute name="Country">United Kingdom</returnattribute>
    <returnattribute name="Salesperson">John Stuart Mill</returnattribute>
    <returnattribute ubk="2" name="Old Code">CAP89765</returnattribute>
    <attachments/>
  </entity>
  <subordinates>
    <entity sguid="kPAkkzlIkLvz8bRiM7QXyL5AjY">
      <returnattribute name="Position">Main</returnattribute>
      <returnattribute name="Name"> </returnattribute>
      <returnattribute name="Telephone">01234 295141</returnattribute>
      <returnattribute name="Fax">01234 295142</returnattribute>
      <attachments/>
    </entity>
  </subordinates>
</dataentry>

An entity can be retrieved by stating its PUBK as the last element of the URL thus:

  • https://www.aqilla.net/ InstanceName/wsapi/2.5/Reference/Customers/Customer Edit/CAP001

An entity can be retrieved using itsGUIDthus:

  • https://www.aqilla.net/ InstanceName/wsapi/2.5/3yrv7wO6oHxfVAN8ekZd

Errors

The 404 Not Found error is returned if the requested entity is not found or the client lacks permissions to access it.

The 409 Conflict error is returned if more than one entity exists with the given PUBK


Update Reference Data

Introduction

The following endpoint URL styles are used:

  • https://{server}/{instance name}/wsapi/2.5/Reference/{summary view}/{details view}/(UBK}

  • e.g. https://www.aqilla.net/ InstanceName/wsapi/2.5/Reference/Customers/Customer Edit/MIC001

  • https://{server}/{instance name}/wsapi/2.5/{GUID}

  • e.g. https://www.aqilla.net/ InstanceName/wsapi/2.5/jd9873gi7djh77y44

Update reference data - example

API Request

XML
POST https://www.aqilla.net/InstanceName/wsapi/2.5/Reference/Customers/Customer Edit/MIC001
Content-Type: application/xml

Body

XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dataentry>
  <entity>
    <attribute name="Invoice Recipient Email">fred.lea@mic.com</attribute>
  </entity>
</dataentry>

Response

XML
200 OK

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dataentry>
    <entity sguid="yrv7wO6wJgtxgW1RB6i6AN8ekZ">
        <attachments/>
    </entity>
</dataentry

Delete Reference Data

The following endpoint URL styles are used:

  • https://{server}/{instance name}/wsapi/2.5/Reference/{summary view}/{details view}/{UBK}

  • e.g. https://www.aqilla.net/ InstanceName/wsapi/2.5/Reference/Customers/Customer Edit/LUK001

  • https://{server}/{instance name}/wsapi/2.5/{GUID}

  • e.g. https://www.aqilla.net/ InstanceName/wsapi/2.5/uhs876s86gw767sg6

Only a directly referenceable entity - i.e. one that can be addressed by a UBK or GUID - can be deleted. Deletion of subordinate entities (such as document lines) is considered modification of their parent entity and this may be introduced in a future version. Contact your Aqilla consultant or account manager if you think you need this.

Standard Aqilla deletion rules apply - e.g. you can't delete an account that has transactions.

Entities are deleted by sending a DELETE request to a URL uniquely identifying the entity. If is is a container entity, subordinate entities are also deleted. Attachments are deleted together with the entities they were attached to.

If the entity was found and successfully deleted, 204 No Content is returned with no body. If the entity was found but could not be deleted (typically because of it being read only or the user lacking the necessary permissions) 409 Conflict is returned. If the entity was not found, 404 Not Found is returned. In the two last cases the encoding of the response body  is application/xml.

Delete reference data - example

API Request

CODE
DELETE https://www.aqilla.net/InstanceName/wsapi/2.5/Reference/Customers/Customer Edit/LUK001

Response

XML
204 No Content

The following reference data can be created using the Aqilla API:

  • Creditor Account

  • Customer

  • Debtor Account

  • General Ledger Account

  • Item

  • Project

  • Supplier


Example of using the API for Personnel Records: 

Get one Person:

GET https://www.aqilla.net/InstanceName/wsapi/2.5/Reference/Personnel/Person Edit/{Person Code}

e.g.

XML
GET https://www.aqilla.net/InstanceName/wsapi/2.5/Reference/Personnel/Person Edit/PER001

Get all Persons:

XML
GET https://www.aqilla.net/InstanceName/wsapi/2.5/Reference/Personnel/Person Edit 

Create a Person (Person Name, Person Code and Email address are mandatory attributes)/

Create a Person

XML
PUT https://www.aqilla.net/instance/wsapi/2.5/Reference/Personnel/Person Edit/NPC
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<dataentry>
    <entity>
        <attribute name="Person Name">New Person</attribute>
        <attribute name="Person Code">NPC001</attribute>
        <attribute name="Account">E0001(Jim Browne)</attribute>
        <attribute name="Department">Sales</attribute>
        <attribute name="Rate">50.00</attribute>
        <attribute name="Address Line 1">12 Ashley Road</attribute>
        <attribute name="NI Number">123456-777</attribute>
        <attribute name="Address Line 2">Walton On Thames</attribute>
        <attribute name="Mileage Rate">0.35</attribute>
        <attribute name="Address Line 3">Surrey</attribute>
        <attribute name="Phone">111222333</attribute>
        <attribute name="Address Line 4">Line 4 Address</attribute>
        <attribute name="Fax">44444444</attribute>
        <attribute name="Post Code">KT12 1HS</attribute>
        <attribute name="Email address">jim.browne@ngeographica.org</attribute>
        <attribute name="Country">United Kingdom</attribute>
        <attribute name="Period From">0</attribute>
        <attribute name="Period To">2</attribute>        
    </entity>
</dataentry>

Update a Person:

XML
POST https://www.aqilla.net/instance/wsapi/2.5/Reference/Personnel/Person Edit/NPC
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<dataentry>
    <entity>
        <attribute name="Email address">jim.browne@example.com</attribute>
    </entity>
</dataentry>

Delete a Person:

XML
DELETE https://www.aqilla.net/instance/wsapi/2.5/Reference/Personnel/Person Edit/NPC
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.