CreateGift API returning "500 Internal Server Error" for Custom Fields with type CodeTableEntry
Hello,
We are getting a “500 Internal Server Error” when attempting to create a Gift with a Custom Field with type CodeTableEntry for an existing Constituent. Note: we are able to create a Gifts with Custom Fields of all other types (Text, Boolean, etc) as expected.
We're wondering if the issue is on BB's side or if our syntax for CodeTableEntry Custom Fields might be incorrect.
In the example below, our Custom Field: “Are you a member?” is a CodeTableEntry with the following values:
Request URL
https://api.sky.blackbaud.com/gift/v1/gifts/customfields/categories/values?category_name=Are you a member?
Response
{
"count": 3,
"value": ["No thanks", "Not yet; I'd like to become a member", "Yes, I'm already a member."]
}
In the create Gift API request below, we pass “No thanks” as the Custom Field value. Which results in a 500 Internal Server Error.
Request
POST https://api.sky.blackbaud.com/gift/v1/gifts HTTP/1.1
Host: api.sky.blackbaud.com
Content-Type: application/json
Bb-Api-Subscription-Key: ••••
Authorization: ••••
{
"amount": {
"value": 5
},
"gift_splits": [
{
"amount": {
"value": 5
},
"fund_id": "21"
}
],
"type": "Donation",
"payments": [
{
"payment_method": "CreditCard"
}
],
"custom_fields": [
{
"category": "Are you a member?",
"value": "No thanks"
}
],
"constituent_id": "330387"
}
Note 2: When we use RE NXT Web View, extract the option value from the Add Gift form, and pass that as the “Are you a member?” Custom Field value, we are able to successfully Add the Gift via the API, but we do not see a way of obtaining this value via API. Repeating the above Add Gift request with the custom fields edited below example works as expected:
"custom_fields": [
{
"category": "Are you a member?",
"value": "73466"
}
]

Thank you,
Aaron
Comments
-
@Aaron Colon
I just gave it a try and what you seeing seems to be the behavior.On the POST endpoint for Create Gift, the custom fields property when specifying a custom field of type table entry, it requires you to provide the table entries ID in order to create the custom field.
However, when you use the POST endpoint for create custom field direct on a gift that's already created, you can specify the “text” of the table entry instead of the table entry ID. (so if you do not want to find out the table entry ID, you can create the gift first, THEN call the create gift custom field endpoint to create the custom field.
IF you want to avoid having to make 2nd call, you can actually find out the table entry ID, you will need use to a few endpoint calls to find out:
Use:
to see ALL code tables, and locate the code tables that holds the values for your custom field category.
Then use
and provide the code_tableid to get all table entries for this code table, and you will find the table_entries_id for the text value you need.
1 -
I also have this problem on Modifying/Deleting lists in the API. It requires the List Id which I cannot seem to locate programmatically.
0 -
@Aaron Colon
We tested this and found that if you change “value” to “description” you can add the desired code table entry for the Custom Field. This isn't super clear in the documentation but is sort of there. This would allow you to add it without needing the Table Entry ID.
0 -
@Diane Ellis
I gave it a try, but it is not working for me, which endpoint did you try and what is your JSON request body looks like, mind looks like this and while the gift is created and the custom field is added, the value is blank (and I confirmed the string I passed in is one of the table entry value).



0 -
@Alex Wong Sorry about that. Upon checking further, we found that Post Gift never populated an existing or new table entry when using Value or Description. You can change Value to Description if the table entry exists already and no longer receive an Error, but the Custom Field Description also does not populate on the gift record either despite the response of success. We're filing a defect for the behavior from the Support side of this.
0 -
@Diane Ellis
I am using an existing table entry, “Online Express” as my screenshot shows when at the gift record, edit the custom field shows the selection. description doesn't seems to be a property that can be used (it was not documented that way in SKY API anyway), it is value with the table entries id. the API Call doesn't seems to complaint about an “extranous” property being passed it and just ignores it.0 -
Thank you very much, @Alex Wong and @Diane Ellis.
I have also confirmed with BB support that IDs are required on the CreateGift endpoint for Custom Fields of type CodeTableEntry.
I have requested that BB:1. Update the SKY API documentation to reflect the required use of IDs for CodeTableEntries.
2. Update the SKY API to support using CodeTableEntry Descriptions or IDs.Best,
Aaron0
Categories
- All Categories
- 6 Blackbaud Community Help
- 209 bbcon®
- 1.4K Blackbaud Altru®
- 395 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 359 Blackbaud eTapestry®
- 2.5K Blackbaud Financial Edge NXT®
- 646 Blackbaud Grantmaking™
- 563 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 934 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.4K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 243 ResearchPoint™
- 118 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 238 The Tap (Just for Fun)
- 33 Blackbaud Community Challenges
- 28 PowerUp Challenges
- 3 (Open) 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
- 779 Community News
- 2.9K Jobs Board
- 53 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)


