Api question - creating and updating reviews

Hey hey. I’m making a WaniKani desktop app since I’m bored out of my mind and quarantine has me in the eighth dimension, but I’m stuck on something somewhat specific–or maybe not, but nevertheless, I’m still stuck.

Which endpoint do I post/put to so I can mark a review as answered? In the case that the answer as wrong, how do I signify that as well? The Create a Review section looks promising, but then what happens if someone answers incorrectly?

Am confused, help would be really nice. :Q

You only create a review when the user answers correctly, and for each incorrect answer beforehand you increment the appropriate field e.g. incorrect_meaning_answers. If they don’t answer correctly in that session you could keep track client side using some client-side persistent store to apply the incorrect answers to the next session, or you could just submit the review anyway (although then it won’t be available for the next session).


Looking at the Create a Review and Assignments articles, it appears to me that I have to make two requests: assignments, to get the count of how many reviews that need to be completed through the assignments endpoint, and then reviews with the IDs of the first request to get the incorrect meanings / reading answers. Can this be compressed into one request, or must I have to follow through with the two requests? Oh, and thanks for the help. :^)

You have to use the assignments endpoint to find out which reviews are available for review. Once the review is “done” you submit it via the reviews endpoint. How would you submit a review without knowing which reviews are available?

1 Like

I understand that I have to use the assignments endpoint, but I was wondering if it was mandatory to also use the reviews / review_statistics endpoints to get the amount of readings incorrect? I don’t know if I’m missing something important, but the assignment endpoint doesn’t have the meaning and reading statistics. I’m sorry, it just feels like I’m doing something wrong having to make requests to two different endpoints to make one set of data to push into the reviews endpoint.

1 Like

Oh, I see. The number of incorrect meaning and reading answers is something you have to provide as fresh data, it’s not something that you need to fetch from WK. If both incorrect counts are 0, then you passed the review and it will advance an SRS level. If one or both are not zero then you fail the review and the item will fall a number of SRS levels according to this formula

new_srs_stage = current_srs_stage - (incorrect_adjustment_count * srs_penalty_factor)

incorrect_adjustment_count is the number of incorrect times you have answered divided by two and rounded up. srs_penalty_factor is 2 if the current_srs_stage is at or above 5. Otherwise it is 1.

The reason why you have to provide the number of times you answered the review incorrectly is so that WK can update the SRS level accordingly



So the incorrect_meaning_answers doesn’t mean in total, it just means for that one review session? If so, that solves all of my issues!

1 Like

Almost, it’s for each individual item