API3.1 PHP (and v2.3) Contact Tags non-retrievable via Contact rec

Dear all,


Again an issue with the API (perhaps I am over-looking something?) ...

I am trying to get the Tags of a Contact. Using the API v3.1 (and v2.3) help I see the Tags being present.

Si if I then use the same routine as I use to GET Organisation Tags, it does NOT work??

I know I can get Contact tags also via another method but that will cost performance!!

What I do is to iterate through teh TAGS array and when a tag is found add it to a comma-separated string. I can get Contact name and othe rContactfields without any issue, only not the Tags The $contactRec is filled correctly.


function getContactTags($contactRec) {
$data = '';
if (isset($contactRec['TAGS']) && array_key_exists('TAGS', $contactRec)) {
foreach($contactRec['TAGS'] as $itemTag) {
if ($itemTag != '') {
//seperate tags with ','
if ($data != '') {
$data .= ',';
$data .= $itemTag['TAG_NAME'];
return $data;

(Sorry your post input-field does not allow me to nicely paste or mark up my source code)


Thanks, Menno Bos





Please sign in to leave a comment.