Overview

How to insert and update for each major entity.

Post tasks to the following URL

https://[WSUrl]/tasks?wsccesskey=[WSAccessKey]&fileuid=[FileUid]

substituting [WSUrl], [WSAccessKey], [FileUid] with valid values.

When inserting an entity (submitting an insert task)

DO NOT specify the value of the uid element or set the value to 0.

When updating an entity (submitting an update task)

Provide the entity uid and lastUpdatedUid values. The LastUpdatedUid value identifies when the record was last updated. We require this value to be passed on update to ensure that no one updates the record since your last read operation. Make sure you include all elements as not including an element will lead to the existing value being cleared.

insertContact and updateContact

Summary

Inserts / updates Contact.

Field Type Max. Length Required? Notes
contact Contact Y The Contact to be inserted / updated.

Example: Insert Contact

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0" encoding="utf-8"?>
<tasks>
  <insertContact>
    <contact uid="0">
      <salutation>Mr.</salutation>
      <givenName>John</givenName>
      <familyName>Smith</familyName>
      <organisationName>Saasy.tv</organisationName>
      <organisationAbn>777888999</organisationAbn>
      <organisationPosition>Director</organisationPosition>
      <email>john.smith@saasy.tv</email>
      <mainPhone>02 9999 9999</mainPhone>
      <mobilePhone>0444 444 444</mobilePhone>
      <contactID>XYZ123</contactID>
      <tags>Gold Prospect, Film</tags>
      <postalAddress>
        <street>3/33 Victory Av</street>
        <city>North Sydney</city>
        <state>NSW</state>
        <country>Australia</country>
      </postalAddress>
      <otherAddress>
        <street>111 Elizabeth street</street>
        <city>Sydney</city>
        <state>NSW</state>
        <country>Australia</country>
      </otherAddress>
      <isActive>true</isActive>
      <acceptDirectDeposit>false</acceptDirectDeposit>
      <directDepositAccountName>John Smith</directDepositAccountName>
      <directDepositBsb>000000</directDepositBsb>
      <directDepositAccountNumber>12345678</directDepositAccountNumber>
      <acceptCheque>false</acceptCheque>
      <customField1>This is custom field 1</customField1>
      <customField2>This is custom field 2</customField2>
      <twitterID>Contact twitter id</twitterID>
      <skypeID>Contact skype id</skypeID>
    </contact>
  </insertContact>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
  <tasksResponse>
    <insertContactResult insertedEntityUid="22729" lastUpdatedUid="AAAAAAAVA7s=" />
  </tasksResponse>

Example: Update Contact

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?xml version="1.0" encoding="utf-8"?>
<tasks>
 <updateContact>
  <contact uid="22730" lastUpdatedUid="AAAAAAAVA8A=">
    <salutation>Mrs.</salutation>
    <givenName>Mary</givenName>
    <familyName>Smith</familyName>
    <organisationName>Mr. and Mrs. Smith</organisationName>
    <organisationAbn>67 093 453 886</organisationAbn>
    <organisationWebsite />
    <organisationPosition>Director</organisationPosition>
    <email>mary.smith@mrandmrssmith.com.au</email>
    <mainPhone>02 4444 4444</mainPhone>
    <homePhone />
    <mobilePhone>0444 444 444</mobilePhone>
    <tags>Customer, IT</tags>
    <postalAddress />
    <otherAddress />
    <isActive>true</isActive>
   </contact>
 </updateContact>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
<updateContactResult updatedEntityUid="22730" lastUpdatedUid="AAAAAAAVA8E=" />
</tasksResponse>

insertTransactionCategory and updateTransactionCategory

Summary

Inserts / updates Account

Field Type Max. Length Required? Notes
transactionCategory TransactionCategory Y The TransactionCategory to be inserted / updated.

Example: Insert Account

Request content:

1
2
3
4
5
6
7
8
9
10
<?xml version="1.0" encoding="utf-8"?>
<tasks>
 <insertTransactionCategory>
  <transactionCategory uid="0">
   <type>Income</type>
   <name>Consulting Fees</name>
   <isActive>true</isActive>
  </transactionCategory>
 </insertTransactionCategory>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
 <insertTransactionCategoryResult insertedEntityUid="10521" lastUpdatedUid="AAAAAAAVA8g=" />
</tasksResponse>

Example: Update Account

Request content:

1
2
3
4
5
6
7
8
9
10
<?xml version="1.0" encoding="utf-8"?>
<tasks>
 <updateTransactionCategory>
  <transactionCategory uid="10521" lastUpdatedUid="AAAAAAAVA8g=">
   <type>Income</type>
   <name>6a91110607244ef - For Testing Update</name>
   <isActive>true</isActive>
  </transactionCategory>
 </updateTransactionCategory>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
 <updateTransactionCategoryResult updatedEntityUid="10522" lastUpdatedUid="AAAAAAAVA8o=" />
</tasksResponse>

insertBankAccount and updateBankAccount

Summary

Inserts / updates Bank Account.

Field Type Max. Length Required? Notes
bankAccount BankAccount Y The BankAccount to be inserted / updated.

Example: Insert Bank Account

