I want to fetch all POS orders along with product and customer data. Please suggest me the correct API in this case. I am confused in Admin & Storefront API or I can create a private app with read write permission to orders will work. I only want POS sales channel orders not those from online sales.
I would encourage you to take a look at our Admin API docs - here’s Graph QL Admin API Docs and the REST Admin API docs. I feel like that would be a good start based on the resources you want to fetch.
As a starter, something this in the GraphQL Admin API returns me my Point Of Sale Orders on my test store. Hope that helps!
{
orders(first: 100, query:"source_name:pos") {
edges {
node {
id
publication {
name
}
}
}
}
}
I am not able to set proper data. I want POS orders for a particular date and a complete list not first or last 100. This is a script which I am going to call daily. For this I want to get a list of all POS orders of particular date. I have to send this data to 3rd party app. I want all these parameters that I have listed below.
Order Datetime
Customer Data (Customer Id, Email, Name, Mobile Number)
Total Item Quantity in Order
Currency
List of product in that order, all at once (Price - with and without tax and discount, Collection Name, Quantity, Product Name)
I tried the making changes to the code and got these parameters -