Pulling Square Orders [with Python] into MongoDB for Company Reporting

This might be a noob question. I’ve been trying to pull all orders for the last year from my Store’s Order API for reporting/dashboarding. Is this pull even possible? Has anyone seen more guidance on doing this? I’ve read through all the documentation on the APIs but apparently I’m missing something. Further guidance is appreciated.

:wave: With SearchOrders you can query with the date_time_filter. For example:

{
  "location_ids": [
  	"{{location_id}}"
  	],
  	 "query": {
      "filter": {
        "date_time_filter": {
          "closed_at": {
            "start_at": "2021-03-03T20:00:00+00:00",
            "end_at": "2022-03-04T21:54:45+00:00"
          }
        },
        "state_filter": {
          "states": [
            "COMPLETED", "OPEN", "CANCELED", "DRAFT"
          ]
        }
      },
      "sort": {
        "sort_field": "CLOSED_AT",
        "sort_order": "DESC"
      }
    }
}

:slightly_smiling_face:

OK. Bryan Thank you for this!