Disputesuite.com is a multi-user web software, which cover all of your customers data at one point. Many big brands using its service to manage their business data.
Disputesuite.com has official API service, which will help to use its data outside from it. You can Get or Post data from it via its API service.
In this article we are going to explain how to get complete customer detail from Disputesuite account using customer id.
Disputesuite.com request soap url : https://www.securecrmsite.com/Modules/System/API.asmx?WSDL
Steps To Get Customer Data from Disputesuite.com via API
Step 1: To get customer information we need to pass post field parameters in an soap envelope form. Use disputesuite company id and api key in credential parameter and customer id inside <ApiParams> tag.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
$xml_post_string='<?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <Process xmlns="http://api.securecrmsite.com/"> <Credentials> <CompanyKey>1488</CompanyKey> <APIKey>bb5210ca-087a-4c32-a186-a3ddb2f044df</APIKey> </Credentials> <ProcessName>CustomerDetails</ProcessName> <Parameters> <ApiParams> <Name>CustomerID</Name> <Value>1713063</Value> </ApiParams> </Parameters> </Process> </soap12:Body> </soap12:Envelope>'; |
Step 2: Pass authorization header in curl request. Must pass the post field content length in header.
1 2 3 4 5 6 7 |
$headers = array( "Content-type: text/xml;charset=\"utf-8\"", "Accept: application/soap+xml;", "Cache-Control: no-cache", "Pragma: no-cache", "Content-length: ".strlen($xml_post_string), ); |
$url = ‘https://www.securecrmsite.com/Modules/System/API.asmx?WSDL’;
Step 3: Post the request API parameter via curl.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
$ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_post_string); // the SOAP request curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); // converting $response = curl_exec($ch); //$x=htmlspecialchars($response); curl_close($ch); echo $response; |
Now you get the particular customer detail through his id. Response will show in XML format. It can be parse the XML by getElementsByTagName using DOMDocument.