Saasu.com

API HTTP Get

Retrieving a Single Entity

To retrieve an entity, pass in the entity uid. The entity uid is specified in the URL using the uid query string parameter. For Invoice, you can specify an additional format query string parameter. Accepted formats are xml and pdf. Setting the format value to pdf will cause the invoice to be returned as PDF instead of XML.

Example

To retrieve a contact with uid 123
https://secure.saasu.com/sandbox/webservices/rest/r1/contact?wsaccesskey=test-888-888&fileuid=888888&uid=123

To retrieve an invoice with uid 123 (output as XML) https://secure.saasu.com/sandbox/webservices/rest/r1/invoice?wsaccesskey=test-888-888&fileuid=888888&uid=123

To retrieve an invoice with uid 123 (output as PDF)
https://secure.saasu.com/sandbox/webservices/rest/r1/invoice?wsaccesskey=test-888-888&fileuid=888888&uid=123&format=pdf

HTTP GET Queries

The term queries refers to lists and reports in this documentation.

Criteria are embedded in the request URI using query string parameters. All criteria are joined using the AND logical operator, unless explicitly specified otherwise in the schema or this documentation.

For every query, you can specify what fields to retrieve and how the result is sorted through URL query string parameters. If no fields or sort options are specified, the operation will return with default fields and sort options as determined by the system.

Fields are specified through fields query string parameter, and sorting is specified through sort options query string parameter. Their values are comma separated. All valid fields for every resource as documented can be used in sort options.

InvoiceList

Criteria

QueryStringParameter Type Required? Notes
TransactionType String Y Either S or P.
S = Sale.
P = Purchase.
PaidStatus String   Either Paid or Unpaid.
InvoiceStatus     Use:
Q = Quote
O = Order
I = Invoice
InvoiceDateFrom Date   If invoiceDateFrom and invoiceDateTo are both provided, invoices between the specified dates will be returned.If invoiceDateFrom is provided but invoiceDateTo is not provided, invoices with date >= invoiceDateFrom will be returned.

If invoiceDateFrom is not provided but invoiceDateTo is provided, invoices with date <= invoiceDateTo will be returned.

InvoiceDateTo Date    
InvoiceDueDateFrom Date   If InvoiceDueDateFrom and invoiceDueDateTo are both provided, invoices that are due between the specified dates will be returned.If invoiceDueDateFrom is provided but invoiceDueDateTo is not provided, invoices with due date >= invoiceDueDateFrom will be returned.

If invoiceDueDateFrom is not provided but invoiceDueDateTo is provided, invoices with due date <= invoiceDueDateTo will be returned.

InvoiceDueDateTo Date    
ContactUid Int    
FolderUid Int    
IsSent Boolean    
InvoiceNumberBeginsWith String    
PurchaseOrderNumberBeginsWith String    

Valid Fields

InvoiceUid, LastUpdatedUid, FolderUid, FolderName, TransactionType, InvoiceDate, Summary, InvoiceNumber, PurchaseOrderNumber, DueDate, TotalAmountInclTax, PaymentCount, TotalAmountPaid, AmountOwed, PaidStatus, RequiresFollowUp, IsSent,

InvoiceLayout, InvoiceStatus, ContactUid, ContactGivenName, ContactFamilyName, ContactOrganisationName

Default Fields

InvoiceUid, LastUpdatedUid, TransactionType, InvoiceDate, DueDate, ContactOrganisationName, Summary, TotalAmountInclTax, AmountOwed

Default Sort Options

InvoiceDate DESC, DueDate ASC

Examples

Retrieve a list of unpaid sale orders for contact 9, with the ones due first displayed on top
https://…/InvoiceList?WSAccessKey=XXX&FileUid=999&TransactionType=S&ContactUid=9&InvoiceStatus=O&PaidStatus=unpaid&fields=InvoiceUid,DueDate,PurchaseOrderNumber,TotalAmountInclTax,AmountOwed&sortoptions=DueDate%20ASC,PurchaseOrderNumber%20ASC

InvoicePaymentList

Criteria

QueryStringParameter Type Required? Notes
TransactionType String Y Either SP or PP
S = Sale Payment
P = Purchase Payment
PaymentDateFrom Date   If PaymentDateFrom and PaymentDateTo are both provided, payments paid/received between the specified dates will be returned.If PaymentDateFrom is provided but PaymentDateTo is not provided, payments with date >= payments will be returned.

If PaymentDateFrom is not provided but PaymentDateTo is provided, payments with date <= PaymentDateTo will be returned.

PaymentDateTo Date    
DateClearedFrom Date   If DateClearedFrom and DateClearedTo are both provided, payments cleared between the specified dates will be returned.If DateClearedFrom is provided but DateClearedTo is not provided, payments cleared date >= DateClearedFrom will be returned.

If DateClearedFrom is not provided but DateClearedTo is provided, payments cleared <= DateClearedTo will be returned.

DateClearedTo Date    
BankAccountUid Int   The bank account where the payment is made or banked to.

Valid Fields

InvoicePaymentUid, LastUpdatedUid, PaymentDate, DateCleared, Summary, Reference, BankAccountUid, BankAccountName, Amount, RequiresFollowUp

Default Fields

InvoicePaymentUid, LastUpdatedUid, PaymentDate, Summary, Reference, BankAccountName, Amount

Default Sort Options

PaymentDate DESC, Summary ASC

Examples

Retrieve a list of sale payments dated between 1-Jul-05 to 30-Jun-06 banked to Westpac Account (BankAccountUid = 8101).
https://…/InvoicePaymentList?WSAccessKey=XXX&FileUid=999&TransactionType=SP&BankAccountUid=8101&PaymentDateFrom=2005-07-01&PaymentDateTo=2006-06-30

