Order Search does not return order entered online

When I search for orders for a date range, it does not include the orders that were entered online through the square web store. How do I get those?

The Orders API will return all orders regardless where they originated from. Are the orders that aren’t being returned from a different location? :slightly_smiling_face:

nope, same location, but they are not coming through, i searched the raw response from the search for order ids that I knew were online and they are not in there.

here is my json:
{
“location_ids”:[“‘.$location_id.’”],
“return_entries”: false,
“query”: {
“filter”: {
“date_time_filter”: {
“created_at”: {
“start_at”: “'.$date.'T00:00:00+00:00”,
“end_at”: “'.date(“Y-m-d”).'T23:59:59+00:00”
}
},
“state_filter”: {
“states”: [“COMPLETED”]
}
},
“sort”: {
“sort_field”: “CREATED_AT”,
“sort_order”: “DESC”
}
}
}

Do you have an example order_id that’s not being returned? :slightly_smiling_face:

here is the json:
{ “location_ids”:[“LVPWT9XXH5FNX”], “return_entries”: false, “query”: { “filter”: { “date_time_filter”: { “created_at”: { “start_at”: “2022-07-20T00:00:00+00:00”, “end_at”: “2022-09-10T23:59:59+00:00” } }, “state_filter”: { “states”: [“COMPLETED”] } }, “sort”: { “sort_field”: “CREATED_AT”, “sort_order”: “DESC” } }, “cursor”: “” }

and here are a couple of orders not returned, there are many more. I got those by doing an item sale report to csv

mKgh2hRxfenEmJKS649fOSZkDCVZY
6OPi8MIsRr8a3Ka8diqBIzf0sT7YY

The query that your using is filtering on the sates that the orders are COMPLETED and the orders that you provided are in an OPEN state which is why they aren’t showing in the query. :slightly_smiling_face:

Do the online orders always stay in an OPEN state?

The online order has a fulfillment so the created order will be OPEN until it’s completed either by the API or on the Order Manager if the order is being progressed with Order Manager. :slightly_smiling_face: