Blank Fields for Importing?
I'm rather new to SKY API and Raiser's Edge.
I'm currently having an issue when doing some test imports for Constituents.
SKYAPI Reference for importing Constituents:
I can import a constituent through the API, but if any fields are left blank, the run just shuts down with a code 400 error: "Response 400 Bad Request Returned when the specified request body is not in the appropriate format."
A very simple example of this, since the only required field is “type:”
This run works:
Type: Individual -----------------------------Type: Individual
Last: Ross -------------------------------------Last: Smith
First: Bob --------------------------------------First: John
This run does import Bob, but the run will end with John:
Type: Individual -----------------------------Type: Individual
Last: Ross --------------------------------------Last: Smith
First: Bob ---------------------------------------First: John
email: address: bross@gmail.com ----email: address:
email: type: E-mail --------------------------email: type:
Is there a way to avoid this without putting in some kind of placeholder value such as “none@none.com” with a type of “Delete Me”?
Comments
-
Hi Nicholas,
As mentioned in your post, when the `email` property is entirely excluded from your request body, you should not receive this error. When `email` is provided in the body, the endpoint interprets this as an attempt to set the email address on a constituent, which makes the email address and type properties required. The response body should also indicate that “The address field is required" (for example).
I take it that you are writing code to import multiple constituents as part of some automation/job? Are you able to exclude `email` from your request when your reference constituent does not have one? Depending on how your code is organized and what language you're writing in, this may involve explicitly performing that email check (if the email address is “blank”) and setting `email` to null. Depending on how your code serializes that request body to JSON, setting `email` to null should make your request effectively look the same as your working example. If you are manually building that JSON yourself, you may have to account for this on your own.
0 -
Thanks for the input, Chris.
It looks like deleting empty object properties works.1
Categories
- All Categories
- 6 Blackbaud Community Help
- 211 bbcon®
- 1.4K Blackbaud Altru®
- 402 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®
- 656 Blackbaud Grantmaking™
- 577 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 941 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.7K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 248 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
- 796 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)
