Lookup ID '######' is already in use for another constituent

We are experiencing some strange behaviour when creating constituents via the SKY API. On rare occasions (but always during office hours), we'll get a ‘400’ response informing us that a lookup ID (which appears nowhere in the request) is already in use for another constituent. The lookup IDs it reports appear to relate to records that were added whilst the API process was running. And after this error occurs, we find that a non-constituent record has been created (but we don't get the system record ID due to the 400 error).

It seems that the API gets the next available lookup ID but does not reserve it. So if a new constituent is created at the same time and is able to commit more quickly we'll see this error (and a non-constituent record we can't account for). The users in this environment are mostly using the Database View which may account for the disconnect.

It's clearly a bug, but I'm interested to know if anyone else has seen this behaviour before I report it?

Jon.

Comments

  • Alex Wong
    Alex Wong Community All-Star
    Tenth Anniversary Kudos 5 Facilitator 3 bbcon 2025 Attendee Badge

    @Jonathan Kay
    did you check right after you get an error that say Lookup ID is already in use if there is actually a constituent with that lookup id, and if so, use the Get Constituent API to check on that record to see when it was created, compare that to your code of date/time of when failed.

  • @Alex Wong
    Yes. The lookup ID does exist after the error occurs and the date_added value corresponds with the time of the error. I've since discovered that ImportOmatic imports are being done whilst the API process is running.

    Jon.

  • Alex Wong
    Alex Wong Community All-Star
    Tenth Anniversary Kudos 5 Facilitator 3 bbcon 2025 Attendee Badge

    @Jonathan Kay
    sounds like a timing bug in the create constituent API endpoint. YOu should report this to Blackbaud Support.

Categories