NOTE: The displayName element is required.

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
<?xml version="1.0" encoding="utf-8"?>
<tasks>
 <insertBankAccount>
   <bankAccount uid="0">
   <type>Asset</type>
   <name>CBA</name>
   <isActive>true</isActive>
   <displayName>CBA</displayName>
   <bsb>111-111</bsb>
   <accountNumber>12345-6789</accountNumber>
  </bankAccount>
 </insertBankAccount>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
<insertBankAccountResult insertedEntityUid="10523" lastUpdatedUid="AAAAAAAVA8s=" />
</tasksResponse>

Example: Update Bank Account

NOTE: The displayName element is required.

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
<?xml version="1.0" encoding="utf-8"?>
<tasks>
 <updateBankAccount>
  <bankAccount uid="10523" lastUpdatedUid="AAAAAAAVA8s=">
    <type>Liability</type>
    <name>CBA</name>
    <isActive>true</isActive>
    <displayName>CBA 12345</displayName>
    <bsb>111-111</bsb>
    <accountNumber>12345-6789</accountNumber>
  </bankAccount>
 </updateBankAccount>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
<updateBankAccountResult updatedEntityUid="10524" lastUpdatedUid="AAAAAAAVA80=" />
</tasksResponse>

insertInventoryItem and updateInventoryItem

Summary

Inserts / updates Inventory Item.

Field Type Max. Length Required? Notes
inventoryItem InventoryItem Y The InventotyItem to be inserted / updated.

Example: Insert Inventory Item

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?xml version="1.0" encoding="utf-8"?>
<tasks>
  <insertInventoryItem>
	<inventoryItem uid="0">     
	<code>CODE_0c8-4ab2-9333-0890659b5d51<code/>
	<description>Description for 633638128318905000</description>
	<isActive>true</isActive>
	<notes>Notes for CODE_0c8-4ab2-9333-0890659b5d51</notes>
	<isInventoried>true</isInventoried>
	<assetAccountUid>87346</assetAccountUid>
	<stockOnHand>0</stockOnHand>
	<currentValue>0</currentValue>
	<isBought>true</isBought>
	<purchaseExpenseAccountUid>0</purchaseExpenseAccountUid>open
	<purchaseTaxCode>G11</purchaseTaxCode>
	<minimumStockLevel>99</minimumStockLevel>
	<primarySupplierContactUid>205235</primarySupplierContactUid>
	<primarySupplierItemCode>S_CODE</primarySupplierItemCode>
	<defaultReOrderQuantity>20</defaultReOrderQuantity>
	<buyingPrice>15</buyingPrice>
	<isBuyingPriceIncTax>true</isBuyingPriceIncTax>
	<isSold>true</isSold>
	<saleIncomeAccountUid>87349</saleIncomeAccountUid>
	<saleTaxCode>G1</saleTaxCode>
	<saleCoSAccountUid>87348</saleCoSAccountUid>
	<sellingPrice>7.75</sellingPrice>
	<isSellingPriceIncTax>true</isSellingPriceIncTax>
	<isVirtual>true</isVirtual>
	<vType>billing</vType>
	<isVisible>false</isVisible>
	<isVoucher>true</isVoucher>
	<validFrom>01/01/2010</validFrom>
	<validTo>01/12/2010</validTo>
	</inventoryItem>
  </insertInventoryItem>
</tasks>

Response:

1
2
3
4
5
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
<insertInventoryItemResult insertedEntityUid="2047"
  lastUpdatedUid="ece9a802-0611-4a7a-8aad-30eaf8e09a39" />
</tasksResponse>

Example: Update Inventory Item

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?xml version="1.0" encoding="utf-8"?>
<tasks>
 <updateInventoryItem>
  <inventoryItem uid="2047" lastUpdatedUid="ece9a802-0611-4a7a-8aad-30eaf8e09a39">
  <code>CODE_0c8-4ab2-9333-0890659b5d51<code/>
  <description>e64f5a8030f645d - For Test Update - Updated</description>
  <isActive>true</isActive>
  <notes>Updated ....</notes>
  <isInventoried>true</isInventoried>
  <assetAccountUid>10526</assetAccountUid>
  <isBought>true</isBought>
  <purchaseExpenseAccountUid>0</purchaseExpenseAccountUid>
  <purchaseTaxCode>G11</purchaseTaxCode>
  <minimumStockLevel>99</minimumStockLevel>
  <primarySupplierContactUid>22732</primarySupplierContactUid>
  <primarySupplierItemCode>S_CODE</primarySupplierItemCode>
  <defaultReOrderQuantity>20</defaultReOrderQuantity>
  <isSold>true</isSold>
  <saleIncomeAccountUid>10528</saleIncomeAccountUid>
  <saleTaxCode>G1,G2</saleTaxCode>
  <saleCoSAccountUid>10527</saleCoSAccountUid>
  <sellingPrice>19.95</sellingPrice>
  <isSellingPriceIncTax>true</isSellingPriceIncTax>
  </inventoryItem>
 </updateInventoryItem>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
 <updateInventoryItemResult updatedEntityUid="2047" lastUpdatedUid="328b1df2-5cd0-47e4-8702-773e27259fb4" />
</tasksResponse>

insertComboItem and updateComboItem

