Response 500 on Post Attempt

When trying to upload a constituent through the SKY API, instead of returning an system record ID for the newly uploaded record, I instead have a return of the status code 500 with no sys ID. We are using this endpoint: https://api.sky.blackbaud.com/constituent/v1/constituents. And we are using this documentation as reference: API Reference - SKY API

The weirdest part of this is that the records were uploaded successfully and exist in the database, but it returns this errored status code.

While in some instances this would be okay but not optimal, this is fully hindering a project we are working on as we want to upload a constituent and link things to this newly created constituent record. There is also no content returned, just the 500 status code.

Answers

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

    500 status code but no error message?

    also what does your request looks like, including the json body

  • Technically there is a message but it is not very verbose or helpful: b'{"Message":"An error has occurred."}'

    This is the request json, this is a test constituent with no real data being used:

    {'deceased': False, 'first': 'Al', 'gender': 'Male', 'gives_anonymously': 0, 'inactive': False, 'last': 'King', 'lookup_id': 'test_RH22917', 'title': 'Mr.', 'type': 'Individual', 'matches_gifts': False, 'is_memorial': False, 'is_solicitor': False, 'no_valid_address': False, 'receipt_type': 0, 'date_added': '2017-11-17T13:08:25', 'requests_no_email': False, 'import_id': '22917'}

    This was pulled from a SQL backup of our sandbox environment to be test reuploaded to the same database with a changed lookup_id

  • Also, for further information, the API set up I have going with python is working everywhere else. We have the same structure (auth, headers, etc.) is moving data fine in other places for our automated reports

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

    Your JSON is flawed:

    • JSON is very particular about boolean being lowercase. So use false, instead of False
    • gives_anonymously is a boolean, you set it to 0
  • Oh that False vs false is just the python interpretation when printing to console, but that gives_anonymously was a good look. I got that changed and it worked! Thank you so much!

Categories