REST API POST for Customer and Sales Invoice DocType Challange

yep tried it that way ,

{"customer":"test_customer123","submit_on_creation":"1","is_pos":"1","update_stock":"1","items":[{"item_code":"test item-06D","qty":"15","rate":"5"},{"item_code":"test item 6d box","qty":"1","rate":"5"}],"payments":[{"mode_of_payment":" Cash","amount":250,"base_amount":250,"account":"Cash - AT"}]}

still the same error

you need to send Is Paid parameter in Invoice section that is also missing

you mean like this

`{"customer":"test_customer123","submit_on_creation":"1","is_pos":"1","update_stock":"1","items":[{"item_code":"test item-06D","qty":"15","rate":"5"},{"item_code":"test item 6d box","qty":"1","rate":"5"}],"is_paid":"1","payments":[{"mode_of_payment":" Cash","amount":250,"base_amount":250,"account":"Cash - AT"}]}`

still doest work .

cannot pass flt in json format ,
json does not get decoded with it .

I said pass all Boolean, int double values without double quotes

1 Like

it worked , and even submitted after i passed the argument ā€“ "docstatus":1

Thanks for all the help . :+1: