SearchSalesOrders

Description

The SearchSalesOrder method retrieves SalesOrder objects from the EBizCharge platform. If no IDs or filters are applied, all SalesOrder objects will be returned.

Syntax

SalesOrder[] SearchSalesOrders(SecurityToken securityToken , string customerId, string subCustomerId, string salesOrderNumber, string salesOrderInternalId, SearchFilter[] filters, int start, int limit, string sort, bool includeItems)

Arguments

TypeNameReq.Description
SecurityTokensecurityTokenRA unique token that is used to identify a merchant and authenticate the API request.
stringcustomerIdDFilters sales orders by Customer.

Note: Required when sending salesOrderNumber.
stringsubCustomerIdO

Filters sales orders by SubCustomer.

Note: Must be sent along with the customerId. Cannot be sent alone.

stringsalesOrderNumberD

Filters by the sales orders number.

Note: Required if salesOrderInternalId is not sent. Must be sent with customerId.

stringsalesOrderInternalIdD

Filters sales orders by internal ID.

Note: Required if salesOrderNumber is not sent.

SearchFilterfiltersOFilters SalesOrder objects based on one or more field names, comparison operators, and field values. See supported search parameters below.
intstartR

Index of the first object to return in the array.

Note: Must be ≥ 0.

intlimitR

Maximum number of objects to return.

Note: Must be > 0.

stringsortOField name to sort the results by.
Supported Sort Parameters
  • SalesOrderInternalId
  • Date
  • Currency
  • Amount
  • DateUplodaded
  • Software
  • TotalTaxAmount
  • LocationId
booleanincludeItemsRWhether to include the Item object from the retrieved SalesOrder.

Return Value

TypeDescription
SalesOrder[]On success, returns an array of matching SalesOrder objects.

Supported Search Parameters
ParameterDescriptionExample of Use
SalesOrderNumberFilters by sales order number.

<ebiz:SearchFilter>
<ebiz:FieldName>SalesOrderNumber</ebiz:FieldName>
<ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
<ebiz:FieldValue>So001</ebiz:FieldValue>
</ebiz:SearchFilter>

SalesOrderInternalIdFilters by sales order internal ID.

<ebiz:SearchFilter>
<ebiz:FieldName>SalesOrderInternalId</ebiz:FieldName>
<ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
<ebiz:FieldValue>*******2341234-4853947*****</ebiz:FieldValue>
</ebiz:SearchFilter>

DateFilters by the date the sales order was created.

<ebiz:SearchFilter>
<ebiz:FieldName>Date</ebiz:FieldName>
<ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
<ebiz:FieldValue>2019-07-01</ebiz:FieldValue>
</ebiz:SearchFilter>

CurrencyFilters by the currency code used in the order.

<ebiz:SearchFilter>
<ebiz:FieldName>Currency</ebiz:FieldName>
<ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
<ebiz:FieldValue>USD</ebiz:FieldValue>
</ebiz:SearchFilter>

AmountFilters by the total amount of the sales order.

<ebiz:SearchFilter>
<ebiz:FieldName>Amount</ebiz:FieldName>
<ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
<ebiz:FieldValue>125.45</ebiz:FieldValue>
</ebiz:SearchFilter>

DueDateFilters by the date the sales order is due.

<ebiz:SearchFilter>
<ebiz:FieldName>DueDate</ebiz:FieldName>
<ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
<ebiz:FieldValue>2019-07-20</ebiz:FieldValue>
</ebiz:SearchFilter>

PoNumFilters by the purchase order number associated to the sales order.

<ebiz:SearchFilter>
<ebiz:FieldName>PoNum</ebiz:FieldName>
<ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
<ebiz:FieldValue>po001</ebiz:FieldValue>
</ebiz:SearchFilter>

DivisionIdFilters by the division ID associated to the sales order.

<ebiz:SearchFilter>
<ebiz:FieldName>DivisionId</ebiz:FieldName>
<ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
<ebiz:FieldValue>123</ebiz:FieldValue>
</ebiz:SearchFilter>

DateUploadedFilters orders uploaded after a certain date.

<ebiz:SearchFilter>
<ebiz:FieldName>DateUploaded</ebiz:FieldName>
<ebiz:ComparisonOperator>gt</ebiz:ComparisonOperator>
<ebiz:FieldValue>2019-05-31</ebiz:FieldValue>
</ebiz:SearchFilter>

