0

I have a Prospect object in Pardot containing the following multi-select field:

"Your_Interests": {
                "value": [
                  "Option1",
                  "Option2",
                  "Option3"
                ]
              }

(This is at least what I get when pulling the data from the prospect using the API endpoint: https://pi.pardot.com/api/prospect/version/4/do/read/email/{{email}}?format=json)

I am trying to update the prospect, using the API: https://pi.pardot.com/api/prospect/version/4/do/upsert/id/{{ID}}?format=json

Whose Content-Type is application/x-www-form-urlencoded.

The raw payload / parameters work well when it comes to updating free text fields, such as: first_name=John&last_name=Doe

But I struggle with update the Your_Interests field (or any similar fields with multiple values)

I have been trying many syntaxes:

Your_Interests.value[0]=Option4

Your_Interests.value[]=Option4

Your_Interests[0]=Option4

Your_Interests[]=Option4

Your_Interests[value][0]=Option4

Your_Interests[value][]=Option4

Your_Interests.value[0]=Option4

Your_Interests=[Option4]

Your_Interests.value=[Option4]

Your_Interests[value]=[Option4]

But no luck. I am not using / cannot use postman - I'm using a built-in workflow builder of a home made platform, thus the field where I'd input the payload/parameter is just a text box - I don't believe I need to manually URL encode special character, the builder should do it on its own when sending the API call.

How would you update this type of values?

Thanks!

1 Answer 1

0

Your best bet is to use PostMan driving the API so that you can learn exactly how the Pardot API is expecting to see the values passed to it. Once that's figured out, you can take the approach and apply it to your code.

Consider focusing on the following attempts:

  • Your_Interests[]=Option1
  • Your_Interests[]=Option2

or (I'm less confident in this approach)

  • Your_Interests=Option1;Option2

Hopefully this gives you enough to get on the right track.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .