SearchCustomerList

Description

The SearchCustomerList method retrieves the Customer object from the EBizCharge platform.

Syntax

CustomerListSearchResult SearchCustomerList(SecurityToken securityToken, SearchFilter[] filters, int start, int limit, string sort, bool includeCustomerToken, bool includePaymentMethodProfiles, bool countOnly)

Arguments

Type

Name

Req.

Description

SecurityToken

securityToken

R

A unique token that is used to identify a merchant and authenticate the API request.

SearchFilter[]

filters

S

Filters Customer objects based on one or more field names, comparison operators, and field values. See supported search parameters below.

Note: If the SearchFilter object is empty, all Customer objects will be returned.

int

start

R

Index of the first object to return in the array.

Note: Must be ≥ 0.

int

limit

R

Maximum number of objects to return.

Note: Must be > 0.

string

sort

O

Sorts by field name. See the list of supported sort parameters below.

boolean

includeCustomerToken

O

Whether to include the customer token in the result.

Note: If omitted, the field default to true. If included but empty, the operation fails.

boolean

includePaymentMethodProfiles

O

Whether to include the payment method profiles in the result.

Note: If omitted, the field default to false. If included but empty, the operation fails.

boolean

countOnly

O

Whether to include the list of the matched objects or only the count.

Note: If omitted, the field default to false. If included but empty, the operation fails.

Return Value

TypeDescription
CustomerListSearchResultReturns an array of Customer objects along with the start, limit and count. Otherwise, returns a fault.

Supported Search/Sort Parameters
Parameter Description Example of Use
CustomerId Unique identifier for the customer.
<ebiz:SearchFilter>
  <ebiz:FieldName>CustomerId</ebiz:FieldName>
  <ebiz:ComparisonOperator>ne</ebiz:ComparisonOperator>
  <ebiz:FieldValue>CBS712312412</ebiz:FieldValue>
</ebiz:SearchFilter>
FirstName First name of the customer.
<ebiz:SearchFilter>
  <ebiz:FieldName>FirstName</ebiz:FieldName>
  <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
  <ebiz:FieldValue>Bob</ebiz:FieldValue>
</ebiz:SearchFilter>
LastName Last name of the customer.
<ebiz:SearchFilter>
  <ebiz:FieldName>LastName</ebiz:FieldName>
  <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
  <ebiz:FieldValue>Smith</ebiz:FieldValue>
</ebiz:SearchFilter>
CompanyName Name of the company linked to the customer.
<ebiz:SearchFilter>
  <ebiz:FieldName>CompanyName</ebiz:FieldName>
  <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
  <ebiz:FieldValue>EBizCharge</ebiz:FieldValue>
</ebiz:SearchFilter>
Phone Phone number of the customer.
<ebiz:SearchFilter>
  <ebiz:FieldName>Phone</ebiz:FieldName>
  <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
  <ebiz:FieldValue>1-234-567-8910</ebiz:FieldValue>
</ebiz:SearchFilter>
Email Email of the customer.
<ebiz:SearchFilter>
  <ebiz:FieldName>Email</ebiz:FieldName>
  <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
  <ebiz:FieldValue>[email protected]</ebiz:FieldValue>
</ebiz:SearchFilter>
SoftwareId Unique identifier for the software.
<ebiz:SearchFilter>
  <ebiz:FieldName>SoftwareId</ebiz:FieldName>
  <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
  <ebiz:FieldValue>123456</ebiz:FieldValue>
</ebiz:SearchFilter>
DivisionId Unique identifier for the division.
<ebiz:SearchFilter>
  <ebiz:FieldName>DivisionId</ebiz:FieldName>
  <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
  <ebiz:FieldValue>12345</ebiz:FieldValue>
</ebiz:SearchFilter>
DateTimeCreated Date and time that the customer was created.
<ebiz:SearchFilter>
  <ebiz:FieldName>DateTimeCreated</ebiz:FieldName>
  <ebiz:ComparisonOperator>ge</ebiz:ComparisonOperator>
  <ebiz:FieldValue>2024-08-21</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:SearchCustomerList>
         <ebiz:securityToken>
            <ebiz:SecurityId>********-23f6-4466-a993-f0008187ab9a</ebiz:SecurityId>
            <ebiz:UserId/>
            <ebiz:Password/>
         </ebiz:securityToken>
         <ebiz:filters>
            <!--Zero or more repetitions:-->
            <ebiz:SearchFilter>
               <ebiz:FieldName>SoftwareId</ebiz:FieldName>
               <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
               <ebiz:FieldValue>IOSMobileApp</ebiz:FieldValue>
            </ebiz:SearchFilter>
         </ebiz:filters>
         <ebiz:start>1</ebiz:start>
         <ebiz:limit>3</ebiz:limit>
         <ebiz:sort>1</ebiz:sort>
         <ebiz:includeCustomerToken>true</ebiz:includeCustomerToken>
         <ebiz:includePaymentMethodProfiles>true</ebiz:includePaymentMethodProfiles>
         <ebiz:countOnly>true</ebiz:countOnly>
      </ebiz:SearchCustomerList>
   </soapenv:Body>
