api search by email like test+1@gmail.com | Community
Skip to main content
July 16, 2015
Solved

api search by email like test+1@gmail.com

  • July 16, 2015
  • 2 replies
  • 3026 views

Hi everyone,

I need to search leads via API by mail.

I use call /rest/v1/leads.json?filterType=email&filterValues=test+1@gmail.com

it returns nothing.

It looks like the problem with "+" sign in email.

It returns leads with emails without "+" and does not return leads with emails with "+"...

Are there any ways to escape +?

Does not work as well:

/rest/v1/leads.json?filterType=email&filterValues='test+1@gmail.com'

/rest/v1/leads.json?filterType=email&filterValues="test+1@gmail.com"

Thanks in advance - any help/suggestions appreciated!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by

I managed to get the following to work instead of the + char;

%2B

So you would request /rest/v1/leads.json?filterType=email&filterValues=test%2B1@gmail.com

2 replies

July 16, 2015

Alexandra Boyko​ FYI. I moved your post to the Products and Support​ section of the site.

Elliott_Lowe1
Level 7
July 16, 2015

We had a similar problem with Server Side From Post to Marketo where the plus character was converted to a blank character.  I think we replaced the '+' character with its HTML equivalent (%43) and that solved the problem.  We may have had to convert all the fields' characters to their HTML equivalent.

Grant_Booth
Level 9
July 16, 2015

I would need to test it, but I suspect the "+" is a reserved character in the database query. If you try URL encoding it as a %43 as Elliot suggests, does that work?

Accepted solution
July 16, 2015

I managed to get the following to work instead of the + char;

%2B

So you would request /rest/v1/leads.json?filterType=email&filterValues=test%2B1@gmail.com