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 (Moderator: Donald Lobo) »
  • geocode thru API
Pages: [1]

Author Topic: geocode thru API  (Read 645 times)

alanski

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 5
  • Cup of tea? Yes please
    • Joomkit
  • CiviCRM version: Version in post
  • CMS version: Joomla
  • MySQL version: 5.0
geocode thru API
February 02, 2013, 02:40:12 am
HI
I am developing some custom form Joomla calls to api to create contacts/org
I was hoping to geocode address thru the api but there doesnt seem to be an API cal to do this
I was wondering if I could trigger one of the scheduled tasks thru the api

Has any one done this?

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: geocode thru API
February 02, 2013, 08:12:25 am

1. all the scheduled tasks / jobs have an api interface (entity = Job)

2. for single addresses, if the geocode api does not exist, would help if you can extend the api to do this. Please contact the api team for help in getting started

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

alanski

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 5
  • Cup of tea? Yes please
    • Joomkit
  • CiviCRM version: Version in post
  • CMS version: Joomla
  • MySQL version: 5.0
Re: geocode thru API
February 12, 2013, 01:52:43 pm
This might seem strange but having now tested this abit , using API create_address is automatically creating lat and long!
Makes me very happy.....

[In fact its easier to write a custom form with API interactions than it is to fight with smarty and civis templates]

cheers Civi!

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: geocode thru API
February 12, 2013, 11:03:17 pm
Hi,

Beware than the API is in general doing less validation than the forms. We try to protect against injections, but some of the functional tests (eg. be sure there is either a first and last or an email if individuals) are often still done only at the form level.

But if you are sure about the data you provide to the api, might be a good solution indeed.

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 (Moderator: Donald Lobo) »
  • geocode thru API

This forum was archived on 2017-11-26.