As I go through the other question types I'll add to this thread those that have the same problem.
The "Fill in multiple blanks" question type also fails to fill in the answer ID when the student provides an incorrect value for the blank. Correctly entered blanks have the answer id value. Note that for this question type the name/value pair is there for an incorrect answer, the value is simply null.
In the example below, the student incorrectly filled in both blanks. The correct answers were "three" or "3" for A and "cell" for B.
{
"correct": false,
"points": 0,
"question_id": 8379995,
"text": "",
"answer_for_A": "primitive ",
"answer_id_for_A": null,
"answer_for_B": "equation",
"answer_id_for_B": null,
"more_comments": ""
}
In the case of how this answer was constructed by the instructor, it may make sense that there is no answer id provided in the above JSON. There are multiple correct answers for A (three and 3). So if the student answered blank A incorrectly, which correct value should the submission point to? In this case, it looks like Canvas threw up its hands and said, "None of them!" To work around this, I'm planning to do some ETL magic and find the first correct answer as defined by the instructor.
However, blank B has only one correct answer so there's no excuse for not providing the answer id that points to what the correct answer should be.