API Module Customer searchCustomerRequest
From Openprovider API documentation
(Difference between revisions)
Line 63: | Line 63: | ||
</searchcustomerrequest> | </searchcustomerrequest> | ||
</openxml> | </openxml> | ||
- | + | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
<openxml> | <openxml> |
Revision as of 08:36, 16 April 2010
Contents |
Module Customer > Search
Module | customer |
Command name | searchCustomerRequest |
Use | Returns a list of customer objects matching search criteria |
Input |
|
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> <resellerid>123915</resellerid> </item> </array> </results> <total>1</total> </data> </reply> </openxml>