Summary

Inserts / updates Combo Item.

Field Type Max. Length Required? Notes
ComboItem ComboItem Y The Combo to be inserted / updated.

Example: Insert Combo Item

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?xml version="1.0" encoding="utf-16"?>
<tasks xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <insertComboItem>
    <comboItem uid="0">
	  <code>C - a2978dd8-2<code/>
      <description>Insert Combo Item Test</description>
      <isActive>true</isActive>
      <notes>Combo item notes.</notes>
      <isInventoried>true</isInventoried>
      <assetAccountUid>198019</assetAccountUid>
      <stockOnHand>0</stockOnHand>
      <currentValue>0</currentValue>
      <quantityOnOrder>0</quantityOnOrder>
      <quantityCommitted>0</quantityCommitted>
      <isBought>true</isBought>
      <purchaseExpenseAccountUid>0</purchaseExpenseAccountUid>
      <purchaseTaxCode>G10</purchaseTaxCode>
      <minimumStockLevel>0</minimumStockLevel>
      <primarySupplierContactUid>693521</primarySupplierContactUid>
      <primarySupplierItemCode>ITOP090</primarySupplierItemCode>
      <defaultReOrderQuantity>10</defaultReOrderQuantity>
      <isSold>true</isSold>
      <saleIncomeAccountUid>198022</saleIncomeAccountUid>
      <saleTaxCode>G1</saleTaxCode>
      <saleCoSAccountUid>198021</saleCoSAccountUid>
      <rrpInclTax>350.00</rrpInclTax>
      <sellingPrice>350.00</sellingPrice>
      <isSellingPriceIncTax>false</isSellingPriceIncTax>
      <buyingPrice>175.00</buyingPrice>
      <isBuyingPriceIncTax>false</isBuyingPriceIncTax>
      <isVoucher>true</isVoucher>
      <validFrom>2010-05-28T00:00:00</validFrom>
      <validTo>2010-12-28T00:00:00</validTo>
      <isVirtual>true</isVirtual>
      <vType>Virtual Voucher</vType>
      <isVisible>true</isVisible>
      <items>
        <item>
          <uid>221122</uid>
          <code>ASUS-3df-63d8bb559f08<code/>
          <quantity>1</quantity>
        </item>
        <item>
          <uid>336655</uid>
          <code>Cat5-3df-63d8bb559f08<code/>
          <quantity>1</quantity>
        </item>
      </items>
    </comboItem>
  </insertComboItem>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
	<insertComboItemResult insertedEntityUid="321654" lastUpdatedUid="ef6f1eae-2758-4b0e-a7a9-e6e11b56e0df" />
</tasksResponse>

Example: Update Combo Item

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?xml version="1.0" encoding="utf-8"?>
<tasks xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <updateComboItem>
    <comboItem uid="321654" lastUpdatedUid="ef6f1eae-2758-4b0e-a7a9-e6e11b56e0df">
      <code>C-a2978dd8-2<code/>
      <description>Insert Combo Item Test</description>
      <isActive>true</isActive>
      <notes>Combo item notes.</notes>
      <isInventoried>true</isInventoried>
      <assetAccountUid>198019</assetAccountUid>
      <stockOnHand>0</stockOnHand>
      <currentValue>0</currentValue>
      <quantityOnOrder>0</quantityOnOrder>
      <quantityCommitted>0</quantityCommitted>
      <isBought>true</isBought>
      <purchaseExpenseAccountUid>0</purchaseExpenseAccountUid>
      <purchaseTaxCode>G10</purchaseTaxCode>
      <minimumStockLevel>0</minimumStockLevel>
      <primarySupplierContactUid>693521</primarySupplierContactUid>
      <primarySupplierItemCode>ITOP090</primarySupplierItemCode>
      <defaultReOrderQuantity>10</defaultReOrderQuantity>
      <isSold>true</isSold>
      <saleIncomeAccountUid>198022</saleIncomeAccountUid>
      <saleTaxCode>G1</saleTaxCode>
      <saleCoSAccountUid>198021</saleCoSAccountUid>
      <rrpInclTax>350.00</rrpInclTax>
      <sellingPrice>350.00</sellingPrice>
      <isSellingPriceIncTax>false</isSellingPriceIncTax>
      <buyingPrice>175.00</buyingPrice>
      <isBuyingPriceIncTax>false</isBuyingPriceIncTax>
      <isVoucher>true</isVoucher>
      <validFrom>2010-05-28T00:00:00</validFrom>
      <validTo>2010-12-28T00:00:00</validTo>
      <isVirtual>true</isVirtual>
      <vType>Virtual Voucher</vType>
      <isVisible>true</isVisible>
      <items>
        <item>
          <uid>334146</uid>
          <code>ASUS-3df-63d8bb559f08<code/>
          <quantity>1</quantity>
        </item>
        <item>
          <uid>334147</uid>
          <code>Cat5-3df-63d8bb559f08<code/>
          <quantity>1</quantity>
        </item>
        <item>
          <uid>14605</uid>
          <code>100<code/>
          <quantity>2</quantity>
        </item>
      </items>
    </comboItem>
  </updateComboItem>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
	<updateComboItemResult updatedEntityUid="321654" lastUpdatedUid="ad0a7f48-3b16-4696-a930-6dd303d3d5ea" />
