BACKGROUND
This is a follow-up from this previous question of mine.
Since the answer to that question suggested to use XML-RPC instead.
I NEED
to perform Delete operation to Companies.
I TRIED
Doing what this suggested.
XML File
<?xml version='1.0' encoding='UTF-8'?> <methodCall> <methodName>DataService.delete</methodName> <params> <param> <value> <string>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</string> </value> </param> <param> <value> <string>Company</string> </value> </param> <param> <value> <int>25</int> </value> </param> </params> </methodCall>
Laravel PHP Code
$xml = simplexml_load_file('C:\path\to\temp.xml'); $fullTokenObj = unserialize(auth()->user()->token); $connection_URL = 'https://api.infusionsoft.com/crm/xmlrpc/v1/?access_token=' . $fullTokenObj->getAccessToken(); $client = new GuzzleClient(); $response = $client->request('POST', $connection_URL, [ 'headers' => [ 'Content-Type' => 'text/xml; charset=UTF8', ], 'body' => $xml ]); dd($response);
But the response just returns:
Response {#594 ▼
-reasonPhrase: “OK”
-statusCode: 200
-headers: array:25 []
-headerNames: array:25 []
-protocol: “1.1”
-stream: Stream {#592}
}
When I get the list of companies using REST, there was no change in the companies list. Company ID#25 is not deleted.
QUESTION
I’m not sure which part I may have missed. I also tried adding a company suggested there too. but the new company is not reflected. Is there another configuration setting in order to use XML-RPC?