SoftwareFilters by the integration associated to the sales order.

<ebiz:SearchFilter>
<ebiz:FieldName>NotifyCustomer</ebiz:FieldName>
<ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
<ebiz:FieldValue>true</ebiz:FieldValue>
</ebiz:SearchFilter>

NotifyCustomerFilters based on whether the customer should be notified about the sales order.

<ebiz:SearchFilter>
<ebiz:FieldName>NotifyCustomer</ebiz:FieldName>
<ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
<ebiz:FieldValue>true</ebiz:FieldValue>
</ebiz:SearchFilter>

URLFilters by the URL link to associated sales order document.

<ebiz:SearchFilter>
<ebiz:FieldName>URL</ebiz:FieldName>
<ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
<ebiz:FieldValue>[www.EBizCharge.com](http://www.EBizCharge.com)</ebiz:FieldValue>
</ebiz:SearchFilter>

TotalTaxAmountFilters by the total tax amount for the order.

<ebiz:SearchFilter>
<ebiz:FieldName>TotalTaxAmount</ebiz:FieldName>
<ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
<ebiz:FieldValue>20.25</ebiz:FieldValue>
</ebiz:SearchFilter>

UniqueIdFilters by the external reference or unique ID for the order.

<ebiz:SearchFilter>
<ebiz:FieldName>UniqueId</ebiz:FieldName>
<ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
<ebiz:FieldValue>Sr001</ebiz:FieldValue>
</ebiz:SearchFilter>

IsToBeEmailedFilters by whether the sales order should be emailed.

<ebiz:SearchFilter>
<ebiz:FieldName>IsToBeEmailed</ebiz:FieldName>
<ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
<ebiz:FieldValue>false</ebiz:FieldValue>
</ebiz:SearchFilter>

IsToBePrintedFilters by whether the sales order should be printed.

<ebiz:SearchFilter>
<ebiz:FieldName>IsToBePrinted</ebiz:FieldName>
<ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
<ebiz:FieldValue>false</ebiz:FieldValue>
</ebiz:SearchFilter>

LocationIdFilters by the location ID of the sales order.

<ebiz:SearchFilter>
<ebiz:FieldName>LocationId</ebiz:FieldName>
<ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
<ebiz:FieldValue>Pakistan</ebiz:FieldValue>
</ebiz:SearchFilter>


Example Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header/>
   <soapenv:Body>
      <ebiz:SearchSalesOrders>
         <ebiz:securityToken>
            <ebiz:SecurityId>************-40ea-ba1b-32423************</ebiz:SecurityId>
            <ebiz:UserId/>
            <ebiz:Password/>
         </ebiz:securityToken>
         <ebiz:customerId/>
         <ebiz:subCustomerId/>
         <ebiz:salesOrderNumber/>
         <ebiz:salesOrderInternalId>*******0ea-ba1b-beddb>*******</ebiz:salesOrderInternalId>
         <ebiz:filters>
            <!--Zero or more repetitions:-->
            <ebiz:SearchFilter>
               <ebiz:FieldName>CustomerId</ebiz:FieldName>
               <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
               <ebiz:FieldValue>BCustomer</ebiz:FieldValue>
            </ebiz:SearchFilter>
         </ebiz:filters>
         <ebiz:start>0</ebiz:start>
         <ebiz:limit>100</ebiz:limit>
         <ebiz:sort/>
         <ebiz:includeItems>true</ebiz:includeItems>
      </ebiz:SearchSalesOrders>
   </soapenv:Body>
</soapenv:Envelope>
public void SearchSalesOrders()
{
    eBizService apiClient = new eBizService();
    SecurityToken securityToken = new SecurityToken
    {
      SecurityId = "*******-c870-41b8-aa5c-********",
      UserId = "",
      Password = ""
      };
    //Declare the Array of searchfilters
    SearchFilter[] searchFilters = new SearchFilter[1];
    //Declare a SearchFilter
    SearchFilter searchFilter = new SearchFilter();
    searchFilter.FieldName = "DateUploaded";
    searchFilter.ComparisonOperator = "gt";
    searchFilter.FieldValue = "04/01/2022";
    //Add SearchFilter to Array for SearchFilters
    searchFilters[0] = searchFilter;
    //Search Salesorders
    var salesOrders = apiClient.SearchSalesOrders(securityToken, "APIINVCust", "", "", "", searchFilters, 1, 100, "", true);
    Console.WriteLine(salesOrders.Length);
    Console.ReadLine();
}
public function SearchSalesOrders()
{
    $client = new SoapClient('End point URL');
    $securityToken = array(
        'SecurityId' => '******-454757-4567457-********',
        'UserId' => 'merchant1',
        'Password' => 'merchant1'
    );
    $response = $client->SearchSalesOrders(array(
        'securityToken' => $securityToken,
        'customerId' => '123',
        'salesOrderNumber' => '00102566',
        'salesOrderInternalId' => '45435-45435-543543-435',
        'start' => 0,
        'limit' => 100,
    ));
    $result = $response->SearchSalesOrdersResult;
}

Example Response

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <SearchSalesOrdersResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <SearchSalesOrdersResult>
            <SalesOrder>
               <CustomerId>BCustomer</CustomerId>
               <SubCustomerId/>
               <SalesOrderNumber/>
               <SalesOrderInternalId>************-40ea-ba1b-32423************</SalesOrderInternalId>
               <Date>1900-01-01</Date>
               <Currency></Currency>
               <Amount>125.4500</Amount>
               <DueDate>2019-07-20</DueDate>
               <AmountDue>100.2500</AmountDue>
               <PoNum>po001</PoNum>
               <DivisionId></DivisionId>
               <DateUploaded>2025-12-08 22:00:03</DateUploaded>
               <Items>
                  <Item>
                     <ItemId>01-00097</ItemId>
                     <Name>01-00097</Name>
                     <Description>Wall Mounted Vent-free Gas Fireplace</Description>
                     <UnitPrice>20.2500</UnitPrice>
                     <Qty>10.0000</Qty>
                     <Taxable>true</Taxable>
                     <TaxRate>0.0000</TaxRate>
                     <UnitOfMeasure>EA</UnitOfMeasure>
                     <TotalLineAmount>200.2500</TotalLineAmount>
                     <TotalLineTax>10.0000</TotalLineTax>
                     <ItemLineNumber>1</ItemLineNumber>
                     <GrossPrice>0.0000</GrossPrice>
                     <WarrantyDiscount>0.0000</WarrantyDiscount>
                     <SalesDiscount>0.0000</SalesDiscount>
                     <ItemClass/>
                     <ItemCustomFields/>
                  </Item>
                  <Item>
                     <ItemId>01-00098</ItemId>
                     <Name>01-00099</Name>
                     <Description>TV</Description>
                     <UnitPrice>2000.2500</UnitPrice>
                     <Qty>10.0000</Qty>
                     <Taxable>true</Taxable>
                     <TaxRate>0.0000</TaxRate>
                     <UnitOfMeasure>EA</UnitOfMeasure>
                     <TotalLineAmount>2000.2500</TotalLineAmount>
                     <TotalLineTax>10.0000</TotalLineTax>
                     <ItemLineNumber>1</ItemLineNumber>
                     <GrossPrice>0.0000</GrossPrice>
                     <WarrantyDiscount>0.0000</WarrantyDiscount>
                     <SalesDiscount>0.0000</SalesDiscount>
                     <ItemClass/>
                     <ItemCustomFields/>
                  </Item>
               </Items>
               <Software>qb</Software>
               <NotifyCustomer xsi:nil="true"/>
               <URL/>
               <TotalTaxAmount>20.2500</TotalTaxAmount>
               <UniqueId>Sr001</UniqueId>
               <TermsId>Net30</TermsId>
               <IsToBeEmailed>false</IsToBeEmailed>
               <IsToBePrinted>false</IsToBePrinted>
               <SalesOrderCustomFields/>
               <LocationId/>
            </SalesOrder>
         </SearchSalesOrdersResult>
      </SearchSalesOrdersResponse>
   </s:Body>
</s:Envelope>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <SearchSalesOrdersResponse xmlns="http://eBizCharge.ServiceModel.SOAP"/>
   </s:Body>
</s:Envelope>