Searching for constituent by email address - 400 bad request?

Hi all,

Quite new to SKY API and am using this with PHP/Drupal with the Blackbaud SKY API module (https://www.drupal.org/project/blackbaud_sky_api) that seems to be most working successfully. I'm able to authenticate and make API requests.

As I say, new to the API and currently running into a strange issue that I'm sure is quite straightforward.

The API call I'm making looks like:

/constituent/v1/constituents/search?search_text=valid.email@example.com&search_field=email_address&strict_search=true

However I always get a 400 bad request.

/constituent/v1/constituents/search?search_text=valid.email@example.com&search_field=email_address

Appears to work correctly but I'm not getting expected results back. Wondered if anyone can point out what I'm missing?

Thank you!

Comments

  • all parameters need to be encoded for the string. e.g., in js, use encodeURIComponent to replace the @ in email address before submitting to API

  • Val Kuppuswamy
    Val Kuppuswamy Blackbaud Employee
    Ninth Anniversary Kudos 1 Name Dropper Participant

    Try after removing strict_search=true. I got the following message if I included that filter. “This request includes an invalid combination of filters. The only filters that are available for use with the email_address search_field filter are search_text and include_inactive.”

  • Of course. Schoolboy error on my part! Thank you, I'll do that!