Every entity has a Uid (unique identifier for every entity). Here are some of the major entities -
- Invoice
- ServiceInvoiceItem
- ItemInvoiceItem
- QuickPayment
- InvoicePayment
- EmailMessage
- TaxCodeTable
- Contact
- PostalAddress
- BankAccount
- InventoryItem
When the entity is used in insert tasks set the uid to 0 or don’t specify this element. Saasu will generate a new uid if the entity is inserted successfully. When the entity is used in update tasks, the uid must be > 0 to identify which entity needs to be updated.
The <LastUpdatedUid> identifies when the record was last updated. Saasu generates this value every time the entity is inserted or updated successfully. This value must be specified on update to ensure that no one has updated the record since your last read operation.
When passing data to the web services for boolean values use either true? or false?. For date values use the following format: yyyy-MM-dd. E.g. Pass 2005-01-16? for 16 January 2005.
Invoice
Invoice covers sales and purchases. This is set through the <TransactionType>? element.
Service and item sale and purchase are supported, which is set through the Layout? element.
Sale and purchase can have one of the following three status types; Q (quote), O (order), and I (invoice). The status is set through the Status element.
Payment can be applied to both orders and invoices, but not to quotes.
Rules for invoices:
- Duplicate invoice number is not allowed.
- Invoice overpayment is not allowed (e.g. Applying $200 payment to $100 invoice is not permitted).
- Tax code cannot be applied to Tax Accounts (Asset: Tax Paid on Purchases and Loan: Tax Collected from Sales).
- Tax code cannot be applied to Bank Accounts.
- Inserting, updating, and deleting item invoices that have the potential to cause invalid stock level are not permitted. Invalid stock level is defined .
- Negative stock-on-hand.
- Negative current value.
- Stock-on-hand is 0 but current value > 0
- Current value is 0 but stock on hand > 0.
| Field | Type | Max. Length | Required? | Notes |
|---|---|---|---|---|
| uid | Int | Y | Required for update. | |
| lastUpdateUid | String | Y | Either S for sale or P for purchase. | |
| date | Date | Y | The invoice date. | |
| contactUid | int | The contact for this invoice. 0 means no contact. | ||
| folderUid | Int |
DEPRECATED. Use tags instead. The folder in which the invoice is filed/stored. 0 means unfiled. |
||
| tags | String |
Separate multiple tags by comma. Max length for each tag is 35 characters. “tags” replaces “folderUid”. |
||
| reference | String | 50 | Don’t set this value in invoice because this field is not accessible from the UI. | |
| summary | String | 75 | Brief summary of the invoice | |
| notes | String | Unlimited | ||
| requiresFollowUp | Boolean | |||
| dueOrExpiryDate | Date | Invoice and/or order due date or quote expiry date. | ||
| layout | String | 1 | Y | The invoice layout. Either S (Service) or I (Item) |
| status | String | 1 | Y | Invoice status. Either Q (Quote), O (Order) or I (Invoice). |
| invoiceNumber | String | 50 | The sale invoice number. When inserting a sale, set to <auto>? to let the system generates the invoice number based on the preferences you set. | |
| purchaseOrderNumber | String | 50 | The purchase order number (PO #). When inserting a purchase, set to <auto>? to let the system generates the PO# based on the preferences you set. | |
| invoiceItems | You can include unlimited number of invoice items. For service invoice, use <ServiceInvoiceItem>?. For item invoice: use <ItemInvoiceItem>?. You cannot mix the content of invoice items (i.e. having both <ServiceInvoiceItem>? and <ItemInvoiceItem>?). See <ServiceInvoiceItem>? and <ItemInvoiceItem>? section for details. | |||
| quickPayment | Payment to be applied to this invoice. | |||
| isSent | Boolean | Indicates if the invoice has been sent/emailed to contact. This flag will be set to true automatically if the Invoice is sent successfully through the WSAPI. |
ServiceInvoiceItem
Line item for service invoice.
| Field | Type | Max. Length | Required? | Notes |
|---|---|---|---|---|
| description | String | Unlimited | Description of service invoice line item. Use pipe (|) character to indicate new line. | |
| accountUid | Int | Y | The Account/TransactionCategory for this line item. | |
| taxCode | String | See tax code table for valid values. | ||
| totalAmountInclTax | Decimal | Y | The total amount (tax inclusive) for this line item. Positive, negative, and 0 are accepted. Maximum 2 decimals. |
E.g. 5 hours of Income: Technical Support (AccountUid = 273), tax code G1?, and hourly rate excluding GST $100 is described in the following xml fragment:
<serviceInvoiceItem>
<description>5 Hours Technical Support</description>
<accountUid>273</accountUid>
<taxCode>G1</taxCode>
<!– (5 hours x $100/hour) + (10% x (5 hours x $100/hour)) = $550.00 –>
<totalAmountInclTax>550.00</totalAmountInclTax>
</serviceInvoiceItem>
ItemInvoiceItem
Line item for item invoice.
| Field | Type | Max. Length | Required? | Notes |
|---|---|---|---|---|
| quantity | Decimal | Y | The quantity. Maximum 3 decimals. |
|
| inventoryItemUid | Int | Y | The inventory item for this invoice line item. This also covers combo item. For combo item, use combo item uid. | |
| description | String | Unlimited | The description for the line item. Normally, it’s set to inventory item description. | |
| taxCode | String | See tax code table for valid values. | ||
| unitPriceInclTax | Decimal | Y | Unit price of inventory item. | |
| percentageDiscount | Decimal | Percentage discount. E.g. for 10% off the unit price is set the value to 10. Valid values: between 0 and 100. Maximum 2 decimals. |
E.g. 10 units of Pentium 4 CPU (InventoryItemUid = 920), tax code: G1, unit price including GST before discount is 125.22, and discount: 10% is represented by the following xml fragment:
<itemInvoiceItem>
<quantity>10</quantity>
<inventoryItemUid>920</inventoryItemUid>
<description>Pentium 4 CPU</description>
<taxCode>G1</taxCode>
<unitPriceInclTax>125.22</unitPriceInclTax>
<percentageDiscount>10</percentageDiscount>
</itemInvoiceItem>
QuickPayment
| Field | Type | Max. Length | Required? | Notes |
|---|---|---|---|---|
| datePaid | Date | Y | When the payment was made. | |
| dateCleared | Date | When the payment was cleared. | ||
| bankToAccountUid | Int | Y | The bank account uid where the payment was banked to. | |
| amount | Decimal | Y | The payment amount. It must be <= invoice total. Maximum 2 decimals. | |
| reference | String | 50 | Payment reference. It can be used to track cheque #, etc. | |
| summary | String | 75 | Brief summary for this payment. Leave this blank to let the system sets this automatically. |
Invoice Payment
There are two types of Invoice Payment:
- Payment for sales (transactionType = SP?)
- Payment for purchases (transactionType = PP?)
An invoice payment can be allocated to multiple invoices regardless of the Contact; as long as they are of the same type (i.e. you cannot have a Sale Payment (SP) transaction and allocate the payment to purchases).
| Field | Type | Max. Length | Required? | Notes |
|---|---|---|---|---|
| uid | Int | Y | Required for update. | |
| lastUpdatedUid | String | Y | Required for update. | |
| transactionType | String | 2 | Y | Either SP (Sale Payment) or PP (Purchase Payment). |
| Date | Date | Y | The Payment date (received date). | |
| reference | String | 50 | Don’t set this value in invoice because this field is not accessible from the UI. | |
| summary | String | 75 | Brief summary of the invoice. | |
| notes | String | Unlimited | ||
| requiresFollowUp | Boolean | |||
| paymentAccountUid | Int | Bank account uid for the payment. From which bank account the payment is made or to which bank account the payment was banked. | ||
| dateCleared | Date when the payment is cleared (normally used for cheque payment). | |||
| invoicePaymentItems | To which invoices is this payment allocated? See InvoicePaymentItem for details. |
Invoice Payment Item
| Field | Type | Max. Length | Required? | Notes |
|---|---|---|---|---|
| invoiceUid | Int | Y | Identifies the invoice where the payment is allocated to. | |
| amount | Decimal | Y | The payment amount allocated for this invoice. The amount can be positive and negative. Max. 2 decimals. |
EmailMessage
| Field | Type | Max. Length | Required? | Notes |
|---|---|---|---|---|
| from | String | Unlimited | Y | Only single email address is supported. |
| to | String | Unlimited | Y | Only single email address is supported. |
| cc | String | Unlimited | Only single email address is supported. | |
| bcc | String | Unlimited | Only single email address is supported. | |
| subject | String | Unlimited | ||
| body | String | Unlimited |
TaxCode Table
| For tax code | Use |
|---|---|
| Exp: Incl. GST | G11 |
| Exp: GST Free | G11,G14 |
| Exp: Incl. GST - For Input Taxed Sales | G11,G13(1) |
| Exp: Incl. GST - Private/Non-deductable | G11,G15(1) |
| Exp: GST Free - For Input Taxed Sales | G11,G13(2) |
| Exp: GST Free - Private/Non-deductable | G11,G15(2) |
| CapEx: Incl. GST | G10 |
| CapEx: GST Free | G10,G14 |
| CapEx: Incl. GST - For Input Taxed Sales | G10,G13(1) |
| CapEx: Incl. GST - Private/Non-deductable | G10,G15(1) |
| CapEx: GST Free - For Input Taxed Sales | G10,G13(2) |
| CapEx: GST Free - Private/Non-deductable | G10,G15(2) |
| Exp: Adjustments | G18 |
| Sale: Incl. GST | G1 |
| Sale: GST Free | G1,G3 |
| Sale: Input Taxed | G1,G4 |
| Sale: Exports | G1,G2 |
| Salary/Wage/Other Paid | W1 |
| Withheld: Tax on Salary/Wage | W1,W2 |
| Withheld: Invest. Distrib. (No TFN) | W3 |
| Withheld: Payment (No ABN) | W4 |
| Wine Equalisation Tax Payable | 1C |
| Wine Equalisation Tax Refundable | 1D |
| Luxury Car Tax Payable | 1E |
| Luxury Car Tax Refundable | 1F |
Contact
| Field | Type | Max. Length | Required? | Notes |
| uid | Int | Y | Required for update. | |
| lastUpdatedUid | String | 128 | Y | Required for update. |
| salutation | String | 5 | Valid values; Mr., Mrs., Ms., Dr., Prof. | |
| givenName | String | 50 | At least one of these three fields must be filled on insert/update: GivenName, FamilyName, OrganisationName. | |
| middleInitials | String | 3 | ||
| familyName | String | 50 | ||
| organisationName | String | 75 | ||
| organisationAbn | String | 11 | ||
| organisationWebsite | String | 1024 | ||
| organisationPosition | String | 75 | ||
| contactID | String | 50 | ||
| abn | String | 11 | ||
| websiteUrl | String | 1024 | ||
| String | 128 | |||
| mainPhone | String | 20 | ||
| homePhone | String | 20 | ||
| fax | String | 20 | ||
| mobilePhone | String | 20 | ||
| otherPhone | String | 20 | ||
| statusUid | Int |
DEPRECATED. Use tags instead. Status contact category. 0 means unspecified. |
||
| industryUid | Int | DEPRECATED. Use tags instead. Industry contact category. 0 means unspecified. |
||
| tags | Spring | Separate multiple tags by comma. Max. length per tag is 35 characters. | ||
| postalAddress | PostalAddress | |||
| otherAddress | PostalAddress | |||
| isActive | Boolean | Default: true. | ||
| acceptDirectDeposit | Boolean | |||
| directDepositAccountName | String | 75 | ||
| directDepositBsb | String | 6 | ||
| directDepositAccountNumber | String | 20 | ||
| acceptCheque | Boolean | |||
| chequePayableTo | String | 75 |
PostalAddress
| Field | Type | Max. Length | Required? | Notes |
|---|---|---|---|---|
| street | String | 256 | ||
| city | String | 50 | ||
| postCode | String | 12 | ||
| state | String | 50 | ||
| country | String | 50 |
Chart of Account/TransactionCategory
| Field | Type | Max. Length | Required? | Notes |
|---|---|---|---|---|
| uid | Int | Y | Required for update. | |
| lastUpdatedUid | String | 128 | Y | Required for update. |
| type | String | 50 | Y | Valid value is one of the following: Income, Expense, Asset, Equity, Loan, Other Income, Other Expense, Cost of Sales |
| Name | String | 75 | Y | |
| isActive | Boolean | Default: true |
BankAccount
| Field | Type | Max. Length | Required? | Notes |
|---|---|---|---|---|
| uid | Int | Y | Required for update. | |
| lastUpdatedUid | String | 128 | Y | Required for update. |
| Type | String | 50 | Y | Valid value is one of the following: Asset, Equity, Loan. |
| Name | String | 75 | Bank account name. NOTE: Make sure you also set <displayName>?. |
|
| isActive | Boolean | Default: true | ||
| displayName | String | 75 | Y | Bank account display name. |
| bsb | String | 6 | ||
| accountNumber | String | 20 |
Inventory Item
| Field | Type | Max. Length | Required? | Notes |
|---|---|---|---|---|
| uid | Int | Y | Required for update. | |
| lastUpdatedUid | String | 128 | Y | Required for update. |
| code | String | 32 | Y | Inventory item code. Must be unique. |
| description | String | 4000 | Y | Inventory item description. Multi-line description is supported. Use the pipe (|) to indicate newline. |
| isActive | Boolean | Default: true | ||
| notes | String | Unlimited | ||
| isInventoried | Boolean | Specifies whether the inventory item is inventoried or not. Default: false (not inventoried). |
||
| assetAccountUid | Int | Required only if IsInventoried is set to true. Accounts used must be of type Asset. | ||
| stockOnHand | Decimal | How many stocks on hand? This element is only used when you retrieve an Inventory Item from your File. This value is ignored on insert and update. | ||
| currentValue | Decimal | Current stock value. This element is only used when you retrieve an Inventory Item from your File. This value is ignored on insert and update. | ||
| isBought | Boolean | Specifies if this item can be bought or not. Default: false (cannot be bought). | ||
| purchaseExpenseAccountUid | Int | Expense Account for tracking purchase. Required only if the Inventory Item is not inventoried and item can be bought (isInventoried == false && isBought == true). Accounts used must be of type Expense. | ||
| purchaseTaxCode | String | Default tax code when the inventory item is purchased. | ||
| minimumStockLevel | Decimal | Minimum stock level used for re-stocking alert report. | ||
| primarySupplierContactUid | Int | The primary supplier for this Inventory Item. | ||
| primarySupplierItemCode | String | 32 | The primary supplier’s item code for this Inventory Item. | |
| defaultReOrderQuantity | Decimal | Default re-order quantity for re-stocking alert report. | ||
| isSold | Boolean | Specifies whether the Inventory Item can be sold or not. Default: false (cannot be sold). | ||
| saleIncomeAccountUid | Int | Account for tracking sales. Only required if the item can be sold (isSold == true). Accounts used must be of type Income. | ||
| saleTaxCode | String | Default tax code for sale. | ||
| saleCoSAccountUid | Int | Accounts for tracking cost of sales. Required only if Inventory Item is inventoried & for sale. Accounts used must be of type Cost of Sales. | ||
| rrpInclTax | Decimal | The recommended retail price for this Inventory Item. Applicable only if the Inventory Item is marked for sale (IsSold == true). |








