Creating a constituent and then adding a constituent code for them.

Hi all,

I'm fairly new to the SKY API and I wonder if I'm missing something obvious here - but there don't seem to be any endpoints for managing a constituent's constituent codes?

Here's what I would like to do:

  • User signs up on website
  • Connect to SKY API and check for duplicates via this endpoint
  • No duplicates? Create a new constituent record in RE via this endpoint and retrieve the new constituent ID from successful response
  • Use new constituent ID to add a constituent code to the new constituent

That last point is where I'm stuck. The closest I have found to something that does this is the Constituent (Convert) endpoint. I'm unclear as to exactly what makes someone a "non-constituent", but as a test I have tried to add a new cons code to my own (already existing and with a couple of cons codes) record in RE via the convert endpoint and got the error "The contact with an id of XXX is already a constituent."

The name of the Constituent (Convert) endpoint infers (to me at least) that it should work when I create a new constituent void of any cons codes, and then try to add them. I haven't tried that yet, but I will also need it (or something) to work in the scenario where the user already exists in our RE database and I merely want to add a cons code to their existing record.

I'd be really grateful if anyone could point me in the right direction on this. Thanks in advance!

Best Answer

  • Erik Leaver
    Erik Leaver Blackbaud Employee
    Tenth Anniversary Kudos 5 First Reply Name Dropper
    Answer ✓

    Hi @Oliver New For the last point, try using POST Constituent Code (Create).

    In your scenario, the form submitter will be a constituent so you don't need to convert them from non-constituent to constituent.

Answers

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary Kudos 5 Facilitator 3 Raiser's Edge NXT Fall 2025 Product Update Briefing Badge

    Erik pointed out the API endpoint that is for creating a constituent code. You had the wrong idea around the "Constituent (Convert)" endpoint as that's for converting a non-constituent record to a constituent record. The create constituent endpoint creates a constituent, it does not create a non-constituent. A constituent without constituent code does not mean the record is a non-constituent record, just a constituent record with no constituent code. Hope that make sense.

    As for your "existing" situation, the workflow should look something like this:

    1. search for duplicate constituent
    2. condition if found
      1. list constituent codes for the found constituent
      2. check if the code you want to add already exists
        1. if yes, do nothing
        2. if no, create the constituent code
    3. condition if not found
      1. create new constituent
      2. create new constituent code