I'm afraid we don't have a ready piece of code for your case.
However, as I said, REST API allow to pull any data defined through X-Cart's model classes.
So you should study the above guide carefully, it has everything you need.
Also there are several examples of REST API usage here
*
https://devs.x-cart.com/rest-api/examples.html
They might help.