AccountWebService.FindAccount Method 

Searches for specified accounts

[C#]
public TotalListOfAccountValue FindAccount(
   string criteria,
   int startPos,
   int count,
   AccountFields sortField,
   SortDirection sortDirection,
   params AccountRoles[] roleFilter
);

Parameters

criteria
Search criteria.
startPos
Start position.
count
Maximum number of records to return.
sortField
Field to sort by (AccountFields).
sortDirection
Sort direction (SortDirection).
roleFilter
Role filter.

Return Value

A TotalList`1 that contains AccountValue objects of found accounts.

Example SOAP 1.1

Request
POST /wsb/ServiceFacade/4.0/AccountWebService.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://swsoft.com/webservices/sb/4.0/AccountService/FindAccount"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <CredentialsSoapHeader xmlns="http://swsoft.com/webservices/sb/4.0/AccountService">
      <SsoSessionId>string</SsoSessionId>
      <SsoId>string</SsoId>
      <Login>string</Login>
      <Password>string</Password>
    </CredentialsSoapHeader>
  </soap:Header>
  <soap:Body>
    <FindAccount xmlns="http://swsoft.com/webservices/sb/4.0/AccountService">
      <criteria>string</criteria>
      <startPos>int</startPos>
      <count>int</count>
      <sortField>UserName or Email or FirstName or LastName or FullName or IsLockedOut or IsBuiltIn or CreationDate or OwnerName or Role</sortField>
      <sortDirection>Ascending or Descending</sortDirection>
      <roleFilter>
        <AccountRoles>Administrator or Reseller or SiteOwner</AccountRoles>
        <AccountRoles>Administrator or Reseller or SiteOwner</AccountRoles>
      </roleFilter>
    </FindAccount>
  </soap:Body>
</soap:Envelope>
Response
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <FindAccountResponse xmlns="http://swsoft.com/webservices/sb/4.0/AccountService">
      <FindAccountResult>
        <TotalCount>int</TotalCount>
        <Items>
          <AccountValue>
            <AccountId>string</AccountId>
            <IsBuiltIn>boolean</IsBuiltIn>
            <CreationDate>dateTime</CreationDate>
            <UserName>string</UserName>
            <Email>string</Email>
            <FirstName>string</FirstName>
            <LastName>string</LastName>
            <OwnerName>string</OwnerName>
            <IsLockedOut>boolean</IsLockedOut>
            <Role>Administrator or Reseller or SiteOwner</Role>
            <Profile xsi:nil="true" />
            <PlanId>string</PlanId>
            <IsChangePasswordAllowed>boolean</IsChangePasswordAllowed>
            <OwnerId>string</OwnerId>
            <SsoId>string</SsoId>
          </AccountValue>
          <AccountValue>
            <AccountId>string</AccountId>
            <IsBuiltIn>boolean</IsBuiltIn>
            <CreationDate>dateTime</CreationDate>
            <UserName>string</UserName>
            <Email>string</Email>
            <FirstName>string</FirstName>
            <LastName>string</LastName>
            <OwnerName>string</OwnerName>
            <IsLockedOut>boolean</IsLockedOut>
            <Role>Administrator or Reseller or SiteOwner</Role>
            <Profile xsi:nil="true" />
            <PlanId>string</PlanId>
            <IsChangePasswordAllowed>boolean</IsChangePasswordAllowed>
            <OwnerId>string</OwnerId>
            <SsoId>string</SsoId>
          </AccountValue>
        </Items>
      </FindAccountResult>
    </FindAccountResponse>
  </soap:Body>
</soap:Envelope>

See Also

AccountWebService Web Service | Web services