</tasksResponse>

buildComboItem

Summary

Builds specified number of units of a combo item.

Example:

Build 12.25 units of combo item 1234
Request content:

1
2
3
4
5
6
7
<?xml version="1.0" encoding="utf-16"?>
<tasks xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <buildComboItem>
    <uid>1234</uid>  <!-- The uid of the combo item to build -->
    <quantity>12.25</quantity> <!-- Number of units -->
  </buildComboItem>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
  <buildComboItemResult uid="1234" lastUpdatedUid="AAAAAAI5gv0=" />
</tasksResponse>

insertInvoice and updateInvoice

Summary

Inserts / updates Invoice. You can also ask the system to email PDF invoice at the same time.

Field Type Max. Length Required? Notes
emailToContact Boolean Specifies whether to email the PDF invoice. Default: false (don’t email to contact).
invoice Invoice Y The Invoice to be inserted / updated.
createAsAdjustmentNote Boolean Specifies whether to create the PDF invoice to be emailed to contact as an adjustment note. Default: false.
emailMessage EmailMessage See EmailMessage for details.

The result returned by insertInvoice task contains some extra fields in addition to standard “insertEntityUid” and “lastUpdatedUid” fields as described below.

Field Type Notes
insertedEntityUid Int
lastUpdatedUid String
sentToContact Boolean Indicates whether the invoice was emailed to contact.
generatedInvoiceNumber String When inserting a sale and the invoice number is set to >, this field contains the system generated invoice number.
generatedPurchaseOrderNumber String When inserting a purchase and the purchase order number is set to , this fields contains the system generated purchase order number.

Example: Insert Service Sale & Email to Contact

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?xml version="1.0" encoding="utf-16"?>
<tasks xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <insertInvoice emailToContact="true">
  <invoice uid="0">
   <transactionType>S</transactionType>
   <date>2005-09-30</date>
   <contactUid>22735</contactUid>
   <shipToContactUid>22735</shipToContactUid>
   <folderUid>0</folderUid>
   <summary>Test POST sale</summary>
   <notes>From REST</notes>
   <requiresFollowUp>false</requiresFollowUp>
   <dueOrExpiryDate>2005-12-01</dueOrExpiryDate>
   <layout>S</layout>
   <status>I</status>
   <invoiceNumber><Auto Number></invoiceNumber>
   <purchaseOrderNumber>PO222</purchaseOrderNumber>
   <invoiceItems>
    <serviceInvoiceItem>
     <description>Design and Development of REST WS</description>
     <accountUid>10555</accountUid>
     <taxCode>G1</taxCode>
     <totalAmountInclTax>2132.51</totalAmountInclTax>
    </serviceInvoiceItem>
    <serviceInvoiceItem>
     <description>Subscription to XYZ</description>
     <accountUid>10557</accountUid>
     <taxCode>G1</taxCode>
     <totalAmountInclTax>11.22</totalAmountInclTax>
    </serviceInvoiceItem>
   </invoiceItems>
   <quickPayment>
    <datePaid>2005-09-30</datePaid>
    <dateCleared>0001-01-01</dateCleared>
    <bankedToAccountUid>10562</bankedToAccountUid>
    <amount>100</amount>
    <reference>CASH</reference>
    <summary>Quick payment from Westpac.</summary>
   </quickPayment>
   <isSent>false</isSent>
  </invoice>
  <createAsAdjustmentNote>false</createAsAdjustmentNote>
  <emailMessage>
   <from>test@saasu.com</from>
   <to>support@saasu.com</to>
   <subject>Invoice - Sent using NETaccounts OLA REST API (TestInsertAndEmail).</subject>
   <body>Insert Invoice then email.</body>
  </emailMessage>
 </insertInvoice>
</tasks>

Response:

1
2
3
<tasksResponse>
  <insertInvoiceResult insertedEntityUid="256872" lastUpdatedUid="AAAAAAAVBA4=" sentToContact="true" generatedInvoiceNumber="XYZ-2341"/>
</tasksResponse>

Example: Update Service Sale

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?xml version="1.0" encoding="utf-8"?>
<tasks>
 <updateInvoice emailToContact="false">
  <invoice uid="256875" lastUpdatedUid="AAAAAAAVBCc=">
  <transactionType>S</transactionType>
  <date>2005-09-15</date>
  <contactUid>22738</contactUid>
  <shipToContactUid>22738</contactUid>
  <tags>Online Sales</tags>
  <summary>Service Sale 2</summary>
  <requiresFollowUp>false</requiresFollowUp>
  <dueOrExpiryDate>2005-12-15</dueOrExpiryDate>
  <layout>S</layout>
  <status>I</status>
  <invoiceNumber><Autonumber></invoiceNumber>
  <purchaseOrderNumber>PO123456789</purchaseOrderNumber>
  <invoiceItems>
   <serviceInvoiceItem>
    <description>LINE 1 LINE 1 LINE 1</description>
    <accountUid>10568</accountUid>
    <taxCode>G1,G2</taxCode>
    <totalAmountInclTax>12345.12</totalAmountInclTax>
   </serviceInvoiceItem>
   <serviceInvoiceItem>
    <description>Testing</description>
    <accountUid>10567</accountUid>
    <taxCode>G7</taxCode>
    <totalAmountInclTax>-123.9</totalAmountInclTax>
   </serviceInvoiceItem>
   <serviceInvoiceItem>
    <description>Testing</description>
    <accountUid>10569</accountUid>
    <taxCode>G1</taxCode>
    <totalAmountInclTax>569.66</totalAmountInclTax>
   </serviceInvoiceItem>
  </invoiceItems>
  <quickPayment>
   <datePaid>0001-01-01</datePaid>
   <dateCleared>0001-01-01</dateCleared>
   <bankedToAccountUid>0</bankedToAccountUid>
   <amount>0</amount>
  </quickPayment>
  <isSent>false</isSent>
 </invoice>
