GET Search

Search for Transactions, Contacts and Inventory Items that have been indexed by the search platform.

Request Information

URI Parameters

Name Description Type Additional information
WsAccessKey The Web Service access key for this user and file which allows access to the API for the associated file (found in File - Settings). Using OAuth authentication mechanism is the preferred method to allow API access. string

Optional. Legacy authentication method and only required if not using OAuth. OAuth is preferred.

FileId Specifies the file id of the file to perform the operation upon. integer

Required

Page Specifies the page number of the result set to return. integer

None.

PageSize Specifies the number of records on each page of results. Maximum page size is 100. Defaults to 25 if not specified. integer

None.

Keywords Specifies keywords to search for. string

None.

Scope This specifies the scope of the search to be performed. Possible values are 'Transactions', 'Contacts', 'InventoryItems', or ‘All’. Only 1 search scope can be provided. Specifying ‘All’ or omitting the search scope will search across all available scopes (i.e. Transactions, Contacts and InventoryItems). Invalid search scopes are ignored and the scope is assumed to be 'All' in this instance. string

None.

TransactionType Optional. Further filter the search results by only searching on the specified transaction type(s). As an example: to search for 'Sale' Transactions only, set Scope=Transactions and TransactionType=Transactions.Sale.
Filter types supported are Transactions.Sale|Transactions.Purchase|Transactions.Journal|Transactions.Payroll
string

None.

IncludeSearchTermHighlights Specifies whether to highlight search terms in the response. Defaults to true. string

None.

Body Parameters

None.

Response Information

Resource Description

SearchResponse
Name Description Type Additional information
Transactions List of indexed transactions returned for the search criteria. Collection of TransactionSearchResponse

None.

TotalTransactionsFound Total number of transactions found for the search criteria. integer

None.

Contacts List of indexed contacts returned for the search criteria. Collection of ContactSearchResponse

None.

TotalContactsFound Total number of contacts found for the search criteria. integer

None.

InventoryItems List of indexed inventory items returned for the search criteria. Collection of InventoryItemSearchResponse

None.

TotalInventoryItemsFound Total number of inventory items found for the search criteria. integer

None.

_links Hypermedia links. Contains contextual links to possible next actions related to this resource. Only present in responses. This data is not to be sent to the server. Collection of Link

None.

Response Formats

application/json, text/json

Sample:
{
  "Transactions": [
    {
      "EntityType": "Sale",
      "Id": 44574,
      "TransactionDate": "2024-10-13T00:00:00Z",
      "DueDate": "2024-10-18T00:00:00Z",
      "Summary": "Test sale 123",
      "ContactId": 4567,
      "ContactName": "John Doe",
      "CustomerContactId": "CONT12",
      "ContactEmail": "user@myco.com",
      "Company": "MyCo",
      "TradingName": "MyCo Trading as CoMy",
      "Type": "S",
      "TotalAmountIncTax": "3224.89",
      "Currency": "AUD",
      "Tags": "",
      "Notes": "Internal notes go here",
      "ExternalNotes": "Some external notes go here...",
      "Reference": "REF 123",
      "InvoiceNumber": "INV-123",
      "InvoiceType": "Quote",
      "PurchaseOrderNumber": "PO-123",
      "Paid": false,
      "_links": [
        {
          "rel": "detail",
          "href": "https://api.saasu.com/Invoice/44574?FileId=123",
          "method": "GET",
          "title": null
        }
      ]
    }
  ],
  "TotalTransactionsFound": 1,
  "Contacts": [
    {
      "EntityType": "Contact",
      "Id": 45678,
      "Name": "John Doe",
      "CompanyId": 342,
      "Company": "Company Inc.",
      "TradingName": "Company As Inc.",
      "CustomerContactId": "U123",
      "ContactEmail": "user@companyinc.com",
      "MainPhone": "02 4567 4567",
      "SecondaryPhone": "02 7894 7894",
      "MobilePhone": "04 4567 4567",
      "TwitterId": "@someco",
      "Manager": "Donkey Kong",
      "Tags": "",
      "IsEmployee": false,
      "IsActive": true,
      "_links": [
        {
          "rel": "detail",
          "href": "https://api.saasu.com/Contact/45678?FileId=123",
          "method": "GET",
          "title": null
        },
        {
          "rel": "related",
          "href": "https://api.saasu.com/Company/342?FileId=123",
          "method": "GET",
          "title": "Company"
        }
      ]
    }
  ],
  "TotalContactsFound": 1,
  "InventoryItems": [
    {
      "EntityType": "Item",
      "Id": 4567,
      "Code": "TES1",
      "Description": "Test Item 1",
      "SupplierItemCode": "TSE12",
      "IsActive": true,
      "SellingPrice": 234.56,
      "BuyingPrice": 123.34,
      "Tags": "",
      "StockOnHand": 21.0,
      "Type": "I",
      "_links": [
        {
          "rel": "detail",
          "href": "https://api.saasu.com/Item/4567?FileId=123",
          "method": "GET",
          "title": null
        }
      ]
    },
    {
      "EntityType": "ComboItem",
      "Id": 9874,
      "Code": "CBO1",
      "Description": "Test Combo Item 1",
      "SupplierItemCode": "COM12",
      "IsActive": true,
      "SellingPrice": 222.56,
      "BuyingPrice": 111.34,
      "Tags": "",
      "StockOnHand": 3.0,
      "Type": "C",
      "_links": [
        {
          "rel": "detail",
          "href": "https://api.saasu.com/Item/9874?FileId=123",
          "method": "GET",
          "title": null
        }
      ]
    }
  ],
  "TotalInventoryItemsFound": 2,
  "_links": [
    {
      "rel": "self",
      "href": "https://api.saasu.com/Search?FileId=123",
      "method": "GET",
      "title": null
    },
    {
      "rel": "next",
      "href": "https://api.saasu.com/Search?FileId=123&Page=2&PageSize=25",
      "method": "GET",
      "title": null
    }
  ]
}

