I need to get all orders with using api

Hi, I have a desktop app, we have some digital products on wix website. So when a member purchases some product, my desktop app needs to know. I am planing to check orders periodically from my desktop app, but I could not figure out how to do it. Which rest api can I use to get all orders as json? (my app is a windows app)
Regards

See the article: Velo: Exposing a Site API with HTTP Functions . Your API will need to access the wix-stores-backend API to retrieve the information you want.

See theses examples:

Thanks very much Yisrael,
here is my code for who are going to need in future. It works fine.
Kind regards.

export async function get_GetAllOrders() {
let options = {
“suppressAuth” : true ,
“headers” : {
“Content-Type” : “application/json” ,
“Access-Control-Allow-Origin” : “*” ,
“Access-Control-Allow-Methods” : “GET,POST,OPTIONS”
}

} 

var result = await wixData.query( “Stores/Orders” ).find(options);
return ok({ body: result });
}

1 Like

Thanks for the function and able to test to retrieve orders. However I was not able to get all orders.
Is there a way I can request orders based on date range?

Thank you

Swamy