Order Shipping Process

I am using update_order_fulfillment_status to ship orders by api (using a custom carrier).

I have not printed shipping labels, as I don’t need to.

I am seeing that the order is fulfilled but the items were not removed from warehouse.

Can someone tell me about the steps required to ship an order via api. I have my own system for printing labels which is separate and working

Hi @mumerhasan
We have a section that explains how to simulate an order fulfillment using three mutations:

Let me know if that doesn’t help!
Thanks in advance,
Tom

Thank you so much for your guidance at both posts. I am beginning to understand how to integrate shiphero with my carrier. I need to ask one more thing though. Our shipping carrier requires delivery timings: like the customer wants the order to be delivered between 12 pm to 8pm. This is the customer’s availability timings. I cannot find this on shiphero dashboard, how to set this. We require this for optimal routing and we are already using this for other vendors.

I am not able to find where to pick the order from through the API. All it contains is warehouse_id and there is no query to query warehouse address from warehouse_id

Will you be using the Generate Label Webhook for your carrier?
In that case, the payload we send to the endpoint is the one showed in the example, would you be sending that as a “note”?

To see the warehouse name/address, you could use the following Query:

query {
  account {
    request_id
    complexity
    data {
      id
      warehouses {
        id
        legacy_id
        identifier
        address {
          name
          address1
          address2
          city
          state
          country
          zip
          phone
        }
      }
    }
  }
}

Warehouses are not something that usually changes, so one you get this information you can store it and know what warehouse is what.

Also, a tip that might be useful, is that the id is base64 Encoded, so with, for example, https://www.base64decode.org/, or any decoder (for example 18.12. base64 — RFC 3548: Base16, Base32, Base64 Data Encodings — Python 2.7.18 documentation for python) you can decode the ID for example:

V2FyZWhvdXNlOjExNzkw = Warehouse:11790

And on the UI, when you got to the warehouse page: https://app.shiphero.com/dashboard/warehouses/edit/11790 the ID at the end of the URL is the one from the warehouse with ID V2FyZWhvdXNlOjExNzkw

Let me know if there is anything I could explain better or help you with.
Thanks again!
Tom

Thanks for timely reply.

I am not able to create shipment via API. When I query for products I get product_ids and now they are already in an order. So I try to create the shipment through mutation giving order_id and product_id as line_item but I am getting “Invalid LineItem id ‘276711896’” whereas this is the item in order having order_id that is given in mutation

Hi @mumerhasan!
Have you tried using the UUID of that line item?
It should be something like bGluZWl0ZW06Mjc2NzExODk2
Also, could you include the request_id? That way I’m able to inspect the whole mutation and check if there is anything missing.
Thanks again!
Tom

5fb383e7702019a68431136f is the request id for create_shipment mutation.
There is no uuid on products, it gives error when I select uuid saying it doesn’t exist.

query {

products {

    request_id

    data {

        edges {

            node {

                id

                legacy_id

                name

            }

        }

    }

}

}

I am using the above query for getting the ids of product. No matter what I use in line_items in create shipment mutations (from id or legacy_id) it gives error.

I am getting this error at the dashboard

“There was an error with the following line items so they were skipped: 444043747”

I have defined items and all of them are 10 units in the inventory. I don’t know why this is happening. When I go to print labels the items are not shown in order. And I am not able to see the items in “line items”. What could be the problem?

Hi @mumerhasan!
Try with the following Query first:

query {
  order(id: "157222046") {
    request_id
    complexity
    data {
      line_items(first: 5) {
        edges {
          node {
            id
            legacy_id
          }
        }
      }
    }
  }
} 

With that order ID you should be able to see the line item id (legacy and uuid)
Then with that uuid try running the shipment create again and replacing those for:

line_item_id: "..."

Let me know if that still doesn’t help.
Thanks again!
Tom

OK, that was resolved. However, I am still learning to create an order and ship it. Is there a proper tutorial for doing this? I have created the order, now when I clicked on endeavour for shipping it would not bring the items of the orders in it and the print button is also inactive. You can see how confused I am because there is no documentation on doing this. The demo videos are showing something else, and I am not able to find any video where they create an order from dashboard. They have already prepared the orders and they just show them and then pack…

Can you give a link where I can learn to create an order, then pack it, and ship it (not actual order, so there must be some manual steps). I am a developer actually but to integrate the API I have to go through the whole cycle.

I think that there might be an issue with the warehouses.
Your account doesn’t have Multi Warehouse turned ON (about multi warehouse)

But on https://app.shiphero.com/dashboard/warehouses you defined more than one warehouse, and that might be causing an error with the order allocation to different warehouses.

Try by deleting the second warehouse and the products create there, or if you want I could turn Multi Warehouse ON for you.

Also, you can create manual orders at https://app.shiphero.com/dashboard/orders/add

Let me know if that doesn’t help!
Thanks again!
Tom

Maybe you are right, I had one of my warehouse ‘locked’ so I had to clear the order locks (based on your information) and it worked. But I wonder, the order is shipped, and inventory is not updated. Why does that happen? I will try making some more orders and tell if the problem comes again.

Yes, kindly turn the multi-warehouse ON, because I have to integrate multiple warehouses for client.

Perfect, thanks @mumerhasan!
The account should be Multi Warehouse now. Let me know if there is anything else I could help with!

Thanks for such support, I am finally getting its working.

I am still getting only orders from one warehouse in endeavor, others are just blank without items. Do I have to configure something for multi warehouse?

This query is causing headache. Now that I have started developing my API and I am seeing that sometimes it returns the addresses of warehouses and at other times they are null. Both at postman and in php same thing is happening.

example. This is a request id that gives no address
“5fb69360d1819c135ff8a824”

and in this request id
“5fb6946b7e005184ac0e7663”

there are addresses. both are same queries that I have saved in postman.

Thanks for reporting that @mumerhasan!
We are looking into it now, I will let you know as soon as we are able to solve the issue.
Thanks again and I apologize for the inconvenience
Tom

Hi @mumerhasan!
I just wanted to check in with you about this. You should be getting the address correctly now, but please let me know if you don’t.
Thanks again!
Tom