From Openprovider API documentation
Module Reseller > Search Contact
Module
| reseller
|
Command name
| searchContactResellerRequest
|
Use
| Searches for contacts in your reseller account
|
Input
|
- limit (default value: 100, maximum value: 1000)
- offset (default value: 0)
- emailPattern
- lastNamePattern
- companyNamePattern
- usernamePattern
- role (can be admin, tech or billing)
|
Output
| Result set of contact details:
|
Examples
Using PHP class
$request = new OP_Request;
$request->setCommand('searchContactRequest')
->setAuth(array('username' => 'username', 'password' => 'password'))
->setArgs(array(
'offset' => 0,
'limit' => 25,
'role' => 'tech',
));
Raw XML
Please note that newlines and leading spaces are added only for readability. Those whitespaces should be excluded from your XML command before sending it to Openprovider.
<?xml version="1.0" encoding="UTF-8"?>
<openXML>
<credentials>
<username>username</username>
<password>password</password>
</credentials>
<searchContactRequest>
<offset>0</offset>
<limit>25</limit>
<role>tech</role>
</searchContactRequest>
</openXML>
<?xml version="1.0" encoding="UTF-8"?>
<openXML>
<reply>
< code>0</code>
<desc />
<data>
<results>
<array>
<item>
<id>5391</id>
<companyName></companyName>
<name>
<initials>J.B.</initials>
<firstName>John</firstName>
<prefix>van</prefix>
<lastName>Halen</lastName>
</name>
<gender>M</gender>
<phone>
<countryCode>+31</countryCode>
<areaCode>10</areaCode>
<subscriberNumber>4482299</subscriberNumber>
</phone>
<address>
<street></street>
<number></number>
<zipcode></zipcode>
<city></city>
<country></country>
</address>
<email>support@openprovider.nl</email>
<role>tech</role>
<isActive>1</isActive>
<username>newUser</username>
</item>
<item>
<id>3787</id>
<companyName></companyName>
<name>
<initials></initials>
<firstName>Andrew</firstName>
<prefix></prefix>
<lastName>Smith</lastName>
</name>
<gender>M</gender>
<phone>
<countryCode>+31</countryCode>
<areaCode>010</areaCode>
<subscriberNumber>4482299</subscriberNumber>
</phone>
<address>
<street></street>
<number></number>
<zipcode></zipcode>
<city></city>
<country></country>
</address>
<email>navin@hosting-concepts.nl</email>
<role>tech</role>
<isActive>1</isActive>
<username>andrew</username>
</item>
<item>
<id>4556</id>
<companyName></companyName>
<name>
<initials></initials>
<firstName>Will</firstName>
<prefix></prefix>
<lastName>Black</lastName>
</name>
<gender>M</gender>
<phone>
<countryCode>+1</countryCode>
<areaCode>952</areaCode>
<subscriberNumber>9350016</subscriberNumber>
</phone>
<address>
<street></street>
<number></number>
<zipcode></zipcode>
<city></city>
<country></country>
</address>
<email>support@openprovider.nl</email>
<role>tech</role>
<isActive>1</isActive>
<username>willb</username>
</item>
</array>
</results>
<total>3</total>
</data>
</reply>
</openXML>