syntax for nested or chained parameters

Using SKY API Console and Constituent API, I am able to test getConstituent(Search) with two parameters to find a record for a specific user constituent id.  Here is my url, where the system record id is 235412 and the user constituent id is 469584:

https://api.sky.blackbaud.com/constituent/v1/constituents/search?search_text=469584&search_field=lookup_id
What I would like to do is create a more sophisticated url to get the email address value that has type "Convio Sync E-mail' AND the Membership Standing value for a given user constituent id (again, not the system record id). 


Is there a syntax that would allow me to get the system record id value from getConstituent(Search) and use it as an input for Entities Email Address and Membership?   My ideal output would be the system record id, the user constituent id, the email address where type = "Convio Sync E-mail," and the membership standing.

Comments

  • Do we have to do 3 separate calls? 1) call constituent search to get system record id using parameters search_text=469584&search_field=lookup_id, 2) call membership using system record id to get membership standing, 3) call email address using system record id to get convio sync email.  Can do 1 call and get back 3 values, with the first value being an input to get the other values?  I hope I am explaining this correctly.
  • Hi Sharon,


    In general, the various SKY APIs document exactly what is supported in terms of the level of parameters that are available.  We don't (currently) provide an OData-style API that allows the level of expressivity that you're needing to chain parameters.


    So if you don't know the constituent's "system record ID" and all you have is the constituent's "lookup ID" then you'll need to use the ConstituentSearch endpoint as you've listed.  That endpoint will actually return the constituent's primary email address, which *might* be the one you're looking for.  But it doesn't return the email address type (that's good feedback though), so you may need to make another call to the ListConstituentEmailAddressesSingleConstituent endpoint and iterate through the emails returned until you find the one you're looking for (based on the `type`).  Once you have the response from the search endpoint, you'll have the constituent's system record ID so you could call the email and membership endpoints in parallel (but that's not a requirement).


    I hope this helps!
  • Hi Ben, thanks for your response, it was very helpful and that solution is working for us.  I really appreciate your help.


    One follow-up question.  Is it possible to validate a membership standing if what we have is an email address instead of a lookup id (our constituent id value)?


    So for example, I can do this to get email addresses, after constituent search gives me system record id 235412 (lookup id):
    https://api.sky.blackbaud.com/constituent/v1/constituents/235412/emailaddresses

     

    Is there something like email search? (similar to constituent search), where I could search for the system record id 235412 corresponding to my lookup id 'myemail@gmail.com' (called in our database 'convio sync e-mail', not the default email address), and then return membership standing using:
    https://api.sky.blackbaud.com/constituent/v1/constituents/235412/memberships
  • Hi Sharon,


    If I understand your question, I think the answer is "Yes!" - You can actually use the SearchConstituent endpoint to find a constituent based on the email address you have (i.e., it's not just for searching by name or lookup ID).  Just provide the email address for the `search_text` parameter and if a match is found you'll get back the constituent's system record ID, and from there you can fetch the memberships for the constituent.
  • Perfect!  That is working.  Thanks again for your help.  I really appreciate it.

Categories