batchblue / batchbook-api

Official API documentation for Batchbook
http://batchbook.com
12 stars 2 forks source link

Create a person #18

Open lyrubiano5 opened 6 years ago

lyrubiano5 commented 6 years ago

I am having a trouble creating a person.

Acording to the documentation. I've tried the following request:

request.post (https://"my account".batchbook.com/api/v1/people.json?auth_token="MyApikey", json=my_json)

my_json={"person":{"prefix":"Mr.", "first_name":"Eric","middle_name":"M","last_name":"Krause", "emails":[{"address":"bar@example.com","label":"work","primary": true}],}

The person is created successfully, but the fields emails is empty. This is my response:

{'person': {'comments': [], 'addresses': [], 'about': None, 'created_at': '2017-10-26T17:33:18-04:00', 'emails': [], 'cf_records': [], 'last_name': 'Krause', 'prefix': 'Mr.', 'websites': [], 'updated_at': '2017-10-26T17:33:18-04:00', 'id': 24, 'middle_name': 'M', 'first_name': 'Eric', 'phones': [], 'company_affiliations': [], 'tags': [], 'champion': False}}

I get the same result with the fields "phones" and "addresses"