exception coming in php open api integration

0
Answered

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.

Official Comment

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

Comment actions Permalink
0

Hi Michael,

I'm sorry to hear you are having trouble!

We don't typically support troubleshooting for the Open API, but I have submitted a ticket to our developers and I would be happy to provide you with an update here once they give me more information.

Have you seen our documentation on the open API. There are links in the article about PHP and there is a guide that may help as well.

Please let us know if you have updated information for our developers!

Warm regards,

Comment actions Permalink

Add a Comment

Please sign in to leave a comment.