application/xml, text/xml

Sample:
<SearchResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <_links>
    <Link>
      <rel>self</rel>
      <href>https://api.saasu.com/Search?FileId=123</href>
      <method>GET</method>
    </Link>
    <Link>
      <rel>next</rel>
      <href>https://api.saasu.com/Search?FileId=123&amp;Page=2&amp;PageSize=25</href>
      <method>GET</method>
    </Link>
  </_links>
  <Transactions>
    <TransactionSearchResponse>
      <_links>
        <Link>
          <rel>detail</rel>
          <href>https://api.saasu.com/Invoice/44574?FileId=123</href>
          <method>GET</method>
        </Link>
      </_links>
      <EntityType>Sale</EntityType>
      <Id>44574</Id>
      <TransactionDate>2024-10-13T00:00:00Z</TransactionDate>
      <DueDate>2024-10-18T00:00:00Z</DueDate>
      <Summary>Test sale 123</Summary>
      <ContactId>4567</ContactId>
      <ContactName>John Doe</ContactName>
      <CustomerContactId>CONT12</CustomerContactId>
      <ContactEmail>user@myco.com</ContactEmail>
      <Company>MyCo</Company>
      <TradingName>MyCo Trading as CoMy</TradingName>
      <Type>S</Type>
      <TotalAmountIncTax>3224.89</TotalAmountIncTax>
      <Currency>AUD</Currency>
      <Tags />
      <Notes>Internal notes go here</Notes>
      <ExternalNotes>Some external notes go here...</ExternalNotes>
      <Reference>REF 123</Reference>
      <InvoiceNumber>INV-123</InvoiceNumber>
      <InvoiceType>Quote</InvoiceType>
      <PurchaseOrderNumber>PO-123</PurchaseOrderNumber>
      <Paid>false</Paid>
    </TransactionSearchResponse>
  </Transactions>
  <TotalTransactionsFound>1</TotalTransactionsFound>
  <Contacts>
    <ContactSearchResponse>
      <_links>
        <Link>
          <rel>detail</rel>
          <href>https://api.saasu.com/Contact/45678?FileId=123</href>
          <method>GET</method>
        </Link>
        <Link>
          <rel>related</rel>
          <href>https://api.saasu.com/Company/342?FileId=123</href>
          <method>GET</method>
          <title>Company</title>
        </Link>
      </_links>
      <EntityType>Contact</EntityType>
      <Id>45678</Id>
      <Name>John Doe</Name>
      <CompanyId>342</CompanyId>
      <Company>Company Inc.</Company>
      <TradingName>Company As Inc.</TradingName>
      <CustomerContactId>U123</CustomerContactId>
      <ContactEmail>user@companyinc.com</ContactEmail>
      <MainPhone>02 4567 4567</MainPhone>
      <SecondaryPhone>02 7894 7894</SecondaryPhone>
      <MobilePhone>04 4567 4567</MobilePhone>
      <TwitterId>@someco</TwitterId>
      <Manager>Donkey Kong</Manager>
      <Tags />
      <IsEmployee>false</IsEmployee>
      <IsActive>true</IsActive>
    </ContactSearchResponse>
  </Contacts>
  <TotalContactsFound>1</TotalContactsFound>
  <InventoryItems>
    <InventoryItemSearchResponse>
      <_links>
        <Link>
          <rel>detail</rel>
          <href>https://api.saasu.com/Item/4567?FileId=123</href>
          <method>GET</method>
        </Link>
      </_links>
      <EntityType>Item</EntityType>
      <Id>4567</Id>
      <Code>TES1</Code>
      <Description>Test Item 1</Description>
      <SupplierItemCode>TSE12</SupplierItemCode>
      <IsActive>true</IsActive>
      <SellingPrice>234.56</SellingPrice>
      <BuyingPrice>123.34</BuyingPrice>
      <Tags />
      <StockOnHand>21</StockOnHand>
      <Type>I</Type>
    </InventoryItemSearchResponse>
    <InventoryItemSearchResponse>
      <_links>
        <Link>
          <rel>detail</rel>
          <href>https://api.saasu.com/Item/9874?FileId=123</href>
          <method>GET</method>
        </Link>
      </_links>
      <EntityType>ComboItem</EntityType>
      <Id>9874</Id>
      <Code>CBO1</Code>
      <Description>Test Combo Item 1</Description>
      <SupplierItemCode>COM12</SupplierItemCode>
      <IsActive>true</IsActive>
      <SellingPrice>222.56</SellingPrice>
      <BuyingPrice>111.34</BuyingPrice>
      <Tags />
      <StockOnHand>3</StockOnHand>
      <Type>C</Type>
    </InventoryItemSearchResponse>
  </InventoryItems>
  <TotalInventoryItemsFound>2</TotalInventoryItemsFound>
</SearchResponse>