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
-
500 status code but no error message?
also what does your request looks like, including the json body
0 -
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_id0 -
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
0 -
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
1 -
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!
0
Categories
- All Categories
- 6 Blackbaud Community Help
- 211 bbcon®
- 1.4K Blackbaud Altru®
- 403 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.6K Blackbaud Financial Edge NXT®
- 657 Blackbaud Grantmaking™
- 578 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 943 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.7K Blackbaud Raiser's Edge NXT®
- 3.8K SKY Developer
- 250 ResearchPoint™
- 120 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 240 Member Lounge (Just for Fun)
- 34 Blackbaud Community Challenges
- 37 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Grid View Batch
- 3 (Closed) PowerUp Challenge: Chat for Blackbaud AI
- 3 (Closed) PowerUp Challenge: Data Health
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 798 Community News
- 3K Jobs Board
- 54 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
