PyPardot4 icon indicating copy to clipboard operation
PyPardot4 copied to clipboard

batchupdate is not working

Open jothiljose opened this issue 5 years ago • 1 comments

Sample code set: from pypardot.client import PardotAPI p = PardotAPI( email='[email protected]', password='password', user_key='userkey' )

p.authenticate()

p.prospects.batchUpdate(prospects=[{"id":"100", "field":"value"}, {"id":"101", "filed":"value"}])

Error:

pypardot.errors.PardotAPIError: Error #71: Input needs to be valid JSON or XML

Let me know the json format.

jothiljose avatar Apr 05 '19 06:04 jothiljose

import json

xjson = '{"prospects"=[{"id":"100", "field":"value"}, {"id":"101", "filed":"value"}]}'

jdata = json.loads(xjson)

p.prospects.batchUpdate(prospects=jdata)

kskeppe avatar Mar 14 '20 14:03 kskeppe