The API I currently use returns NULL in the event of false and 1 in the event of true in a sub array. Returning 404 is not ideal, as it refers to "address not found" and hints that the guy requested for a wrong url. I recommend to resume code 200 and always return an array with query information (number of records, pages, etc) and a sub array inside containing the data.
So, if they make a request to your API and it checks that there is no record to be returned, the user will receive code 200 and can see that ordered right, but no records were located in the BD.
I edited it to make it clearer what you wanted. It’s not return true or false but return a response or not. In your case is to return or not a respsota.
– Leonardo Bonetti
It was not I who denied, in fact I found the good question
– Leonardo Bonetti
And that’s no reason to be negative, too !
– Leonardo Bonetti
Quiet. The question got better! Thank you!
– Bruno Amaral