API Call for Returns

It looks like you’re trying to retrieve a bulk list of returns for a specific time period using an API call. To do this, you’ll need to modify your query to include a filter for the date range you’re interested in.

Here’s an example query that retrieves a list of all orders created between March 1, 2022 and March 31, 2022, and includes information about the transactions and the original order date:

query {
  orders(query: "created_at:>2022-03-01 AND created_at:<2022-03-31") {
    edges {
      node {
        name
        createdAt
        transactions(first: 10) {
          edges {
            node {
              kind
              processedAt
              amountSet {
                shopMoney {
                  amount
                }
              }
            }
          }
        }
      }
    }
  }
}

You can modify the query to include additional information about the orders and transactions as needed, and adjust the date range to fit your needs.

1 Like