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) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Import contact through api?
Pages: [1]

Author Topic: Import contact through api?  (Read 1476 times)

liveforfun

  • Guest
Import contact through api?
March 12, 2010, 10:54:54 am
Hi, everyone,

I use Drupal 6.14 and CiviCRM 3.1.3.
I'm thinking if what is the best way to import the contact in the spreadsheet to CiviCRM, using Form API and maybe CiviCRM API. Any advice or thought is welcome. thanks a lot.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Import contact through api?
March 12, 2010, 11:57:47 am
I have experience of using the CiviCRM API to import contacts, and think this is a good way if you want to accomplish more than the standard import function can offer. Let me know if you would like some code examples.
Erik
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

liveforfun

  • Guest
Re: Import contact through api?
March 14, 2010, 10:10:24 am
Erik,

It would be great if you can share your code.
I have spent lots of time studying the api and still don't have an idea about how to do it.
Thanks a lot for your help.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Import contact through api?
March 14, 2010, 03:52:19 pm
Hi Eric,

I'd be really keen to see your code samples. There doesn't appear to be an import api function as such so I presume you use a mixture of checks plus contact_add / update.

If you're feeling really keen you could blog it - as to why you use the API & how.....
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Import contact through api?
March 15, 2010, 12:48:59 am
I will blog about it for De Goede Woning project. I know my way around a lot better now than I did when I wrote my earlier imports......there is still lots of room for improvement :-). I have put the code of my previous conversion on the wiki:
http://wiki.civicrm.org/confluence/display/CRMDOC/Using+CiviCRM+APIs+-+Code+Snippets#UsingCiviCRMAPIs-CodeSnippets-ExampleofconversionusingAPI%27s%28contact%2Cgroup%2Ctag%2Clocation%2Crelationship%29
Erik
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Import contact through api?

This forum was archived on 2017-11-26.