Load Order Details


#1

Hi,
I am having problem with getting order data from specific order. I am syncing Magento orders to veeqo. See example below,

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://api.veeqo.com/orders/12xxxxxx");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
 "Content-Type: application/json",
 "x-api-key: somekey"
));

$response = curl_exec($ch);
curl_close($ch);

var_dump($response);

This will return correct details of the order. BUt my problem is order_id =12xxxxxx.
This Id comes from veeqo side. But in magento side my order_id or increment_id is different form this value.
So what I need is get allocation_id for the particular order from veeqo, But what I have is magento order_id. So how can I use magento order details to get allocation_id from veeqo.

Thanks.


#2

Hey,

The Magento order id will likely be stored as the Order Number. The order ID in Veeqo is a unique identifier in the Veeqo system.

If you try a query string with the order number, that should work.
EG; https://api.veeqo.com/orders?query="OrderNumber"

Let me know if that works.


#3

Hi,
Thanks.
let say my order number is 12345
How to add it to url???


#4

https://api.veeqo.com/orders?query="12345"


#5

Great, This works!!!