Bug in Cancel Order API?

I am always getting 400 Bad request error on the endpoint:

with valid token and content type headers and following request body:

“source”: “N”,
“txnType”: “S”,
“exchange”: “NSE”,
“segment”: “D”,
“product”: “M”,
“securityId”: “valid secId that was passed in original SELL order”,
“quantity”: 150,
“validity”: “DAY”,
“orderType”: “LMT”,
“price”: 39.9,
“offMktFlag”: false,
“mktType”: “NL”,
“orderNo”: “<PML Order No. - verified>”,
“serialNo”: 1,
“groupId”: “1”

Did it work for anybody? Can someone please validate if I am doing it correctly?

Hey @nick18xtn,
Kindly check out this document containing the specifics of the Cancel Regular Order API: https://developer.paytmmoney.com/docs/api/cancel-regular-order/
Just a heads up, make sure to utilize the exact field names specified in the request body.

1 Like

From where did you get pml id while placing the order?