Create Return / Credit Note for the Sales Invoice in erpnext v10

I have copied the same Form Data from the erp creates when creating the sales return
and sending same data via postman rest api it is not working
it gives error
URL: http://127.0.0.1/api/method/frappe.desk.form.save.savedocs

Server Error
Traceback (most recent call last):
File “/home/serverusername/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.handler.handle()
File “/home/serverusername/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/serverusername/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/serverusername/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 939, in call
return fn(*args, **newargs)
File “/home/serverusername/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 12, in savedocs
doc = frappe.get_doc(json.loads(doc))
File “/usr/lib/python2.7/json/init.py”, line 339, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

Hi @kaushalkumarshah,

We know, you facing an issue in version 10 but it’s out of support. so we suggest that you upgrade your version 14 or 15 sequentially.

Supported Versions

Version EOL Branch
Version 12 End of 2022 version-12
Version 13 End of 2023 version-13
Version 14 End of 2024 (planned) version-14
Version 15 End of 2026 (planned) version-15
Bleeding edge N/A develop

More details for check wiki.

Thank You!