Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

batchupdate is not working #30

Open
jothiljose opened this issue Apr 5, 2019 · 1 comment
Open

batchupdate is not working #30

jothiljose opened this issue Apr 5, 2019 · 1 comment

Comments

@jothiljose
Copy link

jothiljose commented Apr 5, 2019

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.

@kskeppe
Copy link

kskeppe commented Mar 14, 2020

import json

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

jdata = json.loads(xjson)

p.prospects.batchUpdate(prospects=jdata)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants