Hello. How can I query the shipping address using XML-RPC and PHP? I have tried using Data Service query in a bunch of different ways, to no avail. At present, I am trying to find records that only match the shipping city, using the following code in the call, but nothing is ever returned when I try using City, City2, or City3. I’m positive the value I’m searching for is in the contacts, but I can never get results from the query. What to do?
Have you consider using the SDK it would make it easier for you?
The issue is that the Order By field is set to “ContactId” whereas it should be “Id”.
Note, if you add this line into the script: “curl_setopt($ch, CURLOPT_HEADER, true);”, you will get the Header back which will tell you failures. But then the Simple XML code will trigger an issue, so you need to extract the XML part from the response.
Hahah! I would love to use the SDK. But I’ve wasted over 10 hours trying to make it work, so …
This lookup still isn’t working. I can’t seem to make any type of lookup on the Contact table with any field. I don’t understand what I’m doing wrong. I seem to recall seeing a post in here which was saying something about the field names not matching up when using XML-RPC. Is that true?
As you can probably tell, I’m a newbie at this stuff.
I did the header thing and the status code was 200. Then I printed the raw output and saw an error in there that there is no field ContactId. So I fixed that. Whew! Slow but steady progress.
Thank you so much for all of your help, I really appreciate it!