Hi,
I am trying PHP open api to find an order. after including lib, i am executing below php statements. Order id mentioned exists in our store
$order = new ShippingEasy_Order();
$order->find(100035142);
and this script giving below exception:
Fatal error: Uncaught exception 'ShippingEasy_InvalidRequestError' with message 'Order not found.' in /home/pushfors/public_html/app/ajax_files/lib/ShippingEasy/ApiRequestor.php:61 Stack trace: #0 /home/pushfors/public_html/app/ajax_files/lib/ShippingEasy/ApiRequestor.php(102): ShippingEasy_ApiRequestor->handleApiError('{"errors":[{"me...', 404, Array) #1 /home/pushfors/public_html/app/ajax_files/lib/ShippingEasy/ApiRequestor.php(44): ShippingEasy_ApiRequestor->_interpretResponse('{"errors":[{"me...', 404) #2 /home/pushfors/public_html/app/ajax_files/lib/ShippingEasy/Object.php(8): ShippingEasy_ApiRequestor->request('get', '/api/orders/100...', NULL, NULL, NULL, NULL) #3 /home/pushfors/public_html/app/ajax_files/lib/ShippingEasy/Order.php(17): ShippingEasy_Object->request('get', '/api/orders/100...') #4 /home/pushfors/public_html/app/ajax_files/cron_shipping.php(22): ShippingEasy_Order->find(100035142) #5 {main} thrown in /home/pushfors/public_html/app/ajax_files/lib/ShippingEasy/ApiRequestor.php on line 61
Looking for help.
Hi Michael,
I just heard from our developers.
It looks like you are specifying your store order number in the find() method.
We don't support that in our API today.
Instead, when the API is used to create an order in ShippingEasy, the ShippingEasy API returns an "id" as shown on this page: http://shippingeasy.readme.io/docs/orders
That "id" value is what must be used as a parameter to the find() method.
Let us know if you have further questions!
Warm regards