I am trying to retrieve a count of how many unvoided shipments were created today via the ShipWorks API.
I have been able to obtain a count of how many shipments were created today but this count includes "voided" shipments. I know I could iterate through each order and filter out the voided shipments, but I would like to know if there is a better approach.
An overview of what I am doing: I am building a stat board that displays shipping stats and goals. I figure the API was the best way to retrieve the data needed for the stat board. I am completely new to ShipStation, so let me know if there is a different way of achieving this goal.
My current code is below...
$filters = array("shipDateStart"=>date("Y-m-d 00:00:00"), "pageSize"=>"1");
$result = $shipStation->getShipments($filters);
$shipmentCount = $result->total;