<createAsAdjustmentNote>false</createAsAdjustmentNote>
</updateInvoice>
</tasks>

Response:

1
2
3
4
5
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
<updateInvoiceResult updatedEntityUid="256875"
  lastUpdatedUid="AAAAAAAVBCw=" sentToContact="false" />
</tasksResponse>

Example: Insert Foreign Currency Service Sale & Email to Contact

NOTE: Need to have Multi Currency turned ON for the file.
The example below set the FX rate manually. To set the FX rate automatically, use true and do not specify

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?xml version="1.0" encoding="utf-16"?>
<tasks xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<insertInvoice emailToContact="true">
 <invoice uid="0">
  <transactionType>S</transactionType>
  <date>2005-09-30</date>
  <contactUid>22735</contactUid>
  <shipToContactUid>22735</shipToContactUid>
  <folderUid>0</folderUid>
  <summary>Test POST sale</summary>
  <notes>From REST</notes>
  <requiresFollowUp>false</requiresFollowUp>
  <dueOrExpiryDate>2005-12-01</dueOrExpiryDate>
  <ccy>USD</ccy>
  <autoPopulateFxRate>false</autoPopulateFxRate>
  <fcToBcFxRate>1.137640930</fcToBcFxRate>
  <layout>S</layout>
  <status>I</status>
  <invoiceNumber><Auto Number></invoiceNumber>
  <purchaseOrderNumber>PO222</purchaseOrderNumber>
  <invoiceItems>
   <serviceInvoiceItem>
    <description>Design and Development of REST WS</description>
    <accountUid>10555</accountUid>
    <taxCode>G1</taxCode>
    <totalAmountInclTax>1000.50</totalAmountInclTax>
   </serviceInvoiceItem>
   <serviceInvoiceItem>
    <description>Subscription to XYZ</description>
    <accountUid>10557</accountUid>
    <taxCode>G1</taxCode>
    <totalAmountInclTax>11.22</totalAmountInclTax>
    </serviceInvoiceItem>
  </invoiceItems>
  <quickPayment>
   <datePaid>2005-09-30</datePaid>
   <dateCleared>0001-01-01</dateCleared>
   <bankedToAccountUid>10562</bankedToAccountUid>
   <amount>100</amount>
   <reference>CASH</reference>
   <summary>Quick payment from Westpac.</summary>
  </quickPayment>
  <isSent>false</isSent>
 </invoice>
 <createAsAdjustmentNote>false</createAsAdjustmentNote>
 <emailMessage>
  <from>test@saasu.com</from>
  <to>support@saasu.com</to>
  <subject>Invoice - Sent using NETaccounts OLA REST API (TestInsertAndEmail).</subject>
  <body>Insert Invoice then email.</body>
 </emailMessage>
 </insertInvoice>
</tasks>

Response:

1
2
3
<tasksResponse>
<insertInvoiceResult insertedEntityUid="2546566" lastUpdatedUid="AAAAAAAHy6NM=" sentToContact="true"/>
</tasksResponse>

Example: Insert Item Sale

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?xml version="1.0" encoding="utf-16"?>
<tasks xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <insertInvoice emailToContact="false">
    <invoice uid="0">
      <transactionType>S</transactionType>
      <date>2005-10-06</date>
      <contactUid>254091</contactUid>
      <shipToContactUid>254091</contactUid>
      <folderUid>0</folderUid>
      <summary>Test Insert Item Sale</summary>
      <notes>From REST</notes>
      <requiresFollowUp>false</requiresFollowUp>
      <dueOrExpiryDate>2005-11-06</dueOrExpiryDate>
      <layout>I</layout>
      <status>I</status>
      <invoiceNumber><Auto Number></invoiceNumber>
      <purchaseOrderNumber>PO333</purchaseOrderNumber>
      <invoiceItems>
        <itemInvoiceItem>
          <quantity>2</quantity>
          <inventoryItemUid>73229</inventoryItemUid>
          <description>Asus Laptop</description>
          <taxCode>G1</taxCode>
          <unitPriceInclTax>1200.75</unitPriceInclTax>
          <percentageDiscount>12.50</percentageDiscount>
        </itemInvoiceItem>
        <itemInvoiceItem>
          <quantity>5.125</quantity>
          <inventoryItemUid>73230</inventoryItemUid>
          <description>Cat 5 Cable (in meter)</description>
          <taxCode>G1,G3</taxCode>
          <unitPriceInclTax>2.1234</unitPriceInclTax>
          <percentageDiscount>0</percentageDiscount>
        </itemInvoiceItem>
        <itemInvoiceItem>
          <quantity>3</quantity>
          <inventoryItemUid>73230</inventoryItemUid>
          <description>Cat 5 Cable (in meter)</description>
          <taxCode>G1,G2</taxCode>
          <unitPriceInclTax>5.125</unitPriceInclTax>
          <percentageDiscount>0</percentageDiscount>
        </itemInvoiceItem>
      </invoiceItems>
      <quickPayment>
        <datePaid>2005-10-06</datePaid>
        <dateCleared>0001-01-01</dateCleared>
        <bankedToAccountUid>92625</bankedToAccountUid>
        <amount>222.22</amount>
        <reference>C-001-023</reference>
      </quickPayment>
      <isSent>false</isSent>
    </invoice>
    <createAsAdjustmentNote>false</createAsAdjustmentNote>
  </insertInvoice>
