Could you get me a glass of water, please? Is this an interrogative sentence or an imperative sentence.?
As written, it's a request, rather than a command.
This is because it uses the modal verb, could, which is used to form polite or formal requests and invitations¹. It makes the request slightly less direct than can or will.
Whether it's one that is genuinely allowing for a negative response is completely context-dependent. If it's your boss, they probably aren't expecting you to say "no", but in any healthy working environment you should be able to demur - if you have something else you're supposed to be doing - but you may be in trouble if you don't comply. If it's a friend or a partner, one hopes that an occasional "no" is acceptable (though too many negative responses will likely spoil the relationship).
[This answer is biased because the most recent occasions when I've spoken like this, it has been a plea rather than an order. If I'm in a restaurant, I'll be surprised to be told "No" to such a request, but even so, it is a question. I just might not like the answer.]
¹ See British Council - LearnEnglish Teens, and Learn English - Online.