To retrieve multiple orders, call the
findAll() method on the Order resource class.
$order = new ShippingEasy_Order(); $order->findAll();
If successful the call will return a JSON hash included an array of orders and a hash metadata detailing the conditions used in the search as well as pagination details regarding the response.
The page to return in the paginated result set.
The number of result to include per pagein the paginated result set. Defaults to 50 if not specified and the maximum number of results returned per page is 200.
Filters the results by the orders' last updated at timestamp and only returns results with a timestamp newer than or equal to the specified value. Defaults to 1 week ago if not specified. The maxiumum time this value can be set to is 3 months ago.
String or Array
Filters the results by the orders' ShippingEasy order status.
Defaults to "shipped".
It is possible to pass an array of statuses, e.g. ["shipped", "ready_for_shipment"].
Note: There are a few additional states that are used internally as orders are processed, but they are not meant for API consumption.
Adds information to the response. Specifying includes=products will deliver additional information (if available) about each product in the order.
The external_order_identifier to search for
String or Array
Filters the results by tags that have been applied to the order. Specifying one or more tags limits the results to only orders that have at least one of the specified tags.
$order = new ShippingEasy_Order(); $order->findAll(array("page" => 1, "per_page" => 1, "status" => array("ready_for_shipment", "shipped"), "last_updated_at" => "2014-05-07 14:42:18 UTC"));
An example JSON response may be found here:
If you would like to filter your results to a specific store, initialize your object with the store api key:
$order = new ShippingEasy_Order("d8821dde1d32f408def40b77273d5c11"); $order->findAllByStore(array("page" => 1, "per_page" => 1, "status" => array("ready_for_shipment", "shipped"), "last_updated_at" => "2014-05-07 14:42:18 UTC"));
Your credentials could not be authenticated.
The orders retrieved for one or more of the following reasons:
- The API timestamp could not be parsed.
The exception will contain a message that indicates which of these conditions failed.