CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Applying a tag to a contact (API v3)
Pages: [1]

Author Topic: Applying a tag to a contact (API v3)  (Read 1208 times)

tog22

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: CiviCRM 4
  • CMS version: Drupal 7
  • MySQL version: Varies
  • PHP version: Varies
Applying a tag to a contact (API v3)
March 21, 2012, 09:53:32 am
Is there a way to apply a tag to a contact in v3 of the API? I've found http://wiki.civicrm.org/confluence/display/CRMDOC33/Tagging+APIs#TaggingAPIs-civicrmentitytagaddtagsandentities which shows how to do so for v2 with civicrm_entity_tag_add(). I've also found http://wiki.civicrm.org/confluence/display/CRMDOC41/Upgrading+api's+from+v1+to+v2+and+from+v2+to+v3 which gives civicrm_entity_tag_create() as the equivalent v3 function. But I can find no other references to this, and when I try calling it I get an 'undefined' function error.

Thanks,
Tom

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Applying a tag to a contact (API v3)
March 21, 2012, 01:18:49 pm
You should check example fo v3 api: http://svn.civicrm.org/civicrm/branches/v4.1/api/v3/examples/EntityTagCreate.php

Kurund
Found this reply helpful? Support CiviCRM

tog22

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: CiviCRM 4
  • CMS version: Drupal 7
  • MySQL version: Varies
  • PHP version: Varies
Re: Applying a tag to a contact (API v3)
March 22, 2012, 03:25:20 am
Thanks, I did try exploring the /api/v3/examples/ directory and should have spotted that  :-[

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Applying a tag to a contact (API v3)

This forum was archived on 2017-11-26.