SOLVED

URL Encoding

Go to solution
Anonymous
Not applicable

Hi 

In certain cases, I need to get a campaign based on its name.  I can use the "get multiple campaigns" call of course.  However, I am running into an issue that certain campaigns have a comma.  

To explain further, if I run the follow through the php function urlencode 

this string: FL-CC0863 Salt Lake City, UT

would become:

FL-CC0863+Salt+Lake+City%2C+UT

Of course I'd expect this to work just fine.  However, the call returns an empty array.  Is the url encoding different for marketo's api?

Thanks,

 

Dan

Tags (1)
1 ACCEPTED SOLUTION
Anonymous
Not applicable
Please try passing the string via the API like this:
FL%2DCC0863%20Salt%20Lake%20City%2C%20UT
 
Let me know if that works?
 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable
Dan - No specific name. It's just called URL-encoding, as you said. 

That's the same way I would encode your Columbus example, so I am not sure why it is not working for you. 
Anonymous
Not applicable

Actually this is still not pulling certain names.  For example:

EM-CC0741 Columbus, OH would be encoded as:

EM%2DCC0741%20Columbus%2C%20OH

Yet no result turns up.

Any ideas?

Thanks,

 

Dan

Anonymous
Not applicable

Thanks, Murtza.  That worked.  Is there a name of this style of urlencoding?  

Josh, I agree.  Unfortunately I just started at my current position, and they've been doing things in a certain way for some time.  That being said, I will definitley bring this issue up with my team.

Thanks!

 

Dan

Josh_Hill13
Level 10 - Champion Alumni
Generally avoid using anything other than a dash in your campaigns or programs. Periods and underscores are allowed, but then you get this kind of issue.
Anonymous
Not applicable
Please try passing the string via the API like this:
FL%2DCC0863%20Salt%20Lake%20City%2C%20UT
 
Let me know if that works?