API call to list Contacts and chain call the Notes entity
Contact api call using Notes as chain api does return contact results but return empty results for note even though contact has note.
Api Call:
$result = civicrm_api3('Contact', 'get', [
'sequential' => 1,
'id' => 88,
'api.Note.get' => 1,
]);
After debugging I found that the params passed to Note get api is bit odd. See below
Array
(
[entity_table] => civicrm_contact
[debug] =>
[entity_id] => 88
[contact_id] => 88
[version] => 3
[check_permissions] => 1
[sequential] => 1
[api.has_parent] => 1
)
I am not sure why its assigning 88 to contact_id which holds the contact id who had created note against the contact. Is this expected work flow?