Search for Mobile Numbers


#1

Can the API find user profiles by searching the mobile number of a contact?

I would like to be able to identify a contact and the account(s) they’re attached to. So just like the way the call works for the customer portal, only with mobile numbers instead of emails.

-Colt


#2

There’s a /search endpoint you can use that will work.


#3

I’ve been tinkering with that, but I can’t seem to find a body config that returns what I want.

Would you mind suggesting what that would look like?

-Colt


#4

The easiest way would be to just use the top level general search option. Look at the example in the API docs for a simple search.


#5

I did, I figured out just now that I was being stupid yesterday with a trailing ‘/’.

#newdaynewcoffee

Example I used and it works great:

https://admin.32waves.com/api/v1/search/contacts   

 {
	"size": 100,
	"page": 1,
	"search": {
		"search": "9706234195"
	}
}

Thanks Simon. You’re willingness to be helpful even in moments of pure brain farts is the main reason we’ll continue to support sonar and your efforts in it.

Thanks again.

-Colt


#6

Actually, if I can ask one more question:

Is there anyway to limit this search to match mobile numbers ONLY. So someone couldn’t type in a business number and return a bunch of data?

I think this can be done with Feilds? But with mobile being nested the way it is, I can’t figure out how to format it.

-Colt


#7

No, not with nested data like that. But you can do a second query with the data returned to make sure that it is a mobile number.


#8

This is one of the things cleanly fixed in v2, as an aside.