Shaved ice is mentioned in the Pillow Book, a Japanese text from about a thousand years ago, as a luxury of nobles.
Once for the court.