ContactList

Criteria

QueryStringParameter Type Required? Notes
StatusUid Int    
IndustryUid Int    
IsActive Boolean    
SearchFieldName String   Valid values: OrganisationName, GivenName, or FamilyName.
SearchFieldNameBeginsWith String    

Valid Fields

ContactUid, LastUpdatedUid, GivenName, MiddleInitials, FamilyName, OrganisationName, OrganisationPosition, IsActive, Street, City, State, PostCode, Country, ABN, PrimaryPhone, SecondaryPhone, MobilePhone, Fax, EmailAddress, DateOfBirth, WebsiteUrl, StatusUid, Status, IndustryUid, Industry

Default Fields

ContactUid, LastUpdatedUid, OrganisationName, GivenName, FamilyName, MainPhone, EmailAddress

Default Sort Options

OrganisationName ASC, GivenName ASC, FamilyName ASC

Examples

Retrieve a list prospect customers (contact category uid = 721) from IT industry (contact category uid = 890).
https://…/ContactList?WSAccessKey=XXX&FileUid=999&StatusUid=721&IndustryUid=890

Retrieve a list of contacts (ContactUid, GivenName, FamilyName, EmailAddress) where the given name begins with J order by given name ascending, then followed by family name ascending.
https://…/ContactList?WSAccessKey=XXX&FileUid=999&SearchFieldName=GivenName&SearchFieldNameBeginsWith=J&Fields=ContactUid,GivenName,FamilyName,EmailAddress&SortOptions=GivenName%20ASC,FamilyName%20ASC

CategoryCategoryList

Criteria

QueryStringParameter Type Required? Notes
ContactCategoryType String   Valid values: Industry, Status

Valid Fields

ContactCategoryUid, LastUpdatedUid, ContactCategoryType, Name

Default Fields

ContactCategoryUid, LastUpdatedUid, ContactCategoryType, Name

Default Sort Options

ContactCategoryType ASC, Name ASC

Examples

Retrieve a list of status contact categories.
https://…/ContactCategoryList?WSAccessKey=XXX&FileUid=999&ContactCategoryType=Status

FolderList

Criteria

QueryStringParameter Type Required? Notes
       

Valid Fields

FolderUid, LastUpdatedUid, Name

Default Fields

FolderUid, LastUpdatedUid, Name

Default Sort Options

Name ASC

Examples

Retrieve a list of folders
https://…/FolderList?WSAccessKey=XXX&FileUid=999

TransactionCategoryList

Criteria

QueryStringParameter Type Required? Notes
Type String   Valid value is one of the following:
Income, Expense, Asset, Equity, Loan, Other Income, Other Expense, Cost of Sales
IsActive Boolean    
IsInbuilt Boolean   Inbuilt Accounts/Transaction Categories are system-wide Accounts/Transaction Categories that are shared across all Files.

Valid Fields

TransactionCategoryUid, LastUpdatedUid, Type, Name, IsActive, IsInbuilt

Default Fields

TransactionCategoryUid, LastUpdatedUid, Type, Name, IsActive

Default Sort Options

Type ASC, Name ASC

Examples

Retrieve a list of active expense transaction categories that are not inbuilt.
https://…/TransactionCategoryList?WSAccessKey=XXX&FileUid=999&Type=Expense&IsActive=true&IsInbuilt=false

BankAccountList

Criteria

QueryStringParameter Type Required? Notes
Type String   Valid value is one of the following:
Income, Expense, Asset, Equity, Loan, Other Income, Other Expense, Cost of Sales
IsActive Boolean    
IsInbuilt Boolean   Inbuilt Accounts/Transaction Categories are system-wide Accounts/Transaction Categories that are shared across all Files.

Valid Fields

BankAccountUid, LastUpdatedUid, Type, Name, IsActive, IsInbuilt, DisplayName, BSB, AccountNumber

Default Fields

BankAccountUid, LastUpdatedUid, Type, BSB, AccountNumber, DisplayName, IsActive

Default Sort Options

Type ASC, DisplayName ASC

Examples

Retrieve a list of active bank accounts.
https://…/BankAccountList?WSAccessKey=XXX&FileUid=999&IsActive=true

InventoryItemList

Criteria

QueryStringParameter Type Required? Notes
IsActive Boolean    
CodeBeginsWith String    
DescriptionBeginsWith String    

Valid Fields

InventoryItemUid, LastUpdatedUid, Code, Description, IsActive, StockOnHand, CurrentValue, AverageCost, RrpInclTax

Default Fields

InventoryItemUid, LastUpdatedUid, Code, Description, IsActive, StockOnHand, CurrentValue, AverageCost, RrpInclTax

Default Sort Options

Description ASC, Code ASC

Examples

Retrieve a list of inventory items where the description begins with Pentium.
https://…/InventoryItemList?WSAccessKey=XXX&FileUid=999&DescriptionBeginsWith=Pentium

ComboItemList

Criteria

QueryStringParameter Type Required? Notes
IsActive Boolean    
CodeBeginsWith String    
DescriptionBeginsWith String    

Valid Fields

InventoryItemUid, LastUpdatedUid, Code, Description, IsActive, StockOnHand, CurrentValue, AverageCost, RrpInclTax

Default Fields

InventoryItemUid, LastUpdatedUid, Code, Description, IsActive, StockOnHand, CurrentValue, AverageCost, RrpInclTax

Default Sort Options

Description ASC, Code ASC

Examples

Retrieve a list of combo items where the description begins with SOHO.
https://…/InventoryItemList?WSAccessKey=XXX&FileUid=999&DescriptionBeginsWith=SOHO



Was this page useful?