# Shipment Endpoint

**URL:** <https://developer-forum.veeqo.com/t/shipment-endpoint/82>\
**Category:** API Queries (How To)\
**Created:** [November 28, 2017, 6:51am UTC](https://developer-forum.veeqo.com/t/shipment-endpoint/82 "2017-11-28T06:51:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ocAsanka](https://avatars.discourse-cdn.com/v4/letter/o/959FA8/32.png) [@ocAsanka](https://developer-forum.veeqo.com/u/ocAsanka)\
**Post date:** [November 28, 2017, 6:51am UTC](https://developer-forum.veeqo.com/t/shipment-endpoint/82/1 "2017-11-28T06:51:39Z")

</div>

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](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…

---

<div class="post-metadata">

**Author:** ![phil](https://yyz1.discourse-cdn.com/flex033/user_avatar/developer-forum.veeqo.com/phil/32/43_2.png) [@phil](https://developer-forum.veeqo.com/u/phil)\
**Post date:** [November 28, 2017, 7:54am UTC](https://developer-forum.veeqo.com/t/shipment-endpoint/82/2 "2017-11-28T07:54:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ocAsanka](https://avatars.discourse-cdn.com/v4/letter/o/959FA8/32.png) [@ocAsanka](https://developer-forum.veeqo.com/u/ocAsanka)\
**Post date:** [November 30, 2017, 7:10am UTC](https://developer-forum.veeqo.com/t/shipment-endpoint/82/3 "2017-11-30T07:10:55Z")

</div>

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

Thanks

---

<div class="post-metadata">

**Author:** ![phil](https://yyz1.discourse-cdn.com/flex033/user_avatar/developer-forum.veeqo.com/phil/32/43_2.png) [@phil](https://developer-forum.veeqo.com/u/phil)\
**Post date:** [November 30, 2017, 9:43am UTC](https://developer-forum.veeqo.com/t/shipment-endpoint/82/4 "2017-11-30T09:43:41Z")

</div>

Hey,

The `allocation_id` is returned in the order response.

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

---

<div class="post-metadata">

**Author:** ![ocAsanka](https://avatars.discourse-cdn.com/v4/letter/o/959FA8/32.png) [@ocAsanka](https://developer-forum.veeqo.com/u/ocAsanka)\
**Post date:** [December 7, 2017, 10:26am UTC](https://developer-forum.veeqo.com/t/shipment-endpoint/82/5 "2017-12-07T10:26:02Z")

</div>

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???

---

<div class="post-metadata">

**Author:** ![phil](https://yyz1.discourse-cdn.com/flex033/user_avatar/developer-forum.veeqo.com/phil/32/43_2.png) [@phil](https://developer-forum.veeqo.com/u/phil)\
**Post date:** [December 7, 2017, 11:08am UTC](https://developer-forum.veeqo.com/t/shipment-endpoint/82/6 "2017-12-07T11:08:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ocAsanka](https://avatars.discourse-cdn.com/v4/letter/o/959FA8/32.png) [@ocAsanka](https://developer-forum.veeqo.com/u/ocAsanka)\
**Post date:** [December 7, 2017, 11:34am UTC](https://developer-forum.veeqo.com/t/shipment-endpoint/82/8 "2017-12-07T11:34:58Z")

</div>

Hi Yes,  
Order Number: 100001473  
Order Id:12554042

---

<div class="post-metadata">

**Author:** ![phil](https://yyz1.discourse-cdn.com/flex033/user_avatar/developer-forum.veeqo.com/phil/32/43_2.png) [@phil](https://developer-forum.veeqo.com/u/phil)\
**Post date:** [December 7, 2017, 1:48pm UTC](https://developer-forum.veeqo.com/t/shipment-endpoint/82/9 "2017-12-07T13:48:11Z")

</div>

Hey,

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

Thanks,

---

<div class="post-metadata">

**Author:** ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/7A66F9/32.png) [@nathan](https://developer-forum.veeqo.com/u/nathan)\
**Post date:** [December 7, 2017, 3:18pm UTC](https://developer-forum.veeqo.com/t/shipment-endpoint/82/10 "2017-12-07T15:18:16Z")

</div>

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.
