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) »
  • contact_get api, what are the return params for organizationand household id ?
Pages: [1]

Author Topic: contact_get api, what are the return params for organizationand household id ?  (Read 3018 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
contact_get api, what are the return params for organizationand household id ?
August 26, 2009, 05:10:47 pm
Hi,

I found return.current_employer and household_name, but I'd like to retrieve the id as well. what are the params ?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: contact_get api, what are the return params for organizationand household id ?
August 26, 2009, 05:34:58 pm

i think u'll need to do a seperate search for it. the current employer is cached in the contact row itself and we dont have the id. u can retrieve it from the relationship

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: contact_get api, what are the return params for organizationand household id ?
August 26, 2009, 06:46:43 pm
You have organization_id and household_id in civicrm_contact, that's what I want, but can't find the way of exposing them in the api
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: contact_get api, what are the return params for organizationand household id ?
August 26, 2009, 06:53:46 pm

hmm, not sure i understand u correctly. wanna chat on IRC?

civicrm_contact does not have organization_id and household_id db columns

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: contact_get api, what are the return params for organizationand household id ?
August 27, 2009, 12:59:15 am
Hi,

Sorry, I would specifically like to retrieve mail_to_household_id (that contains the id of household_name if I'm correct) and employer_id (that contains the id of organization_name if I'm correct).

What is primary_contact_id for ?

| mail_to_household_id           | int(10) unsigned                              | YES  | MUL | NULL    |                |
| household_name                 | varchar(128)                                  | YES  | MUL | NULL    |                |
| primary_contact_id             | int(10) unsigned                              | YES  | MUL | NULL    |                |
| organization_name              | varchar(128)                                  | YES  | MUL | NULL    |                |
| sic_code                       | varchar(8)                                    | YES  |     | NULL    |                |
| user_unique_id                 | varchar(255)                                  | YES  |     | NULL    |                |
| employer_id                    | int(10) unsigned                              | YES  | MUL | NULL    |   
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

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: contact_get api, what are the return params for organizationand household id ?
August 27, 2009, 03:37:51 am
Quote
What is primary_contact_id for ?
When you create "Head of Household" relationship than we set "primary_contact_id" of Individual with Household id.

Kurund
Found this reply helpful? Support CiviCRM

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: contact_get api, what are the return params for organizationand household id ?
August 27, 2009, 07:08:09 am
Ok, thanks.

As for the mail_to_household_id and employer_id  ? how to get them on a civicrm/get or search api call ?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • contact_get api, what are the return params for organizationand household id ?

This forum was archived on 2017-11-26.