500 error on Users phone create POST
Other GETs and POSTs are working fine, but this is my first time using the “Users phone create” endpoint. Instead of a meaningful error message, I get an unhelpful 500 error.
I see that this appears to be an issue with phones in the Constituent API as well, and the Blackbaud K12 web front end has been particularly flaky with phone numbers recently (including giving me a 403 Forbidden Error when trying to change phone types):
Here's my (edited for privacy) request:
-X POST --header "Content-type: application/json" --header "Bb-Api-Subscription-Key: [SNIPPED]" --header "Authorization: Bearer [SNIPPED]" --data-raw "{\\"links\\":[{\\"id\\":4905,\\"shared_relationship\\":\\"Parent\\",\\"shared_user\\":\\"John Doe\\",\\"type_id\\":\\"Wireless\\",\\"user_id\\":4[SNIPPED]2}],\\"number\\":\\"+1-250-555-1212\\",\\"type_id\\":4905}"
(in my case, typeid 4905="Home 2". I'm not entirely clear why I would use typeid:4905 (Home 2) for the main constituent and then id:4905 & typeid:"Wireless" in the links array, but that's the way the info was presented when I did a GET and the SKY API documentation isn't at all clear. From the GET:
{
"id" : 4[SNIPPED]1,
"index_id" : 3[SNIPPED]0,
"links" :
[
{
"id" : 4905,
"shared" : false,
"type_id" : "Home 2",
"user_id" : 4[SNIPPED]5
},
{
"id" : 4905,
"shared" : true,
"shared_relationship" : "Parent",
"shared_user" : "John Doe",
"type_id" : "Wireless",
"user_id" : 4[SNIPPED]2
}
],
"number" : "+1-250-555-1212",
"phone_type" : "Home 2",
"type_id" : 4905,
"user_id" : 4[SNIPPED]5
}
Is this 500 error a bug? or am I doing something wrong…and if so, what?
Comments
-
@Julian Daniel
This doesn't seem to be a bug. 500 errors aren't very specific usually because something is wrong information sent and the system doesn't have a more specific issue to point out. Testing the endpoint I am able to post a new number without a problem. I believe the root of your problem is how you have the body formatted.
In the sample code provided on the endpoint:The body is formatted with the number and the type ID at the top with the shared info listed on the interior:
{
"number": "string",
"type_id": 0,
"links": [
{
"id": 0,
"shared": true,
"shared_relationship": "string",
"shared_user": "string",
"type_id": "string",
"user_id": 0
}
]
}If you POST with that format you should be able to add the number without issue.
In the sample you provided you also have the phone type listed under the shared id (which should be a user ID, and where type ID is listed you have Wireless or Home 2 when this should be a numerical value.
“id” : 4905 ←-this should be a user ID
“type_id” : “Wireless” ←- this should be the numerical value assigned to each type you can retrieve from the endpoint below.
You also may want to check the phone type IDs here:
as that phone ID you have listed seems a bit off to me.
0
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)
