API Module Customer searchCustomerRequest

From Openprovider API documentation

(Difference between revisions)
Jump to: navigation, search
Line 49: Line 49:
===Raw XML===
===Raw XML===
  <?xml version="1.0" encoding="UTF-8"?>
  <?xml version="1.0" encoding="UTF-8"?>
-
  <openxml>
+
  <openXML>
   <credentials>
   <credentials>
     <username>username</username>
     <username>username</username>
     <password>password</password>
     <password>password</password>
   </credentials>
   </credentials>
-
   <searchcustomerrequest>
+
   <searchCustomerRequest>
     <offset>0</offset>
     <offset>0</offset>
     <limit>100</limit>
     <limit>100</limit>
     <order>asc</order>
     <order>asc</order>
-
     <orderby>companyName</orderby>
+
     <orderBy>companyName</orderBy>
-
     <companynamepattern>*hosting*</companynamepattern>
+
     <companyNamePattern>*hosting*</companyNamePattern>
-
     <withadditionaldata>0</withadditionaldata>
+
     <withAdditionalData>0</withAdditionalData>
-
   </searchcustomerrequest>
+
   </searchCustomerRequest>
-
  </openxml>
+
  </openXML>
  <?xml version="1.0" encoding="UTF-8"?>
  <?xml version="1.0" encoding="UTF-8"?>
-
  <openxml>
+
  <openXML>
   <reply>
   <reply>
     < code>0</code>
     < code>0</code>
Line 74: Line 74:
           <item>
           <item>
             <id>156384</id>
             <id>156384</id>
-
             <companyname>Hosting Unlimited</companyname>
+
             <companyName>Hosting Unlimited</companyName>
             <name>
             <name>
               <initials>J.B.</initials>
               <initials>J.B.</initials>
-
               <firstname>John</firstname>
+
               <firstName>John</firstName>
               <prefix>van</prefix>
               <prefix>van</prefix>
-
               <lastname>Halen</lastname>
+
               <lastName>Halen</lastName>
             </name>
             </name>
             <gender>M</gender>
             <gender>M</gender>
             <phone>
             <phone>
-
               <countrycode>+8</countrycode>
+
               <countryCode>+8</countryCode>
-
               <areacode>383</areacode>
+
               <areaCode>383</areaCode>
-
               <subscribernumber>1231212</subscribernumber>
+
               <subscriberNumber>1231212</subscriberNumber>
             </phone>
             </phone>
             <fax>
             <fax>
-
               <countrycode>+8</countrycode>
+
               <countryCode>+8</countryCode>
-
               <areacode>383</areacode>
+
               <areaCode>383</areaCode>
-
               <subscribernumber>1231213</subscribernumber>
+
               <subscriberNumber>1231213</subscriberNumber>
             </fax>
             </fax>
             <address>
             <address>
Line 103: Line 103:
             <handle>JH000001-US</handle>
             <handle>JH000001-US</handle>
             <comments></comments>
             <comments></comments>
-
            <resellerid>123915</resellerid>
 
           </item>
           </item>
         </array>
         </array>
Line 110: Line 109:
     </data>
     </data>
   </reply>
   </reply>
-
  </openxml>
+
  </openXML>

Revision as of 13:32, 1 July 2010

Contents

Module Customer > Search

Module customer
Command name searchCustomerRequest
Use Returns a list of customer objects matching search criteria
Input
  • limit
  • offset
  • emailPattern
  • lastNamePattern
  • companyNamePattern
  • withAdditionalData
Output Result set of customer details:

Examples

Using PHP class

$request = new OP_Request;
$request->setCommand('searchCustomerRequest')
 ->setAuth(array('username' => 'username', 'password' => 'password'))
 ->setArgs(array(
   'offset' => 50,
   'limit'  => 25,
   'emailPattern' => '*@openprovider.nl',
   'lastNamePattern' => 'Smith',
   'companyNamePattern' => '*prov*'
 ));

Raw XML

<?xml version="1.0" encoding="UTF-8"?>
<openXML>
  <credentials>
    <username>username</username>
    <password>password</password>
  </credentials>
  <searchCustomerRequest>
    <offset>0</offset>
    <limit>100</limit>
    <order>asc</order>
    <orderBy>companyName</orderBy>
    <companyNamePattern>*hosting*</companyNamePattern>
    <withAdditionalData>0</withAdditionalData>
  </searchCustomerRequest>
</openXML>
<?xml version="1.0" encoding="UTF-8"?>
<openXML>
  <reply>
    < code>0</code>
    <desc></desc>
    <data>
      <results>
        <array>
          <item>
            <id>156384</id>
            <companyName>Hosting Unlimited</companyName>
            <name>
              <initials>J.B.</initials>
              <firstName>John</firstName>
              <prefix>van</prefix>
              <lastName>Halen</lastName>
            </name>
            <gender>M</gender>
            <phone>
              <countryCode>+8</countryCode>
              <areaCode>383</areaCode>
              <subscriberNumber>1231212</subscriberNumber>
            </phone>
            <fax>
              <countryCode>+8</countryCode>
              <areaCode>383</areaCode>
              <subscriberNumber>1231213</subscriberNumber>
            </fax>
            <address>
              <street>Main Street</street>
              <number>2</number>
              <zipcode>630060</zipcode>
              <city>Washington</city>
              <country>US</country>
              <suffix>a</suffix>
            </address>
            <email>info@openprovider.nl</email>
            <handle>JH000001-US</handle>
            <comments></comments>
          </item>
        </array>
      </results>
      <total>1</total>
    </data>
  </reply>
</openXML>
Views
Personal tools