REST API Orders endpoint does not contain custom fields


(Brandon Rumiser) #1

Just like the subject states, the REST API orders and contact endpoints do not contain the custom fields for the orders nor is there any documentation on how to include them if that is an option. I get the same result with the UI test as well as the PHP SDK.

What I have tried:

Tried this because of the documentation on the contacts endpoint for retrieve a contact which works

//url: /crm/rest/v1/contacts/3?access_token=X&optional_properties=custom_fields
$infusionsoft->contacts()->with([“custom_fields”])->find(3)

but these do not return custom fields

//url: /crm/rest/v1/contacts?access_token=X&optional_properties=custom_fields
$infusionsoft->contacts()->where([‘optional_properties’ => “custom_fields”,])->get() (This one returns an empty array but has the placeholder)

//url: /crm/rest/v1/orders?access_token=X&optional_properties=custom_fields
$infusionsoft->orders()->where([‘optional_properties’=>“custom_fields”])->get();

//url: /crm/rest/v1/contacts?access_token=X
$infusionsoft->contacts()->with([“custom_fields”])->get()

//url: /crm/rest/v1/orders/11?access_token=X&optional_properties=custom_fields
$infusionsoft->orders()->with([“custom_fields”])->find(11)

//url: /crm/rest/v1/orders/11?access_token=X
$infusionsoft->orders()->find(11)

The only way to load the custom fields for a job is through the dataservice

//url: /crm/xmlrpc/v1?access_token=X
$infusionsoft->data()->load(‘Job’,11,[‘Id’, “_Shipped”, “_TrackingNumber”])

Is there a special way to get custom fields to return and if so what is it? If this is not a feature can we either make it one or remove the bad example from the documentation?


(Monica Burden) #2

I have also noticed that the ‘company’ property does not actually exist as documented. It only exists as a name on the ‘contact’ and ‘shipping_information’ properties. Also, the ‘contact’ property is very different from the documentation.