Hi,
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 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 https://api.hubapi.com/deals/v1/deal/111?hapikey=REDACTED 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.