REST API can we cancel Sales Invoice

ERPNext how we can cancel Sales Invoice with API? any POSTMAN example will be highly appreciated.

Thanks

1 Like

https://frappe.github.io/frappe/user/en/guides/integration/rest_api.html

1 Like

Thanks Ahmad,

I already have studied this document and doing integration with POS. Most of the PART is done, for sales invoice Cancel, i need a call from postman.

Regards,
Adnan

update docstatus of Sales Invoice using PUT request. It will submit/cancel/update the form.

use docstatus = 2 for cancel,
e.g.

PUT  http://frappe.local:8000/api/resource/Sales Invoice/SINV-00073
data={"docstatus": 2}
3 Likes

Hi @Sangram

Thanks a lot for your help. will test it now and let you know.

Regards,
Adnan

Thanks @Sangram
it worked like a silver bullet.