Creating a constituent API giving me an error even with sample JSON
I'm trying to hit constituent/v1/constituents API with the following JSON
{
"address": {
"address_lines": "12 Lower Mast Rd",
"city": "Freeport",
"formatted_address": "12 Lower Mast Rd Freeport ME 04032",
"postal_code": "04032",
"preferred": "1",
"state": "ME",
"type": "Business"
},
"birthdate": {
"d": 14,
"m": 8,
"y": 1980
},
"deceased": false,
"email": {
"address": "email@domain.com",
"do_not_email": false,
"inactive": false,
"primary": true,
"type": "Email"
},
"first": "FName",
"former_name": "FName LName",
"gender": "Male",
"gives_anonymously": false,
"last": "LName",
"marital_status": "Married",
"middle": "",
"phone": {
"do_not_call": false,
"inactive": false,
"number": "843-537-3397",
"primary": true,
"type": "Home"
},
"preferred_name": "Junior",
"primary_addressee": {
"configuration_id": "28"
},
"primary_salutation": {
"custom_format": true,
"formatted_name": "Joshua Kilgore"
},
"suffix": ", Jr.",
"title": "Mr.",
"type": "Individual"
}
but I'm getting the following response payload
Array ( [0] => Array ( [message] => Unexpected character encountered while parsing value: a. Path '', line 0, position 0. [error_code] => 400 [raw_message] => Unexpected character encountered while parsing value: a. Path '', line 0, position 0. ) [1] => Array ( [message] => A request body containing a(n) constituent is required. [error_code] => 400 [raw_message] => A request body containing a(n) constituent is required. ) )
Could someone assist me in resolving this issue?
Comments
-
@Amit Kumar
couple of things:- Are you hitting the API endpoint with POST method (for creating new constituent)?
- Do you have the authorization headers in the call?
- for the request body, did you make sure all “properties” that is a table entry has correct values? (i.e. “Mr.” exists as a title? “, Jr.” exists as a suffix, primary addressee configuration_id of 28)
- I also just noticed from another post, that it appears phone formatting incorrect could be a problem too. So check your RE database view's configration for phone format
0
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)
