A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi,
I started to use the Admin REST API and Admin GraphQL API.
I'm trying to get specific information about lineItems of an order but I don't find any endpoints for that in the API of Shopify.
I am trying to the get the specific date about when a lineitem was added to an order or when a lineitem was removed (not refunded) from an order (as you know orders in Shopify can be edited manually by people with sufficient permission in the website, and I'm trying to get the info with Shopify API of what exactly happened when an order was edited)
Thanks for any helpers
Solved! Go to the solution
This is an accepted solution.
I believe you can use the agreements object within orders in the GraphQL API.
{ orders(first: 1, query: "name:#5019") { edges { node { name id agreements(first: 10) { edges { node { id happenedAt reason sales(first: 10) { edges { node { lineType actionType quantity totalAmount{shopMoney{amount}} ... on ProductSale { lineItem{id} } } } } } } } } } } }
This is an accepted solution.
I believe you can use the agreements object within orders in the GraphQL API.
{ orders(first: 1, query: "name:#5019") { edges { node { name id agreements(first: 10) { edges { node { id happenedAt reason sales(first: 10) { edges { node { lineType actionType quantity totalAmount{shopMoney{amount}} ... on ProductSale { lineItem{id} } } } } } } } } } } }
Thanks!!
That is exactly what I needed.