Discussions
500 and 422 Errors While Posting Applications with Custom Fields
I have been running into an issue while trying to include custom_attributes and answers when creating a new application through the API.
Specifically, I’m seeing two different responses depending on what I include:
-
500 Error with custom_attributes
Whenever I include a custom_attribute of type text, the request fails with a 500. I’ve checked the field IDs and payload structure, but the API doesn’t seem to like the nested varchar_value even though it’s valid JSON. -
422 Validation Errors with answers
When adding answers, I’m getting the following errors:
Title can't be blank
Question type can't be blank
Question must exist
The confusing part is that I’m already passing a valid question ID. Here’s the basic structure I’m using (shortened):
"relationships": {
"answers": {
"data": [{ "type": "answers", "temp-id": "1", "method": "create" }]
}
},
"included": [{
"type": "answers",
"temp-id": "1",
"attributes": { "boolean_answer": true },
"relationships": {
"question": { "data": { "type": "questions", "id": "QUESTIONID" } }
}
}]
Is there any undocumented field (like title or question_type) that needs to be provided when including answers? Or maybe something specific about the relationship structure for custom_attributes?
Any insights from folks who’ve successfully created applications with embedded relationships would be appreciated.
Also, if anyone’s automated large-scale submissions similar to what I’ve seen done in other workflows like nursing coursework writing service integrations I’d love to hear how you handled validation consistency.
Thanks in advance!