To retrieve a specific order, call the find method on the Order resource class with a ShippingEasy order ID specified.
<?php
$order = new ShippingEasy_Order();
$order->find(73150); // id that was assigned by ShippingEasy
If successful the call will return a JSON hash with the ShippingEasy order:
{"order": {
"id": 73150,
"external_order_identifier": "45640",
"ordered_at": "2014-03-05T08:00:00Z",
"order_status": "ready_for_shipment",
"total_including_tax": "94.90",
"total_excluding_tax": "0.00",
"discount_amount": "0.00",
"coupon_discount": "0.00",
"subtotal_including_tax": "89.95",
"subtotal_excluding_tax": "0.00",
"subtotal_tax": "0.00",
"total_tax": "0.00",
"base_shipping_cost": "4.95",
"shipping_cost_including_tax": "4.95",
"shipping_cost_excluding_tax": "0.00",
"shipping_cost_tax": "0.00",
"base_handling_cost": "0.00",
"handling_cost_excluding_tax": "0.00",
"handling_cost_including_tax": "0.00",
"handling_cost_tax": "0.00",
"base_wrapping_cost": "0.00",
"wrapping_cost_excluding_tax": "0.00",
"wrapping_cost_including_tax": "0.00",
"wrapping_cost_tax": "0.00",
"billing_company": "",
"billing_first_name": "Tom",
"billing_last_name": "Smith",
"billing_address": "600 California St",
"billing_address2": "",
"billing_city": "San Francisco",
"billing_state": "California",
"billing_country": "United States",
"billing_postal_code": "94108",
"billing_phone_number": null,
"billing_email": "[email protected]",
"recipients": [
{
"company": "",
"first_name": "Tom",
"last_name": "Smith",
"address": "600 California St",
"address2": "",
"address3": null,
"city": "San Francisco",
"residential": false,
"state": "CA",
"province": null,
"country": "United States",
"postal_code": "94108",
"postal_code_plus_4": "2704",
"phone_number": "3453332222",
"email": "[email protected]",
"base_cost": "0.00",
"cost_excluding_tax": "0.00",
"cost_including_tax": "0.00",
"cost_tax": "0.00",
"base_handling_cost": "0.00",
"handling_cost_excluding_tax": "0.00",
"handling_cost_including_tax": "0.00",
"handling_cost_tax": "0.00",
"shipping_zone_id": null,
"shipping_zone_name": null,
"items_total": 0,
"shipping_method": null,
"items_shipped": 0,
"ext_shipping_detail_id": 44370,
"line_items": [
{
"item_name": "Crumpler Bag",
"sku": "90907",
"bin_picking_number": null,
"weight_in_ounces": "46.08",
"quantity": 1,
"total_excluding_tax": "0.00",
"price_excluding_tax": "89.95",
"unit_price": "89.95",
"ext_line_item_id": "90908",
"ext_product_id": "1018",
"product_options": null
},
{
"item_name": "Downloadable - Office for PC",
"sku": "90909",
"bin_picking_number": null,
"weight_in_ounces": "36.8",
"quantity": 1,
"total_excluding_tax": "0.00",
"price_excluding_tax": "0.00",
"unit_price": "0.00",
"ext_line_item_id": "90910",
"ext_product_id": "1037",
"product_options": null
}
]
}
],
"store_api_key": null
}}
Possible Exceptions
ShippingEasy_AuthenticationError
Your credentials could not be authenticated.
ShippingEasy_InvalidRequestError
The order could not be created on the server for one or more of the following reasons:
- The API timestamp could not be parsed.
- The requested resource could not be found.
The exception will contain a message that indicates which of these conditions failed.