Pivacom API
PIVASOFT GmbH offers its users an API to create, query, or update leads on its Lead Handels Plattform.
How to optain an interface password
After logging in to your broker-account, (see
Zugriff auf Brokeraccount) go to
Leadzulieferung > XMLRPC Schnittstelle
on the navigation
bar.
Then click on Passwort generieren
on the bottom of the
page. This will create a new password to access the API with which will
be displayed as Schnittstellenpasswort
.
You can click on Passwort neu generieren
to create a new
password.
You can click on Schnittstelle deaktivieren
to delete
the password and disable the API.
View Lead Fields
If you are logged in as a broker (see
Zugriff auf Brokeraccount),
go to Leadzulieferung > E-Mail-Schnittstelle
in the navigation bar.
Here you will find all the fields required for submitting leads. At the bottom of the page, you can view the specific fields for the segments that have been made available to you.
Making requests
For making a request, you need your broker ID (obtainable on https://lhp.pivacom.com under
Account > Daten Ändern > Ihre BrokerCode
) and an
interface password. (see How to obtain an
interface password)
These can be used to authenticate yourself in an XMLRPC request to
https://lhp.pivacom.com/interface/XMLRPC_Broker.php
.
For making a request, you need to set the HTTP header
Content-Type:text/xml
.
Generally, the body of a XMLRPC request is structured the following way:
<?xml version="1.0" encoding="iso-8859-1"?>
methodCall>
<methodName><!-- put the method name here --></methodName>
<params>
<param>
<value>
<struct>
<member>
<name>InterfacePassword</name>
<value><string>your password</string></value>
<member>
</<!-- you can put more fields as <member> elements here -->
struct>
</value>
</param>
</params>
</methodCall> </
The body has to be encoded as ISO8859-1.
XMLRPC libraries can of course also be used to create the request like in the following PHP example:
$Request = xmlrpc_encode_request('Lead.GetList', array(
'InterfacePassword' => 'put your interface password here',
'Page' => '0'
;
))
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://lhp.pivacom.com/interface/XMLRPC_Broker.php');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:text/xml'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, $Request);
$Result = curl_exec($ch);
if ($nr = curl_errno($ch)) {
curl_error($ch);
}curl_close($ch);
$Response = xmlrpc_decode($Result);
Methods
The available methods are:
Method name | Parameters | Description |
---|---|---|
Lead.GetList | AbEingestellt: Get only leads created at or later than this date. The format is YYYY-MM-DD. | Get a list of your leads. Up to 200 leads per call. Get the next
page of leads by using the page parameter.
|
AbStart: Get only leads that started at or later than this date. The format is YYYY-MM-DD. | ||
Page: Whole number. Which page of leads to return. Every page is 200 leads (or less on the last page). | ||
Lead.GetListReklamiert | AbEingestellt: Get only leads created at or later than this date. The format is YYYY-MM-DD. | Get a list of all reclamated leads. Up to 200 leads per call. Get
the next page of leads by using the page parameter.
|
AbStart: Get only leads that started at or later than this date. The format is YYYY-MM-DD. | ||
AbErstellt: Get only leads whose reclamation was created at or later than this date. Counts for the current reclamation stage. The format is YYYY-MM-DD. | ||
AbBearbeitet: Get only leads which were last edited at or later than this date. Counts for the current reclamation stage. | ||
Page: Whole number. Which page of leads to return. Every page is 200 leads (or less on the last page). | ||
Lead.GetDetails | LeadId: Required - The lead ID of the wanted lead. | Get all details, inclusive the reclamation data, of a lead. |
Lead.GetGeneralFiles | LeadId: Required - The lead ID of the wanted lead. | Get the file content in base64 encoding. You can get the fileid from Lead. |
FileId: Required - The File ID of the file to get. | ||
Lead.GetReklaFiles | LeadId: Required - The lead ID of the wanted lead. | Get the file content in base64 encoding. You can get the fileid from Lead.GetDetails. |
FileId: Required - The File ID of the file to get. | ||
Lead.Import | See the table import fields below. |
Import leads into the system. |
Lead.SetAktiv | LeadId: Required - The lead ID of the wanted lead. | Change the status of a lead. |
Lead.SetInaktiv | LeadId: Required - The lead ID of the wanted lead. | Change the status of a lead. |
Lead.SetNichtGebucht | LeadId: Required - The lead ID of the wanted lead. | Change the status of a lead. |
Lead.SetUnbrauchbar | LeadId: Required - The lead ID of the wanted lead. | Change the status of a lead. |
Lead.SetDoppelt | LeadId: Required - The lead ID of the wanted lead. | Change the status of a lead. |