</tasks>

Response:

1
2
3
<tasksResponse>
  <insertInvoiceResult insertedEntityUid="1522302" lastUpdatedUid="AAAAAAEKXGg=" sentToContact="false" generatedInvoiceNumber="2015" />
</tasksResponse>

Email an Invoice

Summary

Emails the pdf invoice.

Field Type Max. Length Required? Notes
emailMessage emailMessage Y The email message to be sent.

Example: Email an invoice

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?xml version="1.0" encoding="utf-8"?>
<tasks>
 <emailPdfInvoice>
   <invoiceUid>123456</invoiceUid>
    <createAsAdjustmentNote></createAsAdjustmentNote>
      <emailMessage>
       <from>johndoe@saasu.com</from>
       <to>janedoe@saasu.com</to>
       <cc></cc>
       <bcc></bcc>
       <subject>Invoice</subject>
       <body>Hi, please find the invoice attached.</body>
      </emailMessage>
   </emailPdfInvoice>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
  <emailPdfInvoiceResult sentToContact="true" />
</tasksResponse>

insertInvoicePayment and updateInvoicePayment

Summary

Inserts / updates Invoice Payment.
The payment can be for sales or purchases.

Field Type Max. Length Required? Notes
invoicePayment InvoicePayment Y The InvoicePayment to be inserted / updated.

Example: Insert Payment for Purchases

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?xml version="1.0" encoding="utf-8"?>
<tasks>
 <insertInvoicePayment>
  <invoicePayment uid="0">
   <transactionType>PP</transactionType>
   <date>2005-12-20</date>
   <contactUid>0</contactUid>
   <reference>cf97d1a0-dec8-477a-9cc8-bbe0635ff87a</reference>
   <summary>Payment for 2 Outstanding Invoices</summary>
   <requiresFollowUp>false</requiresFollowUp>
   <paymentAccountUid>10588</paymentAccountUid>
   <dateCleared>0001-01-01</dateCleared>
   <invoicePaymentItems>
    <invoicePaymentItem>
     <invoiceUid>256878</invoiceUid>
     <amount>20.05</amount>
    </invoicePaymentItem>
    <invoicePaymentItem>
     <invoiceUid>256877</invoiceUid>
     <amount>23.75</amount>
    </invoicePaymentItem>
   </invoicePaymentItems>
  </invoicePayment>
 </insertInvoicePayment>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
<insertInvoicePaymentResult insertedEntityUid="256879" lastUpdatedUid="AAAAAAAVBEg=" />
</tasksResponse>

Example: Update Invoice Payment for Sales

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?xml version="1.0" encoding="utf-8"?>
<tasks>
 <updateInvoicePayment>
  <invoicePayment uid="256883" lastUpdatedUid="AAAAAAAVBGU=">
   <transactionType>SP</transactionType>
   <date>2005-12-20</date>
   <contactUid>0</contactUid>
   <reference>2393d80b-093b-459e-927f-f71c7662dfd9</reference>
   <summary>Payment - Updated.</summary>
   <requiresFollowUp>false</requiresFollowUp>
   <paymentAccountUid>10601</paymentAccountUid>
   <dateCleared>0001-01-01</dateCleared>
   <invoicePaymentItems>
    <invoicePaymentItem>
     <invoiceUid>256881</invoiceUid>
     <amount>30</amount>
    </invoicePaymentItem>
   </invoicePaymentItems>
  </invoicePayment>
 </updateInvoicePayment>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
  <updateInvoicePaymentResult updatedEntityUid="256883" lastUpdatedUid="AAAAAAAVBGY=" />
</tasksResponse>

Example: Insert Payment for Foreign Currency Sale