</soapenv:Envelope>
public void SearchCustomerList()
{
  eBizService apiClient = new eBizService();
  SecurityToken securityToken = new SecurityToken
  {
    SecurityId = "*******-c870-41b8-aa5c-205e55b7a049",
    UserId = "",
    Password = ""
    };
  //Declare the Array of searchfilters
  SearchFilter[] searchFilters = new SearchFilter[1];
  //Declare a SearchFilter
  SearchFilter searchFilter = new SearchFilter();
  searchFilter.FieldName = "DateTimeCreated";
  searchFilter.ComparisonOperator = "gt";
  searchFilter.FieldValue = "04/01/2022";
  //Add SearchFilter to Array for SearchFilters
  searchFilters[0] = searchFilter;
  var response = apiClient.SearchCustomerList(securityToken,searchFilters,0, 100, "",true,true,false);
  Console.WriteLine(response.Count);
  Console.ReadLine();
}
public function SearchCustomerList()
{
  $client = new SoapClient('End point URL');
  $securityToken = array(
    'SecurityId' => '******-454757-4567457-777',
    'UserId' => 'merchant1',
    'Password' => 'merchant1'
  );

  $filters = array(
    'FieldName' => 'Email',
    'ComparisonOperator' => 'eq',
    'FieldValue' => '[email protected]',
  );

  $response = $client->SearchCustomerList(
    array(
      'securityToken' => $securityToken,
      'filters' => array('SearchFilter' => $filters),
      'includeCustomerToken' => 1,
      'includePaymentMethodProfiles' => 0,
      'countOnly' => false,
      'start' => 0,
      'limit' => 100,
    )
  );

  $result = $response->SearchCustomerListResult;
}

Example Response

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SearchCustomerListResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <SearchCustomerListResult>
            <CustomerList>
               <Customer>
                  <CustomerInternalId>***************-0b2a-44ed-90be</CustomerInternalId>
                  <CustomerId>****2833</CustomerId>
                  <FirstName>Rachel</FirstName>
                  <LastName>Bayswater</LastName>
                  <CompanyName>Cbs</CompanyName>
                  <Phone>(555) 555-5556</Phone>
                  <Email>[email protected]</Email>
                  <BillingAddress>
                     <FirstName>Rachel</FirstName>
                     <LastName>Bayswater</LastName>
                     <CompanyName>Cbs</CompanyName>
                     <Address1>55 Golden</Address1>
                     <Address2 />
                     <City>Irvine</City>
                     <State>CA</State>
                     <ZipCode>92618</ZipCode>
                     <IsDefault xsi:nil="true" />
                  </BillingAddress>
                  <ShippingAddress>
                     <FirstName>Rachel</FirstName>
                     <LastName>Bayswater</LastName>
                     <CompanyName>Cbs</CompanyName>
                     <Address1/>
                     <Address2/>
                     <Address3/>
                     <City/>
                     <State/>
                     <ZipCode/>
                     <Country/>
                     <IsDefault>true</IsDefault>
                     <AddressId/>
                  </ShippingAddress>
                  <PaymentMethodProfiles>
                     <PaymentMethodProfile>
                        <MethodType>cc</MethodType>
                        <MethodID>**************-d2d8b4b15cc5</MethodID>
                        <MethodName/>
                        <Created>0001-01-01T00:00:00</Created>
                        <Modified>0001-01-01T00:00:00</Modified>
                        <AccountHolderName>Waseem Sadiq</AccountHolderName>
                        <AvsStreet>Irvine</AvsStreet>
                        <AvsZip>92620</AvsZip>
                        <CardExpiration>2023-20</CardExpiration>
                        <CardNumber>XXXXXXXXXXXX2224</CardNumber>
                        <CardType>V</CardType>
                        <Balance xsi:nil="true"/>
                        <MaxBalance xsi:nil="true"/>
                     </PaymentMethodProfile>
                     <PaymentMethodProfile>
                        <Created>0001-01-01T00:00:00</Created>
                        <Modified>0001-01-01T00:00:00</Modified>
                        <Balance xsi:nil="true"/>
                        <MaxBalance xsi:nil="true"/>
                     </PaymentMethodProfile>
                  </PaymentMethodProfiles>
                  <CustomerToken>****949</CustomerToken>
                  <SoftwareId>IOSMobileApp</SoftwareId>
                  <CustomerCustomFields/>
                  <DivisionId/>
                  <DateTimeCreated>2021-04-13 10:09:04</DateTimeCreated>
                  <DateTimeModified>2021-04-27 08:41:28</DateTimeModified>
               </Customer>
            </CustomerList>
            <Start>1</Start>
            <Limit>3</Limit>
            <Count>1</Count>
         </SearchCustomerListResult>
      </SearchCustomerListResponse>
   </s:Body>
</s:Envelope>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <s:Fault>
         <faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</faultcode>
         <faultstring xml:lang="en-US">The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the &lt;serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.</faultstring>
      </s:Fault>
   </s:Body>
</s:Envelope>