PRODUCT_ORDER_SEARCH PRODUCT Endpoint
  /rpc/product/?method=PRODUCT_ORDER_SEARCH  
  Note: The sub-searches require 1blankspace.advancedsearch.011.js or higher.  
  For information on how to use Advanced Searches, click here  
  DETAILS    
  Prefix Order  
  SUB SEARCHES    
  Attachment CORE_ATTACHMENT_SEARCH  
  OrderItem PRODUCT_ORDER_ITEM_SEARCH  
  OrderByBusiness CONTACT_BUSINESS_SEARCH  
  OrderByPerson CONTACT_PERSON_SEARCH  
  BillToBusiness CONTACT_BUSINESS_SEARCH  
  BillToPerson CONTACT_PERSON_SEARCH  
  SalesPerson CONTACT_PERSON_SEARCH  
  AVAILABLE FIELDS TYPE  
  Area Numeric Id of the Linked Area
  AreaText Text (50) Title of the linked Area
  BillToBusiness Numeric Id of the Business to bill for the Order
  BillToBusinessText Text (50) Name of the Business to bill for the Order
  BillToPerson Numeric Id of the Person to bill for the Order
  BillToPersonText Text (50) Name of the Person to bill for the Order
  CardExpiry Date  
  CardHoldersName Text (50)  
  CardNumber Text (50)  
  DeliveryDate Date  
  DeliveryDateTimeZone Numeric  
  DeliveryDateTimeZoneText Text (50)  
  DeliveryNotes Text (1000)  
  Id Numeric  
  KeyDate Date  
  KeyDateTimeZone Numeric  
  KeyDateTimeZoneText Text (50)     MailingAddressCombined Text (200) Mailing Address 1 and Mailing Address 2 in the one field
  MailingAddress1 Text (100)  
  MailingAddress2 Text (100)  
  MailingCountry Text (50)  
  MailingPostCode Text (10)  
  MailingState Text (30)  
  MailingSuburb Text (50)  
  Notes Text (2000)  
  Object Numeric  
  ObjectContext Numeric  
  ObjectText Text  
  OrderByBusiness Numeric Id of the Business the Order is for
  OrderByBusinessText Text (50) Name of the business the Order is for
  OrderByPerson Numeric Id of the person the Order is for
  OrderByPersonText Text (50) Name of the person the Order is for
  OrderDate Date  
  OrderDateTimeZone Numeric  
  OrderDateTimeZoneText Text (50)  
  PaymentAccount Numeric For online orders (ie via SITE_ORDER_MANAGE), the SETUP_FINANCIAL_FUNDS_TRANSFER_ACCOUNT_SEARCH account that was used to receive payment. This cannot be updated.
  PaymentAccountText Text (50) As above
  PaymentReference Text (50) As above. The reference from where the payment was collected
  PaymentToken Text (50) As above. If the payment was done via PayPal, the token that was used.
  ProcessingStatus Numeric Define your own
  ProcessingStatusText Text (50) See above
  Project Numeric Id of the Linked Project
  ProjectText Text (50) Reference of the linked Project
  PurchaseOrder Text (20) Customer's Purchase Order Number
  Reference Text (50)  
  SalesPerson Numeric Id of the Sales Person
  SalesPersonText Text (50) Name of the Sales Person
  Source Numeric 1=Manually Entered,2=Web Order
  SourceText Text (50) See above
  Status Numeric 1=Completed,2=To Be Processed,4=Not Started,5=Awaiting Final Submit (Web Order),6=Requires Approval,7=Processing,8=Cancelled,9=On Hold,10=On Back Order / Part Delivered,11=Invoiced - In Progress
  StatusText Text (50) See above
  StreetAddressCombined Text (200) Street Address 1 and Street Address 2 in the one field
  StreetAddress1 Text (100)  
  StreetAddress2 Text (100)  
  StreetCountry Text (50)  
  StreetPostCode Text (10)  
  StreetState Text (30)  
  StreetSuburb Text (50)  
       
  Item Fields:   Note: These fields have been deprecated. Use the Order Item sub search instead
       
  ItemArea Numeric Id of the Linked Area
  ItemAreaText Text (50) Title of the linked Area
  ItemPriceType Numeric 1=Retail,2=Wholesale
  ItemPriceTypeText Text (50) See above
  ItemProduct Numeric Id of the Product
  ItemProductText Text (50) Title of the Product
  ItemQuantity Numeric  
  ItemTotalCost Numeric  
  ItemTotalTax Numeric  
  ItemUnitCost Numeric  
       
  Audit Fields   Click here for more information
  RETURN  
  Selected Fields  
  EXAMPLE
  1. Web Orders created this month
  var oAdvancedSearch = new AdvancedSearch();
oAdvancedSearch.endPoint = 'product';
oAdvancedSearch.method = 'PRODUCT_ORDER_SEARCH';
oAdvancedSearch.addField('reference,itemproducttext,itemproduct,itemquantity,itemtotalcost');
oAdvancedSearch.addFilter('source','EQUAL_TO','2');
oAdvancedSearch.addFilter('createddate','MONTH_TO_DATE');oAdvancedSearch.sort('reference', 'desc');oAdvancedSearch.getResults(function(asData) { SearchComplete(asData);});
  2. Direct posting of JSON to get the Order Reference, the Order By Person's Surname, and the Unit's Cost
 
{
	"fields":
		[
			{
				"name":"order.reference"
			},
			{
				"name":"order.orderbyperson.surname"
			},
			{
				"name":"order.orderitem.unitcost"
			}
		]
}