Tutorial: Use merge fields to pass users address to MailChimp via API without empty result. Problem solved

In categories: Tutorials, Website development

Recently I embarked on a journey to integrate MailChimp API with abandoned carts plugin. At first I thought that it should be a peace of cake since I saw their huge documentation, but I was mistaken and had to spend my whole afternoon digging google to understand why I am getting empty address field after everything else is imported. Just to be clear – I really like the new Mailchimp 3.0 API and they have done a beautiful job on the documentation but there still are some blind-spots.

From MailChimp documentation I found that when you are trying to add a new subscriber to one of your mailing lists you can use the “merge_fields” parameter to pass user related information like Name, Last name, Phone number and Address (this merge_fields cheat-sheet also came in handy). Passing all of these fields was quite easy except for Address field which didn’t register on MailChimp and every time returned an empty result (see screenshot below).

MailChimp API empty address fields

I tried multiple and various solutions to get this problem fixed (passing arrays, objects, strings etc.) until I turned to Google but it was really hard to find a good article that would help to fix this issue or explain how to pass Address field to MailChimp using merge_fields until I found a published email conversation that gave some explanation into how MailChimp is accepting Address field.

If you want to prevent Mailchimp returning empty Address field you have to pass 5 mandatory fields to it:

  • Address Line 1 (addr1)
  • City (city)
  • State (state)
  • Zip code (zip)
  • Country (country)

Unless one of these is left out, you will see empty column. Also I must add that none of these fields can be left blank even if you do not need or have some of those values replace it with “n/a” or similar.

Here is the working solution and end result of passing Address field to MailChimp via API:

After this I was finally able to get Address fields over to MailChimp. I hope this tutorial helps to save time and money for others in the same spot as I found myself one day :). Please comment below if you have some additional information to add.

Nauris Kolāts

Nauris is a freelance designer / developer who loves to dig into the UX as much as in the ground for fishing worms. And fishing is just one amongst the long list of his active lifestyle hobbies.

Other posts

Your thoughts


  1. Anja

    Thank you for sharing your new found knowledge. I have the same question but for a ‘date’ field. Recently I added a ‘date’ field to my list. I imported a new list (including a column with dates) but the column ‘date’ in my list in MailChimp remained empty. Do you maybe have a suggestion to fix this problem?
    Thank you in advance!

    • Nauris Kolāts

      Hey Anja,

      Thanks for your question.
      If I understand you correctly, you are importing members into a list.
      From this MailChimp API page here: you can see that MailChimp says that date fields must be in a specific format.

      The date and time the subscribe confirmed their opt-in status in ISO 8601 format.

      So I would suggest you to double check the date format you have in your list prior to importing it to MailChimp.
      If the date field is not in the correct format, it will most probably be left blank.

      By the way you should check MailChimp API log file (under after the import – there you could try to find some additional info about what is wrong with the import. It should be visible under “Last 24 hours of API calls“.

  2. Adrian

    Thank you so much for that information. I haven’t found anything about this anywhere else. This saved me a lot of headache!

    • Nauris Kolāts

      Your welcome, Adrian. Was struggling with this a lot myself therefore decided that this could help others in need as well. MailChimp API documentation has a lot to improve – huge amounts of information but in many cases very difficult to find what is necessary.

  3. Mark

    Ahhhhh, thank you so much! Trying to pass those fields was kicking my butt. You saved the day.

    • Nauris Kolāts

      Heh, glad to help another wondering soul on the web. I was stuck on it for some hours as well until I figured it out :)

  4. Jason P.

    Thank you for posting this. I search for a while and finally found this page. It solved my issues. Thank you!


Latest work