No info or code examples for API Contact create action or API POST method generally
Hi. I don't know if it's the right place to talk about this, but I'm writing about it as it's quite important in my view... Firstly, I think Civi is a GREAT project and I am happy I got involved and I hope to be able to contribute as much as possible. I use Civi with Wordpress and API v3. I managed to use the "GET" method to retrieve a contact information, but now I need to create a new contact and as I gathered on a forum you need to do a "POST" request which I tried, but failed. I get the error: "Invalid argument supplied for foreach() in /wp-content/plugins/civicrm/civicrm/CRM/Utils/REST.php on line 154" The first issue is that I could not find actually any example in the docs about the POST method and I don't know what kind of input to use (json, form-encoded etc) and why I get that error.
Can someone kindly please write a short example to create a Contact (Organization or Invividual)? And I suggest that example to be posted as well in the official documentation.
I know there is the Admin > API explorer and it helped me to structure the GET method, but not the POST one.
Thank you very much for your help!!!