Shipment Endpoint


#1

Hi,
API call that I need to create shipment for particular order which is already synced with veeqo.
My Order id: 100001469

***Here is my code that I used,
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, “https://api.veeqo.com/shipments”);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_POST, TRUE);

curl_setopt($ch, CURLOPT_POSTFIELDS, “{
“shipment”: {
“tracking_number_attributes”: {
“tracking_number”: “12345679ABC”
},
“carrier_id”: 3,
“notify_customer”: false,
“update_remote_order”: false
},
“allocation_id”:1,
“order_id”:100001469
}”);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
“Content-Type: application/json”,
“x-api-key: revoked”
));
$response = curl_exec($ch);
curl_close($ch);

var_dump($response);

***The result I got:
string(36) “{“status”:“404”,“error”:“Not Found”}”

Can you check and assist me how to create shipment with API call.
Pls note that the tracking number is coming from Hermes. So for the testing I put some number…


#2

Hey

Please can you make sure that the allocation_id is correct for that order. It looks as though that is what is causing the 404 error.


#3

Hi Phil,
Thanks for the reply. But I am less aware about Allocation Id.
What is it? and how do I found it.

Thanks


#4

Hey,

The allocation_id is returned in the order response.

https://developer.veeqo.com/docs#/reference/orders/order/view-an-order-detail


#5

Hi phil,
I found some interesting thing that there is no allocation_id for processing orders. I found allocation_id only on shipped(Complete) orders. SO what I need to do is some orders need to ship through the hermes. So some processing orders are send to hermes and get back shipping label and then relevant data need to pass to veeqo and create shipping as 'Other" type shipment. So without allocation_id how can I do that???


#6

Hi
Allocation ID should be present on all orders that are “ready to ship”.
“Ready to ship” orders have a status of awaiting_fulfilment.
An order should only not have an allocation_id when it has not had any stock allocated to it.

Please can you let me have an example order number so I can investigate further.


#8

Hi Yes,
Order Number: 100001473
Order Id:12554042


#9

Hey,

@nathan is looking into this at the moment and will get back to you shortly.

Thanks,


#10

Hey,

I have just investigated the order 12554042, I can see the status is "awaiting_fulfillment"
and has the allocation id: 9418078

I’ve tested the order using our API and you can access the allocation using the order response.

all orders with status “awaiting_fulfillment” have allocations present.