Working on converting an XMLRPC script to REST V2 . . .
The script uses a data query to get all orders for a given contact and specifically requests the data from a custom field, “_TrackingNumber”
Here’s the XMLRPC (PHP) code we’re using:
$returnFields = array(‘ContactId’,‘Id’, ‘JobTitle’,‘_TrackingNumber’); // sets fields that we’re going to return
$query = array(‘contactid’ => $contactID); // where statement
$orders = $infusionsoft->data()->query(“Job”,100,0,$query,$returnFields,‘Id’,false); //order by Id in descending order (ascending=false)
Is there a REST V2 endpoint that allows us to get this data?
I’ve done some searching here and in all the othe queries I’ve seen regarding custom order field values, the answer has been to use the legacy XMLRPC endpoints . . . but obviously that’s not an option since XMLRPC is going away.
Most of those other queries are years old though, so I’m hoping something has changed since then . . .