Delete a Deal returns 204 every time


I found even if dealId doesn't exist in the backend, DELETE /deals/v1/deal/:dealId is returning 204 response code everytime. This case for some other objects too. Is it normal behaviour? Shouldn't it return 404 code?


@Prasad_Satalkar1 Can you share with me an example of this happening?


Curl -X delete will give 204 code although deal with that id doesn't exist.
Curl -X delete will give you 200 code which is wrong.


@Prasad_Satalkar1 Are you using your own hapikey or the demo one? The demo one really doesn't work anymore.


I am using my own testing portal 204
and gives 200


@Prasad_Satalkar1 A 204 is the correct response for deleting a deal. I am guessing you are getting a 200 because we would never have a non-numerical deal ID. You might be confusing our servers a bit as there would never even be a deal with the ID of 'abc'


@pmanca What about DELETE request?
In the above request, dealId is 111 but such deal with id 111 doesn't exist in the backend, still, it returns 204 response. Shouldn't it return 400/404 resposne code if deal with id 111 doesn't exist? (consider 111 any random number and it is negative test case.)


@Prasad_Satalkar1 That is working as designed, We have our APIs set up to respond with a success if you make a false request and there is no dealID or '111'. The only time you would receive a 400 level error was if you didn't format the call correctly and a 500 level error if we couldn't delete a legitimate deal for what ever reason.