SearchCustomers

Search for customers.

Description

This method allows you to search the customer database using customerInternalId or customerId.

Syntax

Customer [] SearchCustomers(SecurityToken securityToken, string customerInternalId, string customerId, int start, int limit, string sort)

Arguments

Type

Name

Description

SecurityToken

securityToken

Merchant security token: used to identify merchant and validate transaction. (required)

string

customerInternalId

Unique customer ID assigned by the system. (required)

string

customerId

Customer ID. (required)

int

start

Start position, defaults to 0 (first customer found). (required)

int

limit

Maximum number of customers to return in result. (required)

string

sort

Field name to sort the results by. (optional)

Return Value

Type

Description

Customer []

Returns array of customer objects for the matched customers.

Examples

var client = new EBizSOAP.IeBizServiceClient();
EBizSOAP.SecurityToken securityToken = new EBizSOAP.SecurityToken();
securityToken.UserId = "";
securityToken.SecurityId = "1dc496d1-90b4-4a38-ad78-28a795af78e9";
securityToken.Password = "";
EBizSOAP.Customer[] Customers = client.SearchCustomers(securityToken, "101010", "", 0, 100, "FirstName");
Console.WriteLine(Customers[0].CustomerId);
Console.WriteLine(Customers[0].CustomerInternalId);
Console.WriteLine(Customers[0].FirstName);
Console.WriteLine(Customers[0].LastName);
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header/>
   <soapenv:Body>
      <ebiz:SearchCustomers>
         <ebiz:securityToken>
            <ebiz:SecurityId>1dc496d1-90b4-4a38-ad78-28a795af78e9</ebiz:SecurityId>
            <ebiz:UserId/>
            <ebiz:Password/>
         </ebiz:securityToken>
         <ebiz:customerInternalId></ebiz:customerInternalId>
         <ebiz:customerId></ebiz:customerId>
         <ebiz:start>1</ebiz:start>
         <ebiz:limit>3</ebiz:limit>
         <ebiz:sort></ebiz:sort>
      </ebiz:SearchCustomers>
   </soapenv:Body>
</soapenv:Envelope>



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">
      <SearchCustomersResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <SearchCustomersResult>
            <Customer>
               <CustomerInternalId>4d913a99-8c22-4980-b258-969cd23a41f3</CustomerInternalId>
               <CustomerId>0001</CustomerId>
               <FirstName>GENERAL HOSPITAL</FirstName>
               <LastName>GENERAL HOSPITAL</LastName>
               <CompanyName>GéNERAL' HOSPITAL &amp; Inc.</CompanyName>
               <Phone>18885007798</Phone>
               <Email>[email protected]</Email>
               <BillingAddress>
                  <FirstName>GENERAL HOSPITAL</FirstName>
                  <LastName>GENERAL HOSPITAL</LastName>
                  <CompanyName>GéNERAL' HOSPITAL &amp; Inc.</CompanyName>
                  <Address1>123 Alton</Address1>
                  <Address2>#25</Address2>
                  <City>Irvine</City>
                  <State>CA</State>
                  <ZipCode>92618</ZipCode>
               </BillingAddress>
            </Customer>
            <Customer>
               <CustomerInternalId>16cf2307-6921-4001-8854-d89b2e3b7918</CustomerInternalId>
               <CustomerId>0002</CustomerId>
               <FirstName>ROYAL  HOSP CH</FirstName>
               <LastName>ROYAL  HOSP CH</LastName>
               <CompanyName>ROYAL  HOSP CH</CompanyName>
               <Phone/>
               <Email>&amp;nbsp;</Email>
               <BillingAddress>
                  <FirstName>ROYAL  HOSP CH</FirstName>
                  <LastName>ROYAL  HOSP CH</LastName>
                  <CompanyName>ROYAL  HOSP CH</CompanyName>
                  <Address1>&amp;nbsp;</Address1>
                  <Address2>&amp;nbsp;</Address2>
                  <City>&amp;nbsp;</City>
                  <State>AB</State>
                  <ZipCode>&amp;nbsp;</ZipCode>
               </BillingAddress>
            </Customer>
            <Customer>
               <CustomerInternalId>280823f5-2107-44c9-968b-6fffb6e4c2e6</CustomerInternalId>
               <CustomerId>0003</CustomerId>
               <FirstName>GENERAL HOSPITAL NY</FirstName>
               <LastName>GENERAL HOSPITAL NY</LastName>
               <CompanyName>GENERAL HOSPITAL NY</CompanyName>
               <Phone/>
               <Email/>
               <BillingAddress>
                  <FirstName>GENERAL HOSPITAL NY</FirstName>
                  <LastName>GENERAL HOSPITAL NY</LastName>
                  <CompanyName>GENERAL HOSPITAL NY</CompanyName>
                  <Address1/>
                  <Address2/>
                  <City/>
                  <State>ON</State>
                  <ZipCode/>
               </BillingAddress>
            </Customer>
         </SearchCustomersResult>
      </SearchCustomersResponse>
   </s:Body>
</s:Envelope>