Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Note that there is a limit of 50 records per batch and we do allow concurrent calls. Traditionally we have limited this to 5 concurrent calls but have removed this limit for now.
- Endpoints available for batch processing:
- /api/prospect/version/3/do/batchCreate
- /api/prospect/version/3/do/batchUpdate
- /api/prospect/version/3/do/batchUpsert
- These endpoints expect a variable called “prospects” which holds either JSON or XML encoded data in the following format:
- // If you want to send JSON:
- {
- “prospects”: {
- “1234”: {
- “first_name”: “New first name”,
- “last_name”: “New last name”
- },
- “some@email.com”: {
- “first_name”: “New first name”,
- “last_name”: “New last name”
- },
- “some.other@email.com”: {
- “first_name”: “New first name”,
- “last_name”: “New last name”
- }
- }
- }
- OR
- // If you’d rather send XML
- <prospects>
- <prospect identifier="1234">
- <first_name>New first name</first_name>
- <last_name>New last name</last_name>
- </prospect> <prospect identifier="some@email.com"> <first_name>New first name</first_name> <last_name>New last name</last_name> </prospect> <prospect identifier="some.other@email.com"> <first_name>New first name</first_name> <last_name>New last name</last_name> </prospect> </prospects>
- (1234 being a Pardot prospect ID).
- The endpoints will return either:
- - a generic error in case of a global error (for instance authentication failed, or invalid format of “prospects” variable);
- - an array of errors for individual prospects that were not processed successfully (prospects that were processed successfully will not be listed);
- - a “success” type response if everything went OK
- The return value will either be XML or JSON (XML by default. If you want JSON, then add “&format=json” to your HTTP query).
- Here is an example:
- /api/prospect/version/3/do/batchUpdate?prospects={"prospects":{"some@email.com":{"first_name":“New first name”,“last_name”:“New last name”},“1234”:{"first_name":“New first name”,“last_name”:“New last name”}}}
- …which in my case will return:
- <?xml version=“1.0” encoding=“UTF-8”?>
- <rsp stat="ok" version="1.0">
- <errors/>
- </rsp>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement