Answers.Body: <p>I use this recipe (manipulate data in Kettle and then API to CiviCRM) regularly. Adding the address is done with the Address API. Are you aware of the API explorer in CiviCRM? </p>
  
  <p>If not, try /civicrm/api/explorer before version 4.6 or use <strong>Support/Developer/API Explorer</strong> since version 4.7. </p>
  
  <p>This gives you a possibility to "play" with the API explorer to find out what is required. Be careful, it does actually perform the suggested actions :-)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T09:13:38.690Z
Answers.Text: I am aware of the API explorer, however, I am not using API directly in Kettle. I am using https://github.com/amnesty/civicrm-data-integration plug in where I don't have a lot of freedom, nor do I get a lot of debug information.
Answers.UserDisplayName: Marko
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T09:55:42.563Z
Answers.Text: I edited the question
Answers.UserDisplayName: Marko
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T14:21:50.167Z
Answers.Text: Aaaah I am sorry but I do not know how to work this in the kettle plugin.......I use Kettle and then use a basic CiviCRM migration class
Answers.UserDisplayName: ErikH - CiviCooP
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T14:22:39.303Z
Answers.Text: As you discovered the CiviCRM API does return the address fields in a get action, but does not use them in a create action....just ran into that issue myself.
Answers.UserDisplayName: ErikH - CiviCooP
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T08:57:57.210Z
Answers.LastActivityDate: 2017-08-29T08:57:57.210Z
Answers.UserDisplayName: ErikH - CiviCooP
Body: <p>I am importing legacy data into a CiviCRM instance, and I am stuck. Using Kettle I am able to import the contacts, but the address data isn't being imported. When I use a sample of the data in the CSV I can import it into CiviCRM through import contacts with the same field mapping, without any problems.</p>
  
  <p>Is there a way to debug API output generated by CiviCRM Output in Kettle? 
  Am I missing a necessary address field of something? What would be a minimal example of API code to create contact with a country address field?</p>
  
  <p>EDIT
  This is the warning I get. </p>
  
  <p>{"is_error":0,"undefined_fields":["country","state_province","city"],"version":3,"count"</p>
  
  <p>Although these fields are avaliable for contacts entity in CiviCRM Output.</p>
  
Tags: <civicrm-home>
Title: Importing contacts through Kettle and CiviCRM data integration
ThreadText: # Importing contacts through Kettle and CiviCRM data integration
  
  (Asked by: username_0 on 2017-08-29)
  
  I am importing legacy data into a CiviCRM instance, and I am stuck. Using Kettle I am able to import the contacts, but the address data isn't being imported. When I use a sample of the data in the CSV I can import it into CiviCRM through import contacts with the same field mapping, without any problems.
  
  Is there a way to debug API output generated by CiviCRM Output in Kettle?
  Am I missing a necessary address field of something? What would be a minimal example of API code to create contact with a country address field?
  
  EDIT
  This is the warning I get.
  
  {"is\_error":0,"undefined\_fields":["country","state\_province","city"],"version":3,"count"
  
  Although these fields are avaliable for contacts entity in CiviCRM Output.
  
  **Tags:** civicrm-home
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-08-29. Score: 2
  
  I use this recipe (manipulate data in Kettle and then API to CiviCRM) regularly. Adding the address is done with the Address API. Are you aware of the API explorer in CiviCRM?
  
  If not, try /civicrm/api/explorer before version 4.6 or use **Support/Developer/API Explorer** since version 4.7.
  
  This gives you a possibility to "play" with the API explorer to find out what is required. Be careful, it does actually perform the suggested actions :-)
  
  > **Comments:**
  > **username_0**: I am aware of the API explorer, however, I am not using API directly in Kettle. I am using https://github.com/amnesty/civicrm-data-integration plug in where I don't have a lot of freedom, nor do I get a lot of debug information.  
  > **username_0**: I edited the question  
  > **username_1**: Aaaah I am sorry but I do not know how to work this in the kettle plugin.......I use Kettle and then use a basic CiviCRM migration class  
  > **username_1**: As you discovered the CiviCRM API does return the address fields in a get action, but does not use them in a create action....just ran into that issue myself.  
  
  ---
  
  