searchMerchantApplications

Reseller only method.

Description

This method allows resellers to search their database for merchant applications based on specific criteria.

The following fields may be searched via this method: * AppRefNum * Contact * Company * Street * Street 2 * City * State * Zip * Email * Fax * Phone Number

If MatchAll is set to "true," then only results matching ALL of your search criteria will be returned. If your search does not yield the desired results, eliminate some of you search terms or set MatchAll to "false."

See also addMerchantApplication, getMerchantApplicationStatus, getMerchant, updateMerchant, deleteMerchant, getMerchantSummary

Syntax

MerchantApplicationSearchResult searchMerchantApplications ( ueSecurityToken Token, SearchParam Search, boolean MatchAll, integer Start, integer Limit, string Sort)

Arguments

Type Name Description
ueSecurityToken Token Reseller security token, used to identify reseller and validate request.
SearchParam Search Array of search parameters.
boolean MatchAll If set to "true," only results matching all search criteria will be returned, if set to "false," results matching any of the search criteria will be returned.
integer Start Start position, defaults to 0 (first merchant found).
integer Limit Maximum number of merchants to return in result.
string Sort Field name to sort the results by

Return Value

MerchantApplicationSearchResult Returns results of merchant application search based on search parameters set.

Examples

PHP

For directions on how to set up the WSDL link, create "$restoken" and "$client", go to PHP Soap How-to.

    <?php

    try {
      $search=array(
        array('Field'=>'State', 'Type'=>'eq','Value'=>'CA'),
        array('Field'=>'Contact', 'Type'=>'eq', 'Value'=>'John Doe'),
        array('Field'=>'Company', 'Type'=>'eq', 'Value'=>'DidorightInc.')
      );
      $start=0;
      $limit=100;
      $matchall=true;
      $sortby='merchid';

      $res=$client->searchMerchantApplications($restoken,$search,$matchall,$start,$limit, $sortby);

    }

    catch (SoapFault $e) {
      echo $client->__getLastRequest();
      echo $client->__getLastResponse();
      die("searchMerchantApplications failed: " .$e->getMessage());
      }

    ?>

Java

    SearchParamArray params = new SearchParamArray();
    params.add(new SearchParam("State", "eq", "CA"));

    MerchantApplicationSearchResult result;
    result = client.searchMerchantApplications(restoken, params, true, BigInteger.ZERO, new BigInteger("100"), "MerchRefNum");

    System.out.println("Found Merchant: " + result.getApplications().getMerchantApplications().get(1).getMerchantName());

Change History

Version Change
1.4 Added method