Query to run to generate a csv of orders in one fulfilment status automatically daily

Hi all,

I need a csv sent to me every morning containing order information (name, address, contact info, box) for orders in a specific fulfilment status. Is there a query that I run to have this done automatically?

Thanks for any support

Hello @lflaerty! We do not have something that does the CSV part, but you can run a query that returns orders in a specific status and returns a JSON. This is an example query:

query {
  orders(fulfillment_status: "string") {
    request_id
    complexity
    data {
      edges {
        node {
          id
          legacy_id
          order_number
          shipping_address {
            first_name
            last_name
            address1
            city
            state
            zip
            country
            email
            phone
          }
        }
      }
    }
  }
}

You can find more details on available fields and filters in our schema: https://developer.shiphero.com/wp-content/uploads/spectaql/#query-orders

Have a nice day!