NOTE: Need to have Multi Currency turned ON for the file.
The example below set the FX rate automatically. To set the FX rate manually, use false and specify the rate using

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?xml version="1.0" encoding="utf-8"?>
<tasks>
<insertInvoicePayment>
 <invoicePayment uid="0">
  <transactionType>SP</transactionType>
  <date>2010-02-22</date>
  <contactUid>0</contactUid>
  <reference>cf97d1a0-dec8-477a-9cc8-bbe0635ff87a</reference>
  <summary>Payment for Outstanding USD Invoice #1234</summary>
  <ccy>USD</ccy>
  <autoPopulateFxRate>true</autoPopulateFxRate>
  <requiresFollowUp>false</requiresFollowUp>
  <paymentAccountUid>10588</paymentAccountUid>
  <dateCleared>0001-01-01</dateCleared>
  <invoicePaymentItems>
   <invoicePaymentItem>
    <invoiceUid>2546566</invoiceUid>
    <amount>1011.72</amount>
   </invoicePaymentItem>
  </invoicePaymentItems>
 </invoicePayment>
</insertInvoicePayment>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
  <insertInvoicePaymentResult insertedEntityUid="256879" lastUpdatedUid="AAAAAAAVBEg=" />
</tasksResponse>

insertInventoryAdjustment and updateInventoryAdjustment

Summary

Inserts / updates Inventory Adjustment

Field Type Max. Length Required? Notes
inventoryAdjustment inventoryAdjustment Y The InventoryAdjustment to be inserted / updated.

Example: Insert Inventory Adjustment

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?xml version="1.0" encoding="utf-16"?>
<tasks xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <insertInventoryAdjustment>
    <inventoryAdjustment uid="0">
      <date>2009-07-17</date>
      <tags>IA, Test</tags>
      <summary>Test Inventory Adjustment CRUD</summary>
      <notes>Inventory Adjustmemt from API</notes>
      <requiresFollowUp>false</requiresFollowUp>
      <items>
        <item>
          <quantity>1</quantity>
          <inventoryItemUid>142793</inventoryItemUid>
          <accountUid>111011</accountUid>
          <unitPriceExclTax>120.50</unitPriceExclTax>
          <totalPriceExclTax>120.50</totalPriceExclTax>
        </item>
        <item>
          <quantity>2</quantity>
          <inventoryItemUid>142792</inventoryItemUid>
          <accountUid>111019</accountUid>
          <unitPriceExclTax>100.25</unitPriceExclTax>
          <totalPriceExclTax>200.50</totalPriceExclTax>
        </item>
      </items>
    </inventoryAdjustment>
  </insertInventoryAdjustment>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
  <insertInventoryAdjustmentResult insertedEntityUid="1705574" lastUpdatedUid="AAAAAAFNR68=" />
</tasksResponse>

Example: Update Inventory Adjustment

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?xml version="1.0" encoding="utf-16"?>
<tasks xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <updateInventoryAdjustment>
    <inventoryAdjustment uid="1705583" lastUpdatedUid="AAAAAAFNSA0=">
      <date>2009-07-17</date>
      <tags>IA, Test</tags>
      <summary>Updated inventory adjustment</summary>
      <notes>Inventory Adjustmemt from API</notes>
      <requiresFollowUp>false</requiresFollowUp>
      <items>
        <item>
          <quantity>1</quantity>
          <inventoryItemUid>142797</inventoryItemUid>
          <accountUid>111024</accountUid>
          <unitPriceExclTax>120.50</unitPriceExclTax>
          <totalPriceExclTax>120.50</totalPriceExclTax>
        </item>
        <item>
          <quantity>2</quantity>
          <inventoryItemUid>142796</inventoryItemUid>
          <accountUid>111032</accountUid>
          <unitPriceExclTax>100.25</unitPriceExclTax>
          <totalPriceExclTax>200.50</totalPriceExclTax>
        </item>
      </items>
    </inventoryAdjustment>
  </updateInventoryAdjustment>
</tasks>

Response:

1
2
3
<tasksResponse>
  <updateInventoryAdjustmentResult updatedEntityUid="1705583" lastUpdatedUid="AAAAAAFNSBE=" />
</tasksResponse>

insertInventoryTransfer and updateInventoryTransfer

Summary

Inserts / updates Inventory Transfer

Field Type Max. Length Required? Notes
inventoryTransfer inventoryTransfer Y The InventoryTransfer to be inserted / updated.

Example: Insert Inventory Transfer

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?xml version="1.0" encoding="utf-8"?>
<tasks>
<insertInventoryTransfer>
<inventoryTransfer uid="0">
  <date>2009-07-17</date>
      <tags>IT, Test</tags>
      <summary>Test Inventory Transfer CRUD</summary>
      <notes>Inventory Transfer from API</notes>
      <requiresFollowUp>false</requiresFollowUp>
      <items>
        <item>
          <quantity>-2</quantity>
          <inventoryItemUid>111300</inventoryItemUid>
          <unitPriceExclTax>120.50</unitPriceExclTax>
          <totalPriceExclTax>-241.00</totalPriceExclTax>
        </item>
        <item>
          <quantity>1</quantity>
          <inventoryItemUid>111298</inventoryItemUid>
          <unitPriceExclTax>241.00</unitPriceExclTax>
          <totalPriceExclTax>241.00</totalPriceExclTax>
        </item>
      </items>
    </inventoryTransfer>
  </insertInventoryTransfer>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
  <insertInventoryTransferResult insertedEntityUid="1671232" lastUpdatedUid="AAAAAAFE+qM=" />
</tasksResponse>

