Discussing APIs and development related to customers, discounts, and order management.
Hi,
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.
Thank you
Solved! Go to the solution
This is an accepted solution.
Hey @Anonymous
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
}
}
}
}
}
This is an accepted solution.
Hey @Anonymous
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
}
}
}
}
}
Sorry for the late reply. I tried this method today and yes it is working.
Hi @Luke_K ,
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.
1. Order Datetime
2. Customer Data (Customer Id, Email, Name, Mobile Number)
3. Total Item Quantity in Order
4. Currency
5. 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 -
Hi @Luke_K,
There is an update.
Pagination issue has been solved by using cursor. The thing that is left is date wise orders and the parameters that I have listed above.
I tried this but records were not as per daterange.