Is it possible to lookup a customer by email address?


(Max M) #1

Since that has to be unique, would seem like you should be able to lookup by email address?


(Spencer Hunter) #2

@djmax, We don’t have Customer search functionality built into API v2, however this is great feedback that I will pass along to the team! For the time being, you’ll want to implement your own Customer lookup from the list Customers response.

If you are testing in UAT you can login to the White Label Sandbox Console with the Dwolla account you used to create your Customers and search for a Customer.


(Max M) #3

The downside is there’s kind of no way to get this right without email lookup. If the connection dies between your creation of the customer and our receipt of the id, it is unrecoverable.


(Nico Westerdale) #4

+1 on this - lookup by email on v2 would be great


(Nico Westerdale) #5

Yes you’re right, and if it does die and you try and create the user again with the same email, then you’ll get an error. The only way to get the ID of the first user would be to pull the entire list and spin through it one by one to check.

It’s not going to happen very often, but I really don’t want to code this!


(Spencer Hunter) #6

@djmax and @incentfit, We just added search capabilities to the existing GET /customers endpoint! You can now search on firstName, lastName, and email by passing in a search term value into the search query string request param. For example:

GET https://api-uat.dwolla.com/customers?search=Bill.bibbit@email.com
Accept: application/vnd.dwolla.v1.hal+json
Authorization: Bearer {Your access token}

{
  "_links": {
    "self": {
      "href": "https://api-uat.dwolla.com/customers?search=Bill.bibbit@email.com"
    },
    "first": {
      "href": "https://api-uat.dwolla.com/customers?search=Bill.bibbit@email.com&limit=25&offset=0"
    },
    "last": {
      "href": "https://api-uat.dwolla.com/customers?search=Bill.bibbit@email.com&limit=25&offset=0"
    }
  },
  "_embedded": {
    "customers": [
      {
        "_links": {
          "self": {
            "href": "https://api-uat.dwolla.com/customers/d9ca4156-4fb8-4979-8ddd-180194209884"
          },
          "funding-sources": {
            "href": "https://api-uat.dwolla.com/customers/d9ca4156-4fb8-4979-8ddd-180194209884/funding-sources"
          },
          "transfers": {
            "href": "https://api-uat.dwolla.com/customers/d9ca4156-4fb8-4979-8ddd-180194209884/transfers"
          }
        },
        "id": "d9ca4156-4fb8-4979-8ddd-180194209884",
        "firstName": "Bill",
        "lastName": "Bibbit",
        "email": "bill.bibbit@email.com",
        "type": "unverified",
        "status": "unverified",
        "created": "2016-04-08T16:13:29.577Z"
      }
    ]
  },
  "total": 1
}

(Chris) #7

@spencer any idea why my test customers may not show in the White Label Sandbox Console? The list response confirms that they are in fact there, just can’t view them in the console.

UPDATED:

This seems to be related to Sandbox console is empty, but shouldn't be


(Spencer Hunter) #8

@cblevvel, hmm, are you logging in to the “White Label Sandbox Console” with the Dwolla account you are using to create your Customers with? Try logging out and logging back in with the account you are using to create your white label Customers.


(Chris) #9

I generated a new access token, and everything seems to be working correctly now.

I wish I hadn’t done that so quickly for testing purposes. I think your thought could be exactly what went wrong. I had recently logged into another dwolla account in the browser and that may have shaken things up. I’ll need to do some more investigation on my end. Thanks @spencer


(klue) #10

Quick question:

Can you add the ability to search customers by status and/or type?

  • customers?search=status.Verified

  • customers?search=status.Unverified

  • customers?search=type.Personal

  • customers?search=type.Business

  • customers?search=type.ReceiveOnly

  • customers?search=status.Verified&type.Business


(Spencer Hunter) #11

@klue, We don’t yet support searching by a specific Customer type and status, however I will be sure to pass this feedback on to our Product team for consideration. Something that we are looking at adding is the ability to filter by a status. I’ll be sure to post back if there are any updates on adding this filter!