Welcome @hemanthkramakrishnan !
Couple different things I’d like to point out here.
First, the Django REST Framework is a third-party package, with its own support channels. While there are some people here who do attempt to address DRF-related issues, you might get faster or quicker answers from one of those resources.
Next, When posting code here, enclose the code between lines of three
backtick - ` characters. This means you’ll have a line of ```, then your code,
then another line of ```. This forces the forum software to keep your code
properly formatted. (I have taken the liberty of correcting your original posts.
Please remember to do this in the future.)
Next, when you get an error, please make sure you post the complete error along with any traceback you might get. Do not try to summarize or anonymize that information. We generally need to see the complete and accurate information to make a diagnosis.
Finally, you are more likely to attract attention to this issue if you provide a bit of a road map for the code. People are less likely to read through an entire project if they don’t have any real idea of where to look.
So I suggest you identify the specific files, functions, and models involved. In this case, this would mean including information of what views, urls and other files handling this request.