Example: Update Inventory Transfer

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?xml version="1.0" encoding="utf-16"?>
<tasks xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <updateInventoryTransfer>
    <inventoryTransfer uid="1705556" lastUpdatedUid="AAAAAAFNRw0=">
      <date>2009-07-17</date>
      <tags>IT, Test</tags>
      <summary>Test Inventory Transfer CRUD</summary>
      <notes>Updated inventory transfer</notes>
      <requiresFollowUp>false</requiresFollowUp>
      <items>
        <item>
          <quantity>-2</quantity>
          <inventoryItemUid>142790</inventoryItemUid>
          <unitPriceExclTax>120.50</unitPriceExclTax>
          <totalPriceExclTax>-241.00</totalPriceExclTax>
        </item>
        <item>
          <quantity>1</quantity>
          <inventoryItemUid>142788</inventoryItemUid>
          <unitPriceExclTax>241.00</unitPriceExclTax>
          <totalPriceExclTax>241.00</totalPriceExclTax>
        </item>
        <item>
          <quantity>-2</quantity>
          <inventoryItemUid>142789</inventoryItemUid>
          <unitPriceExclTax>60.50</unitPriceExclTax>
          <totalPriceExclTax>-121.00</totalPriceExclTax>
        </item>
        <item>
          <quantity>1</quantity>
          <inventoryItemUid>142790</inventoryItemUid>
          <unitPriceExclTax>121.00</unitPriceExclTax>
          <totalPriceExclTax>121.00</totalPriceExclTax>
        </item>
      </items>
    </inventoryTransfer>
  </updateInventoryTransfer>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
  <updateInventoryTransferResult updatedEntityUid="1705556" lastUpdatedUid="AAAAAAFNRxE=" />
</tasksResponse>

insertJournal and updateJournal

Summary

Inserts / updates Journal

Field Type Max. Length Required? Notes
journal journal Y The Journal to be inserted / updated.

Example: Insert Journal

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?xml version="1.0" encoding="utf-16"?>
<tasks xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <insertJournal>
    <journal uid="0">
      <date>2010-05-05</date>
      <tags>ABC, DEF</tags>
      <summary>Summary</summary>
      <notes>Notes</notes>
      <requiresFollowUp>false</requiresFollowUp>
      <reference>#12345</reference>
      <journalItems>
        <journalItem>
          <accountUid>123456</accountUid>
          <taxCode>G11</taxCode>
          <amount>123.45</amount>
          <type>Credit</type>
        </journalItem>
        <journalItem>
          <accountUid>654321</accountUid>
          <taxCode>G11</taxCode>
          <amount>123.45</amount>
          <type>Debit</type>
        </journalItem>
      </journalItems>
    </journal>
  </insertJournal>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
  <insertJournalResult insertedEntityUid="123456789" lastUpdatedUid="AAAAAAIqlJg=" />
</tasksResponse>

Example: Update Journal

Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?xml version="1.0" encoding="utf-16"?>
<tasks xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <updateJournal>
    <journal uid="123456789" lastUpdatedUid="AAAAAAIqlJg=">
      <date>2010-05-05</date>
      <tags>ABC, DEF</tags>
      <summary>Add some summary.</summary>
      <notes>Updated journal.</notes>
      <requiresFollowUp>false</requiresFollowUp>
      <reference>#12345</reference>
      <journalItems>
        <journalItem>
          <accountUid>184298</accountUid>
          <taxCode>G11</taxCode>
          <amount>123.45</amount>
          <type>Credit</type>
        </journalItem>
        <journalItem>
          <accountUid>184299</accountUid>
          <taxCode>G11</taxCode>
          <amount>123.45</amount>
          <type>Debit</type>
        </journalItem>
      </journalItems>
    </journal>
  </updateJournal>
</tasks>

Response:

1
2
3
<tasksResponse>
  <updateJournalResult updatedEntityUid="123456789" lastUpdatedUid="AAAAAAIqleo=" />
</tasksResponse>

Example: Insert Foreign Currency Journal

NOTE: Need to have Multi Currency turned ON for the file.
The example below set the FX rate automatically. To set the FX rate manually, use false and specify the rate using
Request content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?xml version="1.0" encoding="utf-16"?>
<tasks xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <insertJournal>
    <journal uid="0">
      <date>2010-05-05</date>
      <tags>ABC, DEF</tags>
      <summary>Summary</summary>
      <notes>Notes</notes>
      <requiresFollowUp>false</requiresFollowUp>
      <ccy>USD</ccy>
      <autoPopulateFxRate>true</autoPopulateFxRate>
      <reference>#12345</reference>
      <journalItems>
        <journalItem>
          <accountUid>123456</accountUid>
          <taxCode>G11</taxCode>
          <amount>123.45</amount>
          <type>Credit</type>
        </journalItem>
        <journalItem>
          <accountUid>654321</accountUid>
          <taxCode>G11</taxCode>
          <amount>123.45</amount>
          <type>Debit</type>
        </journalItem>
      </journalItems>
    </journal>
  </insertJournal>
</tasks>

Response:

1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<tasksResponse>
  <insertJournalResult insertedEntityUid="00001110000" lastUpdatedUid="AAAAAAIqpKc=" />
</tasksResponse>

Activities

